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.
directory listing wordpressParent Directory wp-admin wp-content wp-includes 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
- Critical error WordPress: There Has Been a Critical Error on This Website
- Call to undefined function create_function() WordPress on PHP 8: Fatal error: Uncaught Error: Call to undefined function create_function() / each()
- Installation failed: Could not create directory WordPress: Installation failed: Could not create directory (plugin/theme install or update)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026