WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  1. /wp-content/
  2. /plugins/
  3. /themes/

All have empty index.php files in it. Are they safe to delete? What is their purpose, why even be in the default install if they're empty? What is their purpose?

share|improve this question
Have you read the explanations in Should Plugin Folders Include a Blank index.php File? – toscho Sep 19 '13 at 18:35
That's interesting. So really it doesn't matter if they're there or not from my understanding, correct? – Howdy_McGee Sep 19 '13 at 18:47
If directory browsing is disabled, it doesn’t matter. If it is, WordPress disables it. – toscho Sep 19 '13 at 19:28
up vote 4 down vote accepted

As a security measure, WordPress includes these index.php files to account for hosts that by default enable directory browsing.

Including them makes sure that no one can see the list of files in that directory, which could let them know what plugins or versions you are running and thus give them some things to try to hack your site.

As long as you don't have directory listings enabled, they are safe to delete (although there's probably no reason to delete them).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.