Website migration between servers: checklist

12.03.2026
Complexity
min.

Summary

When migrating a website to another server: copy files, database, SSL certificate, configure the web server, and update DNS. Below is a step-by-step checklist.

Applies to:
✔ VPS
✔ Dedicated servers
✔ Linux

Preparation

  1. Reduce DNS record TTL to 300 seconds (one day before migration)
  2. Prepare access to both servers (old and new)
  3. Install required software on the new server (web server, PHP, MySQL)

Step 1: transfer website files

Using rsync (recommended):

rsync -avz -e ssh /var/www/site/ root@NEW_IP:/var/www/site/

Or via scp:

scp -r /var/www/site/ root@NEW_IP:/var/www/site/

Using tar archive (for many small files):

tar czf /tmp/site.tar.gz -C /var/www/ site/
scp /tmp/site.tar.gz root@NEW_IP:/tmp/

On the new server:

tar xzf /tmp/site.tar.gz -C /var/www/

Step 2: transfer the database

Create a dump on the old server:

mysqldump -u root -p DB_NAME > /tmp/database.sql

Transfer to the new server:

scp /tmp/database.sql root@NEW_IP:/tmp/

On the new server, create the database and import:

mysql -u root -p -e "CREATE DATABASE DB_NAME;"
mysql -u root -p DB_NAME < /tmp/database.sql

Create a database user:

mysql -u root -p -e "CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL ON DB_NAME.* TO 'user'@'localhost'; FLUSH PRIVILEGES;"

Step 3: configure the web server

Copy the virtual host configuration or create a new one on the new server.

Check the configuration:

nginx -t
systemctl reload nginx

Step 4: SSL certificate

For Let's Encrypt, issue a new certificate on the new server:

certbot --nginx -d example.com -d www.example.com

For paid certificates: copy the certificate and key files.

Step 5: update website configuration

Update database connection settings in the website configuration (wp-config.php, .env, etc.) if the hostname, user, or password changed.

Step 6: update DNS

Change the domain A record to the new server IP.

Wait for DNS to update (with TTL of 300 seconds, this takes a few minutes).

Step 7: final sync

After DNS switchover, run a final sync of files and database from the old server to capture changes made during migration:

rsync -avz -e ssh /var/www/site/ root@NEW_IP:/var/www/site/

Verification

curl -I http://example.com

Response should be HTTP 200. Check all website pages, forms, and database connectivity.

dig example.com +short

Should return the new server IP.

If the website does not work correctly after migration, check web server logs and database connectivity. If necessary, point DNS back to the old server (it should remain operational until full verification). Support can assist with migration.
Was this information helpful?
Yes   No
 
By continuing to use this website you will be agreeing to the website Acceptable Use Policy and the Use of Cookies while using the website and our services. Please also read our Privacy Policy under which, to the extent stated, you consent to the processing of your personal data.