• Resolved jhng168

    (@jhng168)


    Kindly help me with this question: I noticed that some folder structures in my domain hosting are visible to public and some are not. For example the subfolders under “domain-name/wp-includes/” are visible to public while subfolders under “domain-name/wp-content/” are not visible.
    Why is this so? I couldn’t check folder privileges under HostGator’s FileManager to compare.
    Thanks in advance for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    wp-content has an empty index.php file in it, which wp-includes doesn’t have.

    You should be able to safely copy that same index.php file into wp-includes.

    Thread Starter jhng168

    (@jhng168)

    Thanks for the quick response James.
    Does that mean if I were to create a new folder under my Domain-name e.g. “domain-name/my-subfolder” and move in an empty index.php file into it that subfolder will also not be visible to Public? I need this to protect some resource files that I would like to keep away from public eyes accessing from a directory/folder level and yet my readers can access via a link that I point to in my WordPress page (hope I’m making sense 😉

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Does that mean if I were to create a new folder under my Domain-name e.g. “domain-name/my-subfolder” and move in an empty index.php file into it that subfolder will also not be visible to Public?

    Yes, that is correct. 🙂

    If you want to protect all directories by default (without needing an empty index.php file), you could also consider adding this to the .htaccess file in your main directory:

    Options -Indexes

    Thread Starter jhng168

    (@jhng168)

    Awesome thanks James you’re a star. I’ve been looking for a solution for awhile. I was exploring setting up directories with different chmod code 🙁

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress Folders/Subfolders visibility’ is closed to new replies.