How To Minimise Website Migration Downtime
Summary
This guide helps you troubleshoot and resolve: How To Minimise Website Migration Downtime. Follow the steps below to fix the issue.
Common Causes
Moving a live website between hosting providers or servers carries inherent risks to business continuity. Poorly planned migrations can result in extended outages, lost data, and broken marketing links, which directly impact customer trust and revenue. This guide outlines how to minimise downtime during a website migration by addressing DNS propagation, data synchronisation, and pre-launch verification.
Understanding Migration Downtime
Downtime during a migration typically occurs for two primary reasons:
- DNS propagation delays: When you update your domain's nameservers or
A records, it takes time for those changes to spread across the global internet. During this window, some visitors may still be directed to the old server. - Data synchronisation gaps: If your website uses a database (such as for e-commerce or a content management system), new orders, comments, or updates created on the old server after the migration begins will not exist on the new server.
Pre-Migration Planning
1. Audit Your Current Environment
Before touching any settings, document your current setup to ensure nothing is missed during the move.
- Identify all domains and subdomains associated with the website.
- Locate your current DNS records, including
A records,CNAME records, andMX recordsfor email. - Note the file paths used on the current server, such as
/var/www/htmlorpublic_html. - Record database credentials, including the database name, username, and host address.
2. Prepare the Destination Server
Set up the new hosting environment before initiating the transfer.
- Install the required web server software (e.g., Apache or Nginx) and database server.
- Upload your website files to the new server using SFTP or the hosting control panel's file manager. For cPanel users, navigate to Files > File Manager. For Plesk users, go to Websites & Domains > File Manager.
- Import your database export into the new database instance. In cPanel, use Databases > phpMyAdmin. In Plesk, use Websites & Domains > Databases > phpMyAdmin.
- Update configuration files (such as
wp-config.phpfor WordPress) with the new database credentials. - Migrate SSL/TLS certificates: Export your existing SSL certificate and private key from the old server. Install them on the new server via the control panel's SSL/TLS management section (cPanel: Security > SSL/TLS Status; Plesk: Websites & Domains > SSL/TLS Certificates). Ensure the certificate is active before updating DNS to avoid browser security warnings.
3. Lower DNS TTL Values
Time to Live (TTL) determines how long ISPs cache your DNS records. A high TTL means longer propagation delays.
300 seconds (5 minutes), it will take up to 5 minutes for ISPs to check for updates after you change the A record. If you leave the TTL at the default 86400 seconds (24 hours), some visitors may be directed to the old server for an entire day after you switch. Do not lower TTL values on the day of migration, as changes to the TTL itself take time to propagate based on the existing TTL.- Log in to your domain registrar or DNS management console.
- Locate the DNS record for your primary domain (usually the
A record). - Change the TTL value to a low number, such as
300seconds (5 minutes). - Save the changes using the Save or Update button.
Pre-Migration Testing
Before updating your public DNS, verify the new server works correctly using a temporary URL or a local hosts file override. This allows you to test the site without affecting live visitors.
Option A: Using a Temporary URL
- Check if your hosting provider provides a temporary URL (e.g.,
http://server-ip/~username). - Visit the temporary URL in a browser.
- Test all key pages, forms, and database connections.
Option B: Using the Local Hosts File
You can force your computer to resolve your domain to the new server's IP address.
- Windows: Open Notepad as Administrator. Open
C:\Windows\System32\drivers\etc\hosts. Add a new line at the bottom:[New Server IP] yourdomain.com. Save the file. - macOS/Linux: Open Terminal. Run
sudo nano /etc/hosts. Add[New Server IP] yourdomain.com. Save and exit. - Clear your browser cache or open an incognito window and visit
yourdomain.com. You are now viewing the new server. - Test contact forms, checkout processes, and user logins.
- Crucial: Remove the entry from your hosts file after testing to resume normal browsing.
Executing the Migration
1. Synchronise Dynamic Data
For sites with frequent updates, perform a final data sync immediately before switching DNS.
- Place the old site in maintenance mode to prevent new database entries.
- Export the most recent database dump from the old server.
- Import this final dump into the new server's database.
- Verify that the record counts match between the old and new databases.
2. Update DNS Records
Once the new environment is verified, point your domain to the new server.
- Access your DNS management panel at your domain registrar.
- Edit the
A recordfor your domain to point to the new server's IP address. - Update any
CNAME recordsfor subdomains (e.g.,www) if necessary. - Email Consideration: Ensure your
MX recordsare correctly configured. If you are moving email hosting along with the website, update theMX recordsat the same time as theA recordto minimise email downtime. If email remains with the current provider, do not change theMX records. - Click Save Changes to apply the new DNS configuration.
3. Verify the New Environment
Before announcing the migration is complete, confirm everything works as expected.
- Visit your website using a browser in incognito mode to avoid local caching.
- Test key functionality, such as contact forms, checkout processes, and user logins.
- Check that images, stylesheets, and scripts are loading from the new server.
- Use an online DNS propagation checker to confirm the new IP address is visible globally.
Troubleshooting Common Migration Failures
DNS Does Not Propagate
- Verify the
A recordIP address is entered correctly in your DNS panel. - Check that you lowered the TTL at least 24 hours prior to the change.
- Use a propagation checker tool to see if specific regions are still seeing the old IP.
- Clear your local DNS cache (Windows:
ipconfig /flushdns; macOS:sudo killall -HUP mDNSResponder).
Database Connection Errors After Switch
- Check your configuration file (e.g.,
wp-config.php) for the correct database name, username, password, and host. - Ensure the database user on the new server has the correct permissions assigned to the database.
- Verify the database server is running and accessible from the web server.
500 Internal Server Error After Migration
- Check the server error logs via your control panel (cPanel: Metrics > Errors; Plesk: Logs > Error Log).
- Ensure file permissions are set correctly (typically 644 for files and 755 for folders).
- Verify that the
.htaccessfile (Apache) orweb.config(IIS/Nginx) is compatible with the new server environment.
Post-Migration Checks
Monitor for Issues
Keep a close eye on the site for the first 24 to 48 hours.
- Monitor server error logs for
404or500errors. - Check analytics software for sudden drops in traffic, which may indicate DNS issues.
- Ensure marketing links in email campaigns and social media profiles still resolve correctly.
- Ask visitors to clear their browser cache if they see outdated content or styling, as local browser caching may persist after DNS updates.
Rollback Procedure
If critical issues are discovered on the new platform, follow these steps to revert to the old server:
- Ensure the old server remains running and has not been cancelled.
- Log in to your domain registrar or DNS management console.
- Edit the
A recordfor your domain and change the IP address back to the original server's IP. - Update any
CNAME recordsback to their previous values. - Click Save Changes.
- Wait for DNS propagation (based on your TTL setting) for traffic to return to the old server.
Decommission the Old Server
Do not cancel your old hosting account immediately.
- Keep the old server running for at least one week after the migration.
- Use this period as a rollback option if critical issues are discovered on the new platform.
- Once you are confident the migration is stable, back up the old server one final time and then cancel the service.
robots.txt file and sitemap are accessible on the new server so search engines can continue to index your content without interruption.Still Having Issues?
💻 Open a Ticket