Use 1-click migration to move your WordPress site to another directory
The easiest way to migrate your site is with our WordPress 1-click migration tool. It's included in Managed WP and most of our hosting plans, except for Beginner.
Tip: If you can't use our 1-click tool, please follow this guide instead: Move your WordPress site within the same domain
With the 1-click tool, follow these steps:
- Step 1 - Prepare
- Step 2 - Start the WordPress migration
- Step 3 - Clean up old files
- Step 4 - Redirect traffic from your old directory
Step 1 - Prepare
To ensure that the migration runs smoothly, you need to prepare a few things.
- Make sure the destination directory is empty.
- Check that your website is at most 1GB (700 MB files + 300MB database). If it is more than 1GB, you need to migrate it manually.
- Locate the login details for SFTP and the database and keep them at hand.
- Find the current table prefix in the database, and note it down. The prefix is the bit before the underscore, for example, "blog_" or "www_".
Tip: Before starting a migration, it's a good idea to clean up your WordPress database. Check this guide for more instructions: How to optimize the WordPress database.
Step 2 - Start the WordPress migration.
Follow the general migration guide: Using 1-click WordPress migration
Note: You need to enter the subdomain address like this: https://directory.one-example.nl and not the subdirectory: https://one-example.nl/directory.
Step 3 - Clean up old files
Once the migration is completed, you need to remove your old WordPress installation. If you leave the files, they become a vulnerability that hackers can exploit.
- Make sure that your migrated website is working.
- Create a backup of your webspace and database.
- Delete the files and folders in your old directory via File Manager.
- Remove the tables with the old prefix from your database.
- Additionally, if your old WordPress installation was connected to the one.com Control Panel, you must delete it there.
Step 4 - Redirect traffic from your old directory
For SEO purposes, it's a good idea to add a 301 redirect; that way, visitors and search engines are automatically redirected to the new location of your website.
- Create a file called .htaccess.
- Add the following configuration to the .htaccess file and replace old-directory with the directory where your website used to be and newlocation.com with your website's current location.
RewriteEngine On
Redirect 301 /old-directory/ https://www.newlocation.com
Tip: Alternatively, you can create this redirect with a plugin. We recommend the Redirection plugin.
Related articles: