What’s the purpose of index.php in wp-content directory? [duplicate]

Try to visit through the folder structure of your site from the browser:

http://example.com/wp-content/

You will see a blank page. That’s actually is the index.php, and its content is very simple – a commented out PHP comment:

<?php
// Silence is golden.

Remove the file and visit the URL again. You will see the file structure completely. So your file structure is completely become naked.

That’s why the file is there. To hide the inner file structure whatever that be.

O, don’t forget to create the file again there. 🙂

Leave a Comment