I have attempted to move a Wordpress site from a subdirectory on my root domain to a subdomain.

I changed the site options in Wordpress settings > general first, and then copied over the contents from the subdirectory to the subdomain.

Nothing is available on the new subdomain, however. Is there a way to save this migration?

3 Answers 3


There is a very specific process to moving a WordPress site. You need to move the files and folders and change the rewrite block in .htaccess. But you also need to change URLs in the database.

See Moving WordPress « WordPress Codex and WordPress Serialized PHP Search Replace Tool.


You need to move all files from sub directory to the directory where sub domain is pointed.

Then you need to make changes in database in *_options table. If you don't want to make changes in database then you should place below lines in your wp-config.php file.

define('WP_HOME', 'http://subdomain.example.com');
define('WP_SITEURL', 'http://subdomain.example.com');

Give it a try and let me know how that goes?


Having done this multiple times I find the easiest way is to create a new WordPress site and migrate to that instance using WP Migrate DB pro and the Multisite addon. Then copying the relevant uploads folder across.

You could also use the WordPress import/export tool.

This method means you don't have to worry about manually updating table entries.

If you are doing it manually, then you will need to update the home and site URLs, update the blogs table if running multisite, update your htaccess file, run a find/replace to update the domain name, update your hosts file to include the subdomain..

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.