WordPress.org

Ready to get started?Download WordPress

Forums

Root directory install - wordpress directory files all visible (5 posts)

  1. thelittlestgiant
    Member
    Posted 7 years ago #

    I completed moving files as required to have my wordpress blog in my root directory. (note; for some odd reason I used "wp" as the main directory name, instead of "wordpress"

    But, now if you type http://www.mysite.com/wp, the directory opens up with all of the files and subdirectories listed and available for right-click "save as" style downloads.

    This doesn't look kosher or secure...

    Any suggestions... the "wp" directory is set for CHMOD 755

    Thanks

  2. Chris_K
    Member
    Posted 7 years ago #

    Configure the web server to properly recognize index.php as a default file (and turn off directory browsing for pete's sake!)

  3. thelittlestgiant
    Member
    Posted 7 years ago #

    gracias :)

  4. thelittlestgiant
    Member
    Posted 7 years ago #

    The learning never ceases...

    I just learned(for anyone out there w/ apache webserver...) that to turn off the directory browsing you can insert "Options -Indexes" (without quotes) into your .htaccess file

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Yes. I'm surprised that more hosts don't make this the default setting. But for those that don't, Options -Indexes at the top of the .htaccess works too.

    Also, for sites that don't specify index.php as a default page, you can add this to the .htaccess:
    DirectoryIndex index.php index.html index.htm

    That just specifies what pages it will look for, in order of priority. So your index.php will take precedence. :)

    Another useful one I did not know until recently... Some hosts support both PHP4 and PHP5, but require PHP5 files to have a PHP5 extension. If you want to run WordPress under PHP5 this way, then this trick in the .htaccess will let you do it:

    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

    GoDaddy, BTW, is one of these types of hosts.

Topic Closed

This topic has been closed to new replies.

About this Topic