Some friends asked about how to quickly move their WordPress website while using VPS. In fact, there are many methods for website data migration. If your hosting provider has provided snapshot migration and custom mirroring, it is easy to clone all the contents of a server to another server.

Typical services of this type are Tencent Cloud, Alibaba Cloud, and big-name hosting providers such as Linode and DigitalOcean. There are also some hosting providers that do not provide custom mirroring functions, so we need to manually migrate website data. In addition, migration across hosting providers also needs to be done manually, and it is impossible to automatically deploy the website.

I have previously shared three command tools - Rsync, SCP, and Tar - to quickly solve VPS remote website relocation and data synchronization. This article will share how to use the quick synchronization backup command to move your WordPress from one VPS host to another. VPS hosting. Once you master the moving commands, you can move any website within ten minutes.

Quickly move your WordPress in ten minutes: one line of code + three steps

Here are more methods for website data synchronization and backup:

  1. SolusVM KVM VPS host migration method-SolusVM KVM backup and recovery tutorial
  2. Three Steps to Uncover Abnormal Server Traffic - Linux Server Traffic Bandwidth Monitoring and Statistical Commands
  3. Linode VPS relocation essentials: Clone clone image, IP Swap retain original IP and Backup automatic backup

1. One line of code

Tar remote compression, transmission and decompression command :

cd /data/wwwroot #进入网站目录
tar czf - www.wzfou.com | ssh root@198.xxx.xxx.xxx -p 12345 tar xzf - -C /data/wwwroot/www.wzfou.net

Instructions: Enter the wwwroot directory under host A, then package and compress all the files under www.wzfou.com, and transfer them to <bpt2 of host B 198.xxx.xxx.xxx >/data/wwwroot/www.wzfou.net directory. -p 12345 is because the default port of host B S-S-H is not 22. If you use the default one, you don’t need to add this sentence.

2. Step 1: Build a new website environment

In order to ensure that the website can run normally after the move, it is recommended that the new site environment adopt the same configuration as the original site. For example, the original site uses the Pagoda BT panel, then it is recommended that the new site also use the Pagoda BT panel. The installed PHP, Mysql, etc. should be the same as those of the original site. Same as the original.

5. Summary

The key to using the quick relocation method is that the environment when you create a new website should be consistent with the environment of the original website. For example, choose the same version of PHP, Apache or Nginx, MysqL database, etc., especially the database. If the version is inconsistent, An error will occur when causing.

For large-scale website moves, or websites with dynamic content, it is best to make full preparations before moving. After the new site is moved, you should observe it for a period of time before deciding whether to clear the data. In addition, DNS updates will take some time. Generally speaking, DNS synchronization will be completed within 24 hours.

Leave a Reply