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

**Code:** `Index of /` · **Category:** WordPress · **Seen on:** WordPress

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.

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/wordpress/directory-listing-index-of)
