Migration
Migrating WordPress with zero downtime
Moving a live WordPress site to a new server is straightforward if you follow the right sequence. The key is to prepare the new server completely before touching DNS, so there’s no gap in availability.
1. Set up the new server
Create a Simplewala server and install WordPress. Note the new server’s IP address.
2. Export your database
# On your old server mysqldump -u wpuser -p wordpress_db > wordpress_backup.sql
3. Copy your files
# From your local machine or new server rsync -avz --exclude=wp-config.php \ user@old-server:/var/www/html/wp-content/ \ /var/www/html/wp-content/
4. Import the database on the new server
mysql -u wpuser -p wordpress_db < wordpress_backup.sql
5. Update wp-config.php
Check that the database host, name, user, and password match the new server’s configuration. Simplewala’s WordPress installer pre-fills these correctly.
6. Update the WordPress URL
If the new server URL is different (e.g. you’re testing via IP), update siteurl and home in the database:
UPDATE wp_options SET option_value = 'https://yourdomain.com'
WHERE option_name IN ('siteurl', 'home');
7. Test via hosts file before switching DNS
Add a temporary entry to your local /etc/hosts to verify everything works:
NEW_SERVER_IP yourdomain.com
8. Reduce TTL and switch DNS
Before the migration, lower your domain’s TTL to 300 seconds (5 minutes). Once everything is verified, update the A record to the new server IP.