How to Migrate Your Website to a New Host

Why Migrate to a New Host?

At some point, almost every website owner faces the need to move their site to a different hosting provider. Whether it's sluggish load times, unreliable uptime, poor support, or simply outgrowing your current plan, migrating your website is a normal part of managing an online presence.

The most common reasons for switching hosting providers include:

The good news is that migrating a website is not as scary as it sounds. When done correctly, you can move your entire site with near-zero downtime.

Migration Overview: The Full Process

Before diving in, understand the end-to-end workflow so nothing gets skipped:

  1. Sign up for new hosting and receive your login credentials
  2. Back up all website files from the old host
  3. Export the MySQL database from the old host
  4. Upload files to the new hosting account
  5. Import the database and update connection settings
  6. Test the website via IP address or temporary URL
  7. Point DNS records to the new hosting server
  8. Wait for DNS propagation and verify everything is working
  9. Cancel the old hosting plan

Pre-Migration Checklist

Most migration failures aren't caused by difficult technical steps — they're caused by incomplete preparation. A clear checklist ensures you don't forget critical information that becomes impossible to retrieve once the old account is closed. Before you start the actual move, gather and verify every item below:

Item to Prepare Details
Old hosting credentials Control panel, FTP/SFTP, and MySQL logins — record them before cancelling
Domain / DNS access You must be able to edit A records / nameservers — this is the real cutover point
Email account list Note every mailbox user/password and the current MX record so nothing is missed
PHP version and extensions Check which PHP version the site runs and any special extensions it needs
Site and database size Total size determines the migration method (manual vs plugin) and target plan
Current SSL certificate Know which certificate you use and its expiry, so you can reissue on the new host

Once you've collected everything, schedule the migration in advance and avoid peak-traffic windows such as promotions or rush hours, notifying any stakeholders beforehand. This handful of minutes spent preparing pays off enormously by making the following steps smoother and dramatically reducing the risk of data loss.

Step 1: Back Up Files from Your Old Host

Backing up is the single most important step — never skip it, no matter how confident you feel about the migration.

Backup via Control Panel File Manager

The simplest approach is to log in to your old hosting control panel, open File Manager, select all files and folders inside public_html, right-click and choose Compress to create a .zip archive, then download it to your local machine.

Backup via FTP/SFTP

Alternatively, use an FTP client such as FileZilla to connect via SFTP and drag all website files to your computer. This method works better for large sites where compressing through the control panel could time out.

Export Your MySQL Database

If your website uses a database (WordPress, WooCommerce, etc.), export it too. Open phpMyAdmin from your old control panel, select the database, click Export, choose SQL format, and click Go to download the .sql file.

Pro tip: Before exporting, note down the database name, DB username, and DB password from your wp-config.php file. You will need these values when setting up the database on the new host.

Step 2: Upload Files to the New Host

Once you have your new hosting account — you will receive a welcome email with DirectAdmin login details — follow these steps:

Create a Database on the New Host

Log in to DirectAdmin on the new host, navigate to MySQL Management, and create a new database along with a dedicated user and password. Write down the DB name, DB user, DB password, and DB host (usually localhost).

Import the Database

Open phpMyAdmin on the new host, select the newly created database, click Import, choose the .sql file you exported earlier, and click Go. For databases larger than 50 MB, consider using BigDump or WP-CLI instead.

Upload Website Files

Go to File Manager in DirectAdmin on the new host, navigate to the public_html folder, upload the .zip archive, then right-click the file and choose Extract.

Update the Config File

For WordPress, open wp-config.php and update these values to match your new database:

For other CMS platforms, update the equivalent config file — configuration.php for Joomla, settings.php for Drupal, and so on.

Step 3: Test Before Changing DNS

This is the step most people skip, yet it's what keeps your site running during migration. Test everything on the new host before touching DNS and your users will never experience downtime.

Test via IP Address

