Moving WordPress guide gives easy way to move WordPress from subdirectory to root,root to subdirectory,root to subdomain,subdomain to root or change to new URL. WordPress Codex has itself very nice guide, however this guide for Moving WordPress makes all the possible movement within one webpage.
Before Moving WordPress you must do
There are some must steps before Moving WordPress, these are :
- Read this basic guide before moving WordPress (will open in new window)
- For bigger MySQL database follow this guide (will open in new window)
Moving WordPress from subdirectory to root

If your website’s name is thecustomizewindows.com and your WordPress was on thecustomizewindows.com/blog/ and you want it like what we actually have – WordPress main page on thecustomizewindows.com, then for Moving WordPress do these steps :
---
- Export MySQL database from old database and import to a new database
- Move all contents of thecustomizewindows.com/blog/ to thecustomizewindows.com inside FTP. Its easy and needs not to download the content, simply select all and move using any FTP software.
- Open wp-config.php on root (in FTP) edit the old database credentials to new
- Add these two lines (modify it) in wp-config.php and save it :
define(‘WP_HOME’,’https://thecustomizewindows.com’);
define(‘WP_SITEURL’,’ https://thecustomizewindows.com ‘);
- You should be able to login to WordPress now
- Install “Search and Replace” Plugin, in the plugin page, search with thecustomizewindows.com/blog and replace with thecustomizewindows.com
- As there is no thecustomizewindows.com/blog now, you have to redirect old posts to new urls, otherwise you will face 404 errors. Use proper code in .htaccess for avoiding it.
Moving WordPress from root to subdirectory
Basically this way for Moving WordPress looks like the reverse of the above, but just follow the way for Moving WordPress we have written above.
Moving WordPress to root to subdomain, subdomain to root or complete new domain
In these cases you must have to download the FTP content too and upload to proper directory. Technically follow the same method as we have written above for Moving WordPress but be more careful as simply no WordPress 404 plugin can redirect any missed old URLs to the new.
Conclusion on Moving WordPress
Unless there is definite need, try to to avoid Moving WordPress, specially older and with huge database. The reason is – you will loss the backlinks.

Tagged With migmove wordpress from root to subdomain