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
Migrating a business website to a new hosting provider requires careful planning to minimise disruption. While true "zero-downtime" is difficult to achieve due to DNS propagation, you can move your files, databases, and email while keeping your site accessible to the vast majority of visitors. The key is to set up and verify the new environment before changing your domain's DNS records.
Pre-Migration Checklist
Before you begin moving any data, gather the necessary access credentials and information for both your current and new hosting providers.
- FTP or SFTP credentials for both hosts.
- 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.
Detailed Instructions
Step 1: Set Up the New Hosting Environment
- Sign up for your new hosting plan and add your domain name to the new account.
- Create a new database on the new server via your hosting control panel.
- Create a database user with full permissions for that database.
Step 2: Migrate Website Files
- Connect to your current host using an FTP client like FileZilla.
- Download all website files from the
public_htmlorwwwdirectory to your local computer. - Connect to your new host using the same FTP client.
- Upload the files to the corresponding directory on the new server.
Step 3: Migrate the Database
- Log into
phpMyAdminon your current host. - Select your website's database and click the Export tab.
- Choose the Quick export method and click Go to download the
.sqlfile. - Log into
phpMyAdminon your new host. - Select the new database you created and click the Import tab.
- Upload the
.sqlfile and click Go to import the data.
Step 4: Update Configuration Files
Your website needs to know where the new database is located. You will need to edit your configuration file (e.g., 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 new host's credentials.
- Update the database host if it is not
localhost. - Save the file and upload it to the new server, overwriting the existing version.
Step 5: Test the New Environment
Before changing your DNS, you need to verify the site works on the new server without affecting your live visitors.
- Find the IP address of your new hosting server in your new provider's dashboard.
- Edit your local computer's
hostsfile to point your domain to that new IP address. - On Windows, the file is located at
C:\Windows\System32\drivers\etc\hosts. - On macOS, use the Terminal and run
sudo 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 6: Update DNS Records
Once you have verified the new site is working, you can point your domain to the new host.
- 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.
- Save the changes.
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.
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