how to move your wordpress blog from sub-directory (/blog) to root directory in seconds

 1. Log in to your cpanel by visiting your site in this format http://www.yoursite.com:2082 or http://www.yoursite.com/cpanel
2. Locate file manager from the initial / default display screen and click on it

3. Delete the initial things that are not necessary including index.html / index.php from the root directory and navigate to /blog (current directory where your wordpress site is currently installed ) of your site => select everything there by clicking select all from the menu nav ==> click copy (not move , in order  to still have your backup copy) to start the copying process

4. Remove /blog (current folder ) from the address to be copied to allowing it be copied to the root directory

5. Log in to your wordpress admin dashboard by visiting your site in this format http://www.mysite.com/blog/wp-admin ==> enter your log in details and hit enter => Navigate to settings / general and change the site url / wordpress address to point to your root directory ==> hit save and proceed to the next action

6. Edit your permalinks settings by navigating to settings/permalinks . N/b if you visit your root site at this point without editing the permalinks any post clicked on will return error 404 ==> edit the permalinks using exactly what you used before so as to reserve your backlink / pagerank  => hit save and proceed to the final step

7. Install “Regenerate Thumbnails” plugin by going to plugin -> add new -> enter Regenerate Thumbnails in the search bar and hit enter ==> install one from the search result to restore any broken image link during the migration

Hurray , Your site is moved , now visit your root directory by entering http://www.yoursite.com and check over and over again to confirm every thing now works fine ==> if 100% confirmed , download a backup copy of /blog and delete all the files in there leaving the parent folder for the very last step .
8. Force Wild card redirect on your /blog to reserved your backlinks (other sites already linking to your post ) , links , category , tags and all external links. To do this Go back to your cpanel interface and click on redirect from that window redirect both http://www.blog.yoursite.com and http://www.yoursite.com/blog to http://www.yoursite.com save and close .

Now your blog is moved . No coding ! No Difficulty Involved . Your Opinion / complaints below

 Source

Obasi Miracle

I am a dedicated web developer with interest in blogging and app development. I have lots of buddies and always ready to connect with like-minded pals - See more about me.

Share
Published by
Obasi Miracle