In many cases, we need to migrate WordPress websites from one website server to another. With some solutions for choice.
We can use the WordPress official tool to export XML data to migrate websites, but this is a lossy migration, some data might miss out.
We can also use server snapshots for site migration. Using this method, both good and bad data are migrated together. But, this method still doesn’t seem to be perfect, it has harsh requirements on the target server, and the size of the snapshot is too large, which is not conducive to remote transmission and storage.
Of course, there are many WordPress plugins for migrating website servers, such as :
- Duplicator – WordPress Migration Plugin
- All-in-One WP Migration
- WP Migrate DB – WordPress Migration Made Easy
Although there are WordPress plugins and solutions to deal with this task.
However, which methods are the best to migrate WordPress websites?
Migrate Wordperss Websites
Based on my past experience, I used the following method to migrate the FAQgeek website. This method is divided into two parts, backup WordPress website and restoring WordPress website.
Backup WordPress website
The first step is to back up the data of the WordPress website.
- Enter PHPMyAdmin to back up the database SQL file.
- Back up the entire website files, but not all of them are actually required.
Restores WordPress website
The second step is to restore the data of the website on the new website server.
- Create a new vhost of the original domain name on the target server
- Install WP in the vhost directory just like building a new website.
Because it is all online operations to prevent user interference, the root directory name of the website is temporarily changed so that the user visits the website 404.
- Import the database SQL file
- Import and replace the files in the themes, plugins, and uploads directories under the original wp-content directory.
- Supplement other customized files and folders, etc.
That’s the way I migrate the FAQgeek website, the workload this way is less.
If you have a better way, please leave a comment to let me know. Thank you!