Managed technical services across Canada
Proudly Canadian

Guide

How to Migrate Your Website to a Canadian Server: Step by Step

Moving to a Canadian server is simpler than most businesses expect. This step-by-step guide covers pre-migration backup, server setup, testing with the hosts file, DNS TTL strategy, and how to confirm the migration completed successfully before cancelling the old account.

Editorial process: This article was created with AI assistance and prepared for publication by Gotekky.

Quick answer

What to check first

Moving to a Canadian server is simpler than most businesses expect. This step-by-step guide covers pre-migration backup, server setup, testing with the hosts file, DNS TTL strategy, and how to confirm the migration completed successfully before cancelling the old account.

Moving a website from US hosting to a Canadian server is something most businesses can accomplish in a few hours with minimal downtime. The process is predictable if you follow a defined sequence, and the steps below are the same ones professional migration teams use for production site moves.

Step 1: Back up everything before touching anything

Do not start migrating until you have a verified local backup of everything. This means your website files, your database, your email data if you are migrating email, and any configuration files. Download the backup to your local computer, not just to another directory on the same server. The goal is a copy you control independently of the current host.

For WordPress, use a plugin like All-in-One WP Migration or Duplicator to create a single exportable package. For other sites, download all files via SFTP or FTP and export the database using phpMyAdmin or the command line. Verify the backup by checking the file sizes are what you expect. A 50 MB WordPress database export that comes out at 2 KB has not exported correctly.

Step 2: Lower your DNS TTL now, before migration day

DNS records have a Time to Live setting that tells resolvers how long to cache the record. The default is commonly 3600 seconds, meaning one hour. When you change your DNS to point at the new Canadian server, it can take up to one hour for users worldwide to see the change. Lower your A record TTL to 300 seconds 24 hours before migration day. This shortens the propagation window to about five minutes when you make the final switch. After the migration is stable, you can raise it back to 3600 or higher.

To lower the TTL, log into wherever your DNS is managed. If your domain uses Cloudflare, this is in the Cloudflare DNS tab. If it is at your registrar, it is in their DNS management panel. Change the TTL value on your A record for the root domain and for the www subdomain.

Step 3: Set up the new Canadian server before touching DNS

Get the new server fully configured before you change any DNS. Upload your files, import your database, configure your PHP version, and make sure the application is working correctly on the new server before anyone else sees it. For a cPanel or Webuzo environment, this means: create the hosting account, upload files via SFTP, create the database and database user, import the SQL dump, and update configuration files that reference the old host or old IP.

For WordPress specifically, update wp-config.php with the new database credentials. If your old site used a different domain in the database, run a search-replace on the database to update any hardcoded URLs. The search-replace command needs to handle serialized PHP data correctly; use a tool like WP-CLI rather than a plain SQL replace to avoid corrupting serialized data.

Step 4: Test the new server before switching DNS

Edit your local hosts file to point your domain at the new server's IP address. This makes your computer connect to the new server while everyone else still sees the old one. On Mac and Linux, the file is at /etc/hosts. On Windows, it is at C:\Windows\System32\drivers\etc\hosts. Add a line in this format:

203.0.113.45  yourdomain.com www.yourdomain.com

Replace 203.0.113.45 with your new Canadian server's IP address. Save the file, clear your browser cache, and test your site thoroughly. Click through the checkout process if you have one. Submit a test contact form. Check that email sending works from a test form. Verify that media files load and that any integrations with external services are responding correctly. This testing step is the most important one. Finding a problem here costs nothing. Finding it after you have switched DNS means downtime for real users.

Step 5: Switch DNS and monitor both servers

When testing passes, update your DNS A record to point at the new Canadian server IP. Because you lowered the TTL to 300 seconds earlier, most users worldwide will be hitting the new server within five to ten minutes. Keep both the old server and the new server running for at least 48 hours after the DNS switch. Monitor the access logs on the old server; when traffic stops arriving there, the propagation is complete. Keep the old hosting account active for at least a week as a fallback, then cancel it once you are confident everything is running correctly on the new server.

When to get professional help with the migration

Some migration scenarios are genuinely complex: large databases, custom server configurations, e-commerce stores with active orders during cutover, or multi-server environments that require coordination. Gotekky plans and performs migrations into supported managed environments, between providers, and as part of recovery work. The scope, validation steps and rollback expectations are defined before the move begins.

Gotekky

Need help deciding what to do next?

Tell us what you are seeing and what outcome you need. We will identify whether a managed service, scoped project or paid technical assessment is the right next step.