Moving Wordpress from a sub-folder to the root

There is a good chance when you start a project that the client already own a site. All the testing is usually done in a subfolder of this site and when the work is sign off the site is moved from the folder to the root and replace the existing one.

When you deal with static site no problem, copy, paste, done. When database powered it can get tricky. Here is a quick step by step on moving Wordpress from a folder to another. It is not really what I call hardcore but if you don’t know what you are doing then it can get confusing. This is provided as is and I won’t take any responsibility if you mess up your site.

Step 1

Backup everything on both the wordpress folder and your current root folder content. You know…just in case. While you’re at it you can also backup your wordpress db. Then delete everything you don’t need to keep in the root folder. Check that none of file you keep have the same names as files from wordpress root content. (like .htaccess, index.php, etc…).

Step 2

Log into the admin in wp and go to Settings>General. Here you have the two fields: WordPress address (URL) and Blog address (URL). Here you should have something like http://www.root.com/subfolder. So if you are moving from subfolder to root, replace this url by the new one. Then hit save changes at the bottom of the page. Here you should get a 404 Page not found. Don’t panic this is part of the process. Close this browser window/tab.

Step 3

Move the content of the wordpress folder to the new folder. In Filezilla you can select all the files and drag them to the parent directory icon (“..”). If you ftp client doesn’t all this operation then upload you backup instead.

Step 4

Go to the new address where you wordpress site is supposed to be. If everything loads up correctly check the admin. Be sure that you upload folder in settings/miscellaneous is right too. If everything is alright it might be a good idea to place a redirect rule in your htaccess from the old address to the new one to keep user with bookmarks and other links coming through.

Related Items and Services:
Backup solutions.
Technical testing always carried out

Leave a Reply

Theme Forest ad
Wordpress Themes Collection ad
Woothemes

Poll

How do you start your WordPress plugins development projects?

View Results

Loading ... Loading ...