For an Internet marketer,it is advantageous to install your blog in a sub directory as it gives you more flexibility and a extra level of security. Sometimes, you want to collect email addresses before you actually open your blog, so you set up a squeeze page and install your blog in sub directory. Once you have filled your blog with content you decide that you don’twant people have to type in www.yourwebsite.com/sub directory. So what do you do? How do you move a WordPress blog from a sub directory to a root directory?
Here’s how to do it in 4 simple steps.
Step 1:
Move your index.php from the subdirectory to the root directory. The root directory should have a /public_html/ (like below) Make sure to move index.php and not copy it.

Step 2:
Open and add you sub directory to index.php. You are looking for this line:
require(‘./wp-blog-header.php’);
Add the name of your subdirectory to the file, like pictured below. In the picture I have added “blog” to the code. So that it looks like this:

require(‘./blog/wp-blog-header.php’);
Step 3:
Sign in to your wordpres admin, it should be
www.yourwebsite.com/your sub directory/wp-admin
Step 4:
Go to the setting tab and click on general. Change the blog address URL to www.yourwebsite.com
You should deleting the subdirectory off the backend of your root domain.

That’s it your all done. Quick,easy, painless.
Leave A Reply (No comments So Far)
No comments yet