Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
Hosting & Care Guide

How to Move WordPress to a New Host Without Downtime

Plugin and manual methods to migrate WordPress, with WP-CLI commands, safe search and replace, hosts-file testing, DNS switching and common fixes.

Migrate WordPress to new host: WordPress site moving from one server to another

To move a WordPress site to a new host without downtime: take a full backup, copy the files and database to the new server (with a migration plugin or manually), update wp-config.php with the new database details, test the site on the new server before changing DNS by editing your computer's hosts file, then point the domain to the new server and keep the old one running for a couple of days. Email, SSL and scheduled tasks need their own checks. This guide covers both the plugin method and the manual method, with the exact commands. This guide explains how to migrate WordPress to new host step by step.

Key takeaways
  • Never cancel the old hosting until the new site, email and SSL are confirmed working.
  • Lower the DNS TTL a day before the move so the switch is quick.
  • Test on the new server through your hosts file before changing DNS.
  • If the domain or URL changes, run a serialisation-safe search and replace, not a plain SQL replace.

Step 1: Prepare

  • Take a complete backup (files and database) and download it. See our backup guide.
  • Note the PHP version, PHP extensions and memory limit on the old host, and match them on the new one.
  • List everything that is not WordPress: email accounts, subdomains, cron jobs, other folders.
  • Lower the TTL of your DNS records to 300 seconds at least a day before. Our DNS guide explains why.
  • Pause content changes and, for stores, schedule the move for a quiet time.

Option A: Migrate with a plugin

PluginNotes
All-in-One WP MigrationSimple export/import file; free version has an upload size limit
DuplicatorCreates a package and an installer script for the new server
Migrate GuruServer-to-server transfer, good for large sites
Host migration toolsMany hosts, including Hostinger and others, offer free migration

Install WordPress on the new server, install the same plugin, import, then log in with the old site's credentials. Plugins work well for most sites under a few gigabytes.

Option B: Migrate manually

1. Export the database from phpMyAdmin (Export → Quick → SQL) or with WP-CLI over SSH: Also, this is one of the easiest ways to migrate WordPress to new host.

wp db export site.sql

2. Copy the files. Compress the site folder and download it, or copy server to server:

# On the old server
tar -czf site.tar.gz -C /home/user/public_html .

# On the new server
scp user@old-server:/home/user/site.tar.gz .
tar -xzf site.tar.gz -C /home/newuser/public_html

3. Create a new database and user in the new hosting panel, then import:

wp db import site.sql
# or: mysql -u newuser -p newdb < site.sql

4. Update wp-config.php:

define( 'DB_NAME', 'newdb' );
define( 'DB_USER', 'newuser' );
define( 'DB_PASSWORD', 'use-the-new-password' );
define( 'DB_HOST', 'localhost' );

Check whether the table prefix ($table_prefix) matches the imported tables.

Migrate WordPress to new host: if the domain or URL changes

WordPress stores URLs inside serialised data, so a plain SQL find-and-replace can corrupt widgets and settings. Use WP-CLI or a plugin like Better Search Replace:

wp search-replace 'https://old-domain.com' 'https://www.new-domain.com' --skip-columns=guid --dry-run
wp search-replace 'https://old-domain.com' 'https://www.new-domain.com' --skip-columns=guid

Run the dry run first to see how many replacements will happen. Then set up 301 redirects from the old domain; see our redirects guide.

Step 2: Test before switching DNS

Point your own computer at the new server while everyone else still sees the old one. Edit the hosts file:

  • Windows: C:\Windows\System32\drivers\etc\hosts (open Notepad as administrator)
  • macOS and Linux: /etc/hosts
203.0.113.25  example.com
203.0.113.25  www.example.com

Then browse the site and check: home page, inner pages, images, forms, login, checkout for stores, and permalinks (if inner pages show 404, re-save Settings → Permalinks). Remove the lines after testing.

Step 3: Switch DNS and finish

  1. Update the A record (or nameservers) to the new server.
  2. Issue the SSL certificate on the new host once the domain resolves there, and confirm HTTPS works without warnings.
  3. Recreate email accounts and MX records if email moves too, or keep MX pointing to your email provider.
  4. Set up cron jobs, server-side caching and backups on the new host.
  5. Keep the old hosting live for 48 to 72 hours. For stores, check the old server for any orders placed during the switch.
  6. Clear caches and test speed; see how to check website speed.

Migrate WordPress to new host: common migration problems

ProblemLikely fix
"Error establishing a database connection"Wrong DB name, user, password or host in wp-config.php
Inner pages 404Re-save permalinks; check .htaccess copied (hidden file)
Images missingwp-content/uploads not fully copied, or old URLs in content
Redirect loopsiteurl/home mismatch or SSL settings; see our too many redirects guide
White screen or critical errorPHP version or missing extension; see our critical error guide

Migrate WordPress to new host: frequently asked questions

Migrate WordPress to new host: will moving hosts affect my SEO?

Not if URLs stay the same and downtime is avoided. Rankings depend on content and URLs, not on which server hosts them.

How long does a migration take?

The copy usually takes under an hour for a small site. DNS changes then reach most visitors within minutes to a few hours if TTL was lowered.

Related guides: WordPress Security Hardening, How to Update the PHP Version of Your WordPress Site Safely and How to Speed Up a WordPress Website.

For official guidance, see the official WordPress documentation.

Want us to move your site?

We migrate WordPress sites and stores with no downtime and no lost orders as part of our hosting and maintenance services. Contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026