MrSoft

How to Migrate Your Website to a New Host

A practical, step-by-step guide to moving your website to a new hosting provider without downtime or data loss.

MrSoft Editorial
Published 2026-08-13
In This Guide
  1. 1.When Should You Migrate?
  2. 2.Pre-Migration Checklist
  3. 3.Manual Migration: Files and Database
  4. 4.Migration Plugins for WordPress
  5. 5.Updating DNS After Migration
  6. 6.Testing Your Migrated Site
  7. 7.Common Migration Issues and Fixes
  8. 8.Free Migration Services From Hosts

When Should You Migrate?

Switching hosting providers is not something to do on a whim, but there are clear situations where migration is the right move:

  • Frequent downtime — if your site goes down regularly and your host cannot resolve the issue, your visitors and search rankings suffer
  • Slow performance — consistently slow load times that persist even after optimizing your site (caching, image compression, plugin cleanup)
  • Poor support — unresponsive or unhelpful customer support when you have technical issues
  • Price increases — renewal prices that are significantly higher than what competitors offer for equivalent features
  • Missing features — you need features your current host does not provide, such as staging environments, better backup options, or server locations closer to your audience

For Pakistani website owners, a common migration reason is moving to a host with servers closer to your audience or with better payment options in PKR. Check our comparison of hosting providers for Pakistan to see what alternatives are available.

Pre-Migration Checklist

Before you start moving anything, work through this checklist to avoid problems:

  1. Back up everything. Take a full backup of your website files and database from your current host. Download this backup to your local computer — do not rely solely on server-side backups.
  2. Note your current DNS settings. Log into your domain registrar and record your current nameservers, A records, MX records (for email), and any other DNS entries. You will need to recreate these on the new host.
  3. Check your email setup. If you use email through your hosting (like info@yourdomain.pk), you need to set up email on the new host before switching DNS, or your email will stop working.
  4. Verify your new hosting account is ready. Make sure your new hosting plan is active, your domain is added to the account, and you have access to the control panel and FTP/SFTP credentials.
  5. Check your domain lock status. If you also plan to transfer your domain, unlock it at your current registrar and obtain the authorization/EPP code.
Tip: Do not cancel your old hosting account until the migration is fully complete and verified. Keep it active for at least a week after DNS propagation finishes, so you have a fallback if anything goes wrong.

Manual Migration: Files and Database

Manual migration gives you full control over the process. It involves two main parts: transferring your files and transferring your database.

Transferring Files

  1. Connect to your old host via FTP/SFTP using a client like FileZilla
  2. Download your entire website directory (usually public_html or www) to your local computer
  3. Connect to your new host via FTP/SFTP using the credentials provided by your new hosting provider
  4. Upload all files to the correct directory on the new server

Transferring the Database

  1. Log into phpMyAdmin on your old host and export your database (use the "Quick" export method with SQL format)
  2. On your new host, create a new database and database user through the hosting control panel
  3. Open phpMyAdmin on the new host, select the new database, and import the SQL file you exported
  4. Update your site's configuration file to use the new database credentials. For WordPress, edit wp-config.php and change DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to match the new database details

For large databases, phpMyAdmin imports may time out. In that case, ask your new host's support to import the database via command line, or use a tool like MySQL Workbench.

Migration Plugins for WordPress

If your site runs on WordPress, migration plugins handle the technical work for you. These are the most commonly used options:

  • All-in-One WP Migration — exports your entire site (files, database, plugins, themes) as a single downloadable file. Install the plugin on both old and new sites, export from the old, import on the new. The free version has a file size limit; the paid extension removes it.
  • Duplicator — creates a package of your site that can be installed on the new server using an installer script. Works well for sites of all sizes and does not require the plugin to be installed on the destination.
  • UpdraftPlus — primarily a backup plugin, but its migration feature lets you back up your site to cloud storage and restore it on the new host. Useful if you already use UpdraftPlus for backups.
Tip: After importing with any migration plugin, go to WordPress Settings > Permalinks and click "Save Changes" (without changing anything). This regenerates your .htaccess file and prevents broken URLs on the new server.

Updating DNS After Migration

Once your site is set up and working on the new server, the final step is pointing your domain to the new host. You have two options:

Option 1: Change nameservers. Log into your domain registrar and replace the old nameservers with the ones provided by your new host. This hands over all DNS management to the new host. This is the simplest approach and what most hosts recommend.

Option 2: Update the A record. If you want to keep DNS management at your registrar (useful if you use services like Cloudflare or have complex DNS setups), update the A record for your domain to point to the new server's IP address. Remember to update both the root domain and the www subdomain.

DNS propagation takes time — typically a few hours, but it can take up to 48 hours for changes to reach all DNS servers worldwide. During this window, some visitors will see the old server and some will see the new one. This is normal and not something you can speed up.

For detailed DNS management instructions, see our DNS guide.

Testing Your Migrated Site

Before and after updating DNS, thoroughly test your site on the new server:

  • Preview before DNS changes — use your new host's temporary URL or modify your local hosts file to view the site on the new server before making it public
  • Check all pages — navigate through your key pages, blog posts, and any dynamic content to confirm everything displays correctly
  • Test forms and functionality — submit contact forms, test search, check user registration if applicable, and verify any e-commerce features
  • Verify SSL — make sure your SSL certificate is installed and working on the new host. Your browser should show the padlock icon on all pages.
  • Check email — send and receive test emails to confirm your email service is working on the new host
  • Test site speed — run a speed test to make sure performance on the new host meets your expectations

Common Migration Issues and Fixes

These are the problems that come up most frequently during migrations:

  • Broken images or links — often caused by hardcoded URLs in the database that reference the old server or a temporary URL. Use a search-and-replace tool (like Better Search Replace for WordPress) to update all URLs in the database.
  • White screen or 500 errors — usually a PHP version mismatch between old and new hosts, or incorrect database credentials in your configuration file. Check your PHP version settings and verify wp-config.php values.
  • Email stops working — if you used your old host for email, you need to set up email accounts on the new host and ensure MX records are configured correctly. This is easy to overlook.
  • Permalink issues (404 errors) — on Apache servers, this is usually a missing or misconfigured .htaccess file. Go to WordPress Settings > Permalinks and save to regenerate it.
  • Database import fails — large databases may exceed phpMyAdmin's upload limit. Ask your new host's support to import it via command line, or split the SQL file into smaller chunks.

Free Migration Services From Hosts

Many hosting providers offer free website migration as part of their plans. This is often the easiest option — their technical team handles the entire process, including files, database, email accounts, and DNS configuration.

When using a host's free migration service, you typically need to provide:

  • Your current hosting control panel login credentials
  • FTP/SFTP access to your current server
  • Details about which sites and email accounts to migrate

The migration team handles the transfer and notifies you when it is ready for review. You verify everything works, then they assist with the DNS switch.

For Pakistani users, this is particularly useful if you are not comfortable with the technical steps. Most migrations completed by hosting support teams are done within 24-48 hours. If you are looking for a host that offers this service, our website migration services page covers your options.

Tip: Even when using a free migration service, take your own backup before the process starts. Having an independent copy of your site ensures you are never dependent on either the old or new host for your data.

Frequently Asked Questions

How long does a website migration take?

The actual file and database transfer can take anywhere from 30 minutes to a few hours depending on your site's size. However, DNS propagation — the time it takes for your domain to point to the new server worldwide — can take up to 24-48 hours. During this period, some visitors may see the old site while others see the new one.

Will my website go down during migration?

If done correctly, downtime should be minimal or zero. The standard approach is to set up everything on the new host first while your old site stays live. You only switch DNS once the new copy is working. During DNS propagation, both the old and new servers serve traffic, so visitors always see a working site.

Can I migrate my website without technical knowledge?

Yes. Many hosting providers offer free migration services where their team handles everything for you. WordPress migration plugins like All-in-One WP Migration also simplify the process to a few clicks. If your site is on a standard CMS, you likely do not need to touch any code.

Do I need to re-purchase my domain when switching hosts?

No. Your domain registration is separate from hosting. When you migrate, you keep your domain with your current registrar and simply update its DNS records (nameservers or A record) to point to the new host. You do not need to transfer your domain unless you want to consolidate everything with one provider.

Will migration affect my search engine rankings?

A properly executed migration should not affect your rankings. Keep the same URLs, page structure, and content. Ensure SSL is active on the new host. If your URLs change for any reason, set up 301 redirects from old URLs to new ones. Temporary ranking fluctuations during DNS propagation are normal and resolve quickly.

Recommended Next Steps