Contents
Why do I need to move WordPress to subdirectory?
We’ll be moving WordPress into the aptly named /subdir subdirectory so we need to update the database to utilize the subdirectory, but only for the URLs that will be contained by the subdirectory.
Do you know if you did a root or subdirectory install?
If you installed WordPress manually, you probably know if you did a root or subdirectory install, but maybe you inherited a site or used a one-click installer provided by your host or maybe it’s just been a really long time since you first set up the site.
When to move WordPress root install to subdirectory install?
A few days go by and you’ve laid the groundwork of the new theme and you think it’s about time to pull in their current site’s content so that you can get into the specifics.
How to move WordPress from subdomain to root?
If you installed WordPress in a subdomain (e.g. you can view the site via an address like http://dev.askwpgirl.com instead of https://askwpgirl.com/dev ), then please see Moving WordPress from a Subdomain to a Root Directory instructions. They are similar instructions by slightly different.
What makes migrating from a root install to a subdirectory install?
What makes migrating from a root to a subdirectory install difficult is that in a root WordPress install, all links and asset references use the same URL, but in a subdirectory install links to posts or pages will use the site URL while links or references to media or assets use the WordPress URL.
How to update URLs when moving your WordPress site?
First make sure that you have a complete backup of your WordPress site. This will allow you to easily revert back in case something goes wrong during the update process. Next, you need to install and activate the Velvet Blues Update URLs plugin. For more details, see our step by step guide on how to install a WordPress plugin.
How to move WordPress site to root directory?
Delete all of the WordPress files and folders in the root directory, being careful not to delete the folder your new site is in. Beware: don’t do this until you have made a backup! You’ll need to edit two settings in your new site: permalinks and the site address.