Index of / 📝 WordPress

WordPress site shows "Index of /" (directory listing instead of the site)

The web server isn’t using index.php as the directory index, or index.php is missing — so it lists files instead of running WordPress.

Seen on: WordPress

Meaning

After migrations, index.php may not be uploaded, or Apache DirectoryIndex/Nginx index directives don’t include index.php. PHP not configured for the vhost can also lead to downloads or listings.

Common causes

  • index.php missing from the web root
  • DirectoryIndex/index directive lacks index.php
  • Document root points to a parent folder
  • PHP handler not configured

⚡ Quick fix

  1. Upload WordPress’s index.php
  2. Add index.php to DirectoryIndex/index
  3. Disable directory listing (Options -Indexes / autoindex off)

Detailed fix by platform

Apache

  1. apache
    DirectoryIndex index.php index.html
    Options -Indexes

Nginx

  1. nginx
    index index.php index.html;
    autoindex off;

How to diagnose

  1. Files — index.php present?
  2. Config — Index directives
  3. Root — Correct folder?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.