Outgrown shared hosting? Moving WordPress to a VPS gives you dedicated resources and control. Here's a safe migration plan.
1. Prepare the VPS
Set up a LEMP or LAMP stack (Nginx/Apache, MariaDB, PHP) on your new VPS and create an empty database for the site.
2. Back up the old site
- Export the database (via phpMyAdmin or
mysqldump). - Download all files, especially
wp-content/.
3. Move the data
scp -r wordpress-files/ deploy@new-vps:/var/www/site
mysql site < database.sql
4. Update wp-config.php
Point it at the new database name, user and password.
5. Test before switching DNS
Edit your local hosts file to preview the site on the new server. Once it works, lower your domain's DNS TTL, then update the A record to the new VPS IP.
6. Finish
Add HTTPS with Certbot and keep the old host live for a day or two until DNS fully propagates. Done right, visitors never notice the move.