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
- Upload WordPress’s index.php
- Add index.php to DirectoryIndex/index
- Disable directory listing (Options -Indexes / autoindex off)
Detailed fix by platform
Apache
- apache
DirectoryIndex index.php index.html Options -Indexes
Nginx
- nginx
index index.php index.html; autoindex off;
How to diagnose
- Files — index.php present?
- Config — Index directives
- 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:
Similar errors
Most viewed in WordPress
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026