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.
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.
- FTP or SFTP credentials for both hosts.
- SSH access credentials (recommended for direct server-to-server transfers).
- Database access details (username, password, and database name).
- Access to your domain registrar's DNS management panel.
- A full backup of your current website files and databases.
- Details of your current email hosting setup, including MX records.
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.
- Log into your domain registrar's management portal.
- Navigate to the DNS Management section.
- Locate your
Arecord and anyCNAMErecords for your domain. - Edit the TTL value and set it to
300seconds (5 minutes). - Click Save or Update Record.
Step 2: Set Up the New Hosting Environment
- Sign up for your new hosting plan and add your domain name to the new account via the hosting control panel.
- Create a new database on the new server. In cPanel, click MySQL Databases, enter a name, and click Create Database.
- Create a database user. Click MySQL Databases, scroll to MySQL Users, enter a username and password, and click Create User.
- 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.
- Connect to your new server via SSH using your terminal or an application like PuTTY.
- Use the
rsynccommand 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/ - Alternatively, use the migration tool provided by your new hosting control panel. Look for Transfer Tool or Website Migration in the dashboard menu.
- 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.
- Log into your current hosting control panel and open
phpMyAdmin. - If your site is dynamic, put the site into maintenance mode or temporarily disable forms and checkout functions.
- Select your website's database from the left-hand panel.
- Click the Export tab in the top navigation menu.
- Choose the Quick export method and ensure the format is set to SQL.
- Click Go to download the
.sqlfile to your local computer. - Log into
phpMyAdminon your new host. - Select the new database you created in Step 2.
- Click the Import tab.
- Click Choose File, select your
.sqlfile, 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.
- Open the configuration file in a text editor.
- Update the database name, username, and password to match the credentials you created on the new host.
- Update the database host. On most shared hosting environments this remains
localhost, but some providers use a specific hostname such asmysql.yourhost.com.au. - Save the file.
- Upload the updated file to the new server, overwriting the existing version in your
public_htmlorwwwdirectory.
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.
- Log into your new hosting control panel.
- Navigate to SSL/TLS Manager or Security > SSL/TLS Status.
- Install your certificate. If you use Let's Encrypt, click Install next to your domain.
- Visit your site using the temporary URL provided by your host or via your local
hostsfile entry. - Check for the padlock icon in your browser's address bar.
- 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.
- Find the IP address of your new hosting server in your provider's dashboard.
- For shared hosting environments that rely on Server Name Indication (SNI) or virtual hosts, the
hostsfile method may not work correctly. Instead, use the temporary URL or staging domain provided by your new host. - If you choose to edit your local
hostsfile, on Windows the file is located atC:\Windows\System32\drivers\etc\hosts. On macOS, use the Terminal and runsudo nano /etc/hosts. - Add a line at the bottom:
123.45.67.89 yourdomain.com.au(replace with your actual IP and domain). - Visit your website in a browser. You are now viewing the new server while the rest of the world still sees the old one.
- Test all forms, shopping carts, and login pages to ensure functionality.
- Remove the entry from your
hostsfile 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.
- Log into your domain registrar's management portal.
- Navigate to the DNS Management or Nameservers section.
- Update your
Arecord to point to the new server's IP address. - If changing nameservers, enter the new nameservers provided by your new host.
- Review your
MXrecords. If you are moving email hosting as well, update the MX records to point to your new email provider. - If you are keeping email with your current provider, ensure the MX records remain unchanged.
- Click Save or Update.
Troubleshooting
Website displays a database connection error
- Double-check the database username and password in your configuration file.
- Ensure the database user has been granted permissions to the database on the new server.
- Verify that the database host is correct (usually
localhost, but some providers use a specific hostname).
Images or styles are missing after migration
- Ensure all folders were uploaded and that file permissions are set correctly (usually 755 for folders and 644 for files).
- Clear your browser cache or view the site in an incognito window.
DNS changes are not reflecting
- Use a DNS propagation checker tool to see if the new IP is being recognised globally.
- Flush your local DNS cache. On Windows, open Command Prompt and run
ipconfig /flushdns. On macOS, runsudo killall -HUP mDNSResponderin Terminal.
Email delivery issues after DNS change
- Check that your
MXrecords point to the correct email server. - Ensure SPF and DKIM records are updated if you have changed email providers.
- Wait for DNS propagation to complete. Email delivery may be intermittent during this period.
- Contact your email provider to verify that incoming mail is not being queued or rejected.
SSL certificate warnings
- Ensure the SSL certificate is installed for the correct domain name.
- Check that your site is not loading mixed content (HTTP resources on an HTTPS page).
- Force HTTPS in your website configuration or CMS settings.
- If using a temporary URL for testing, note that the certificate may not match that URL. This is normal and does not indicate a problem with your live domain.
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?
💻 Open a Ticket