Thursday, February 17, 2011

Install Wordpress in a different Directory other than root directory

Why:
1. Security Reasons (No one can find your wordpress files unless they are pretty smart)
2. Keeps your root directory clean.
  1. Create a folder inside your root directory "public_html" and need to be long and un-guessable "HelloDirecotryName"
  2. Export wordpress package into it
  3. And Move the files index.php and the .htaccess to the root directory
  4. Next open index.php file and change
require('./wp-blog-header.php');
…to this
require('./helloDirecotryName/wp-blog-header.php');

5. Now every time you login to your system you'll have to use exact path http://mywordpressite.com/HelloDirecotryName/wp-admin/
6. Once you login to your dashboard go to Settings >> General Settings and ensure
  • WordPress address (URL) points to http://mywordpressite.com/HelloDirecotryName/
  • Site address (URL) http://mywordpressite.com/

4 comments:

forgings suppliers said...

Create a folder inside your root directory "public_html" and need to be long and un-guessable "HelloDirecotryName" - I have use this one already. This is very effective.

chavez vs martinez said...

Glad you've shared this for I need this in my study. I follow the steps you've posted and I made it. A lot of thanks to you.

ultrasound technician schools said...

I cannot move the files index.php and the .htaccess to the root directory. What I am going to do now?

Disneyland Resort said...

I made it through your tutorial. Glad I found this blog which is a big help help in my part. Kindly share more and update me here.

Post a Comment