DirectAdmin displays your server's IP address in the dashboard. You can access your site directly via this IP to verify basic functionality. Note that internal links may point to your domain name, so focus on verifying the homepage and critical pages first.

Test via Hosts File

For more thorough testing, temporarily edit your computer's Hosts file to point your domain to the new server's IP — without affecting live visitors who still use the old DNS:

Remove this line after testing. This gives you 100% confidence that the site works on the new host before flipping DNS.

What to test: Homepage, login page, contact forms, checkout/payment flow (if applicable), all images loading correctly, page speed, and HTTPS — confirm the SSL certificate is active and working on the new server.

Step 4: Update DNS to Point to the New Host

Once you have confirmed the site works perfectly on the new host, log in to your domain registrar or DNS provider and update the A Record for both the root domain and www to point to the new server's IP address.

TTL and Propagation Time

DNS propagation is the time it takes for updated DNS records to spread across global resolvers. This typically takes 1–48 hours, though in practice most changes are visible within 2–4 hours. To speed it up, lower the TTL of your existing DNS records to 300 seconds (5 minutes) at least 24 hours before making the change.

During propagation, your site stays live — some visitors will hit the old host, others the new one, depending on their ISP's DNS cache. This is why you must not delete files from the old host until propagation is fully complete.

Verify Propagation

Use tools like whatsmydns.net or dnschecker.org to check whether your domain's DNS has updated across global regions. Once all regions show the new IP, the transfer is complete.

Migrating Without Downtime (Lower TTL, Move Files + DB, Test Before DNS Switch)

The key to a zero-downtime migration is to "fully prepare the new site first, then switch DNS as the very last step" — not to take the old site offline and start migrating. Doing the latter keeps your site down for the entire time you upload and test. The correct sequence for zero downtime is:

  1. Lower the TTL in advance: Edit the TTL of your existing A record down to 300 seconds at least 24 hours before migration day, so global DNS caches expire quickly at cutover.
  2. Move all files and the database first: Upload every file and import the database onto the new host completely — while the old site stays online and serving visitors normally. Users notice nothing.
  3. Test the new host via your Hosts file: Force your own machine to see the new site before anyone else, and verify every important page and function passes.
  4. Switch DNS as the final step: Only when you're confident, change the A record to the new IP. Because the TTL is already low, propagation is fast and users barely feel the transition.

While DNS is still propagating, both the old and new sites run in parallel with identical content, so visitors always reach a working site no matter which server they hit. This is exactly why you must not edit content or delete files on the old host until propagation is fully complete — otherwise some visitors may see an outdated version with mismatched data.

Watch out for live databases: If your site writes data constantly — such as an online store taking continuous orders — export the database one final time right before the DNS switch, or enable a brief maintenance mode, to ensure no new orders are lost during the move.

Migrating WordPress Specifically (wp-config, Database, Search-Replace URL)

WordPress has unique migration details because the site URL is stored in many places throughout the database — in the options table, inside post content, and in various metadata. A correct manual migration involves three critical parts:

1. Configure wp-config.php Correctly

After uploading the files and creating a new database on the destination host, update DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST in wp-config.php to match the new database. If the destination host uses a different table prefix, make sure the $table_prefix value matches what you imported — otherwise WordPress won't see the tables.

2. Verify the Table Prefix and Database Integrity

Open phpMyAdmin on the new host and confirm all tables (typically prefixed with wp_) imported completely with no errors. If the database is large and a single import fails, use the WP-CLI command wp db import, which isn't bound by phpMyAdmin's execution time limits.

3. Search-Replace URLs in the Database

If the domain stays the same (you're only changing hosts, not the site name), you usually don't need a search-replace. But if you change domains, or move from HTTP to HTTPS, you must replace the old URL with the new one across the entire database. Never use a raw SQL UPDATE statement, because WordPress stores some values as serialized data that records character lengths — a raw replacement corrupts it. The safe methods are:

After migrating, go to Settings → Permalinks in the WordPress admin and click Save Changes once to rebuild the .htaccess rules, preventing 404 errors on post pages.

Migrating WordPress with a Plugin

For WordPress sites, dedicated migration plugins combine files and database into a single streamlined process — ideal for non-technical users.

All-in-One WP Migration

One of the most beginner-friendly migration plugins available. Install it on the old site, click Export — it produces a single .wpress file containing everything. Install a fresh WordPress on the new host, add the same plugin, then Import the .wpress file. Migration complete.

Note: the free version has a 512 MB import limit. For larger sites, use the Pro version or the manual method described above.

Duplicator

Another popular option that creates an Installer file plus an Archive, allowing deployment on the new host without a pre-existing WordPress install. Preferred by developers who want more control over the migration process.

Common Mistakes to Avoid

Based on over 19 years of hosting experience at AsiaGB, these are the errors customers most frequently encounter when moving hosts:

Tips for Minimizing Downtime

Follow these practices to achieve near-zero downtime during migration:

Free migration with AsiaGB: When you sign up for a new hosting plan with AsiaGB, our team will help migrate your website from your old host — whether it's WordPress or a static site — at no extra charge. Submit a ticket after signing up and we will take care of it.

After Migration: Final Checks

A successful migration doesn't end when DNS propagates. Run through these post-migration checks:

Post-Migration Verification: SSL, Email, and Broken Links

Many people assume that once the homepage loads, the migration is done. In reality, three areas commonly fail silently after a hosting move and hurt both SEO and your business if left unchecked:

1. Verify SSL and HTTPS

An SSL certificate does not move with your files automatically — you must reissue one on the destination host. With DirectAdmin on AsiaGB, you can issue a free Let's Encrypt certificate in a few clicks. After issuing it, confirm that every page loads over https://, that there are no Mixed Content warnings (images or scripts still loading over http://), and that HTTP automatically redirects to HTTPS. Use an SSL Server Test tool to verify the certificate chain is complete.

2. Verify the Email System

If you use email on the same domain as the website, recreate all mailboxes on the new host first, then point the MX record to the new server. Test both sending and receiving by exchanging test emails with an external account such as Gmail, and check that they don't land in spam. To keep old messages, use IMAP migration or download them via a mail client before closing the old service.

3. Check for Broken Links and Assets

After migration, internal links, images, downloadable files, or certain scripts may still point to old paths that no longer exist. Use a crawler like Screaming Frog or Broken Link Checker to scan the whole site for 404s, then open the browser Developer Console (F12) to spot any asset that fails to load. Also check Google Search Console 2–3 days after the move to confirm crawl errors haven't spiked abnormally — a sign that pages or files are missing.

Frequently Asked Questions About Hosting Migration

How long will my site be offline during migration?

If you follow the zero-downtime sequence — prepare the new site, test it via your Hosts file, then switch DNS as the final step — your site is barely offline at all, because both servers run in parallel while DNS propagates. The AsiaGB team handles migrations aiming for zero downtime.

Does migrating hosting affect my SEO rankings?

Done correctly, with identical content, URLs, and site structure, it does not affect rankings. Google simply sees the site change IP, which is normal. The things to watch are: don't let the site stay down for long, avoid generating many 404s, and keep SSL working continuously. Cover those three and your rankings stay steady.

How long should I keep the old hosting after migrating?

Keep the old hosting active for at least 3–7 days after the DNS switch so propagation completes worldwide and you can roll back if needed. Once you've confirmed the new site works, email sends and receives, and there are no errors, you can cancel the old plan.

Does AsiaGB really migrate my site for free?

Yes. When you sign up for new hosting with AsiaGB, our team helps migrate your website from your old host — whether WordPress or a general site — at no extra charge, aiming for zero downtime. Just submit a ticket after signing up.

Move Your Website to AsiaGB Today

Thai web hosting on SSD with DirectAdmin, automatic backup twice a month, 99% uptime — starting at just 500 THB/year. Trusted since 2007.

View Hosting Plans