Home › Knowledgebase › KB-1138

How to Move Your Business Website to a New Host Without Any Downtime

Summary

This guide helps you troubleshoot and resolve: How to Move Your Business Website to a New Host Without Any Downtime. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

Pre-Migration Checklist

Before you begin moving any data, gather the necessary access credentials and information for both your current and new hosting providers. Planning these steps in advance helps minimise disruption to your business operations.

Detailed Instructions

Step 1: Lower DNS TTL Values

At least 24 hours before you plan to migrate, lower the Time to Live (TTL) value on your domain's DNS records. This tells DNS servers to check for updates more frequently, reducing the time it takes for changes to propagate globally.

  1. Log into your domain registrar's management portal.
  2. Navigate to the DNS Management section.
  3. Locate your A record and any CNAME records for your domain.
  4. Edit the TTL value and set it to 300 seconds (5 minutes).
  5. Click Save or Update Record.

Step 2: Set Up the New Hosting Environment

  1. Sign up for your new hosting plan and add your domain name to the new account via the hosting control panel.
  2. Create a new database on the new server. In cPanel, click MySQL Databases, enter a name, and click Create Database.
  3. Create a database user. Click MySQL Databases, scroll to MySQL Users, enter a username and password, and click Create User.
  4. Add the user to the database. Under Add User to Database, select the user and database, click Add, and select All Privileges. Click Make Changes.

Step 3: Migrate Website Files

Instead of downloading files to your local computer and re-uploading them, use a direct server-to-server transfer. This is faster and reduces the risk of file corruption or incomplete transfers.

  1. Connect to your new server via SSH using your terminal or an application like PuTTY.
  2. Use the rsync command to transfer files directly from the old host to the new host. For example: rsync -avz user@old-host.com:/home/user/public_html/ /home/user/public_html/
  3. Alternatively, use the migration tool provided by your new hosting control panel. Look for Transfer Tool or Website Migration in the dashboard menu.
  4. Verify that all files have transferred by comparing file counts and sizes between the two servers.

Step 4: Migrate the Database

For dynamic websites such as e-commerce stores or membership portals, you must stop writes to the database before the final export. This prevents data loss caused by new orders or user registrations occurring during the migration.

  1. Log into your current hosting control panel and open phpMyAdmin.
  2. If your site is dynamic, put the site into maintenance mode or temporarily disable forms and checkout functions.
  3. Select your website's database from the left-hand panel.
  4. Click the Export tab in the top navigation menu.
  5. Choose the Quick export method and ensure the format is set to SQL.
  6. Click Go to download the .sql file to your local computer.
  7. Log into phpMyAdmin on your new host.
  8. Select the new database you created in Step 2.
  9. Click the Import tab.
  10. Click Choose File, select your .sql file, and click Go to import the data.

Step 5: Update Configuration Files

Your website needs to connect to the new database. You will need to edit your configuration file, such as wp-config.php for WordPress or config.php for other platforms.

  1. Open the configuration file in a text editor.
  2. Update the database name, username, and password to match the credentials you created on the new host.
  3. Update the database host. On most shared hosting environments this remains localhost, but some providers use a specific hostname such as mysql.yourhost.com.au.
  4. Save the file.
  5. Upload the updated file to the new server, overwriting the existing version in your public_html or www directory.

Step 6: Install and Verify SSL Certificate

Before you update your DNS records, ensure your SSL certificate is installed and working on the new server. Visitors accessing the site via a temporary URL or hosts file entry should not see certificate warnings.

  1. Log into your new hosting control panel.
  2. Navigate to SSL/TLS Manager or Security > SSL/TLS Status.
  3. Install your certificate. If you use Let's Encrypt, click Install next to your domain.
  4. Visit your site using the temporary URL provided by your host or via your local hosts file entry.
  5. Check for the padlock icon in your browser's address bar.
  6. If you see a certificate warning, contact your hosting provider before proceeding to DNS changes.

Step 7: Test the New Environment

Before changing your DNS, verify the site works on the new server without affecting your live visitors.

  1. Find the IP address of your new hosting server in your provider's dashboard.
  2. For shared hosting environments that rely on Server Name Indication (SNI) or virtual hosts, the hosts file method may not work correctly. Instead, use the temporary URL or staging domain provided by your new host.
  3. If you choose to edit your local hosts file, on Windows the file is located at C:\Windows\System32\drivers\etc\hosts. On macOS, use the Terminal and run sudo nano /etc/hosts.
  4. Add a line at the bottom: 123.45.67.89 yourdomain.com.au (replace with your actual IP and domain).
  5. Visit your website in a browser. You are now viewing the new server while the rest of the world still sees the old one.
  6. Test all forms, shopping carts, and login pages to ensure functionality.
  7. Remove the entry from your hosts file after testing so your computer resolves the domain via public DNS again.

Step 8: Update DNS Records and Email Settings

Once you have verified the new site is working, point your domain to the new host. Changing DNS can disrupt email service if your MX records are not updated correctly.

  1. Log into your domain registrar's management portal.
  2. Navigate to the DNS Management or Nameservers section.
  3. Update your A record to point to the new server's IP address.
  4. If changing nameservers, enter the new nameservers provided by your new host.
  5. Review your MX records. If you are moving email hosting as well, update the MX records to point to your new email provider.
  6. If you are keeping email with your current provider, ensure the MX records remain unchanged.
  7. Click Save or Update.

Troubleshooting

Website displays a database connection error

Images or styles are missing after migration

DNS changes are not reflecting

Email delivery issues after DNS change

SSL certificate warnings

If you encounter issues during your migration that you cannot resolve, you can Open a Ticket for assistance from our Brisbane-based support team.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket