Moving your WordPress site to a new hosting provider can feel intimidating. Will your site break? How long will it be down? What if something goes wrong?
The good news: with the right process, WordPress migration can be completed with zero downtime and zero lost data. This guide walks through the exact step-by-step process used by professionals to migrate WordPress sites safely and efficiently.
💡 Who This Guide Is For
This guide covers DIY migration for those comfortable with WordPress, SFTP, and databases. If you prefer professional migration with guaranteed zero downtime, Host Anchor provides free expert migration with all new hosting accounts.
Table of Contents
- Before You Start: Pre-Migration Checklist
- Migration Methods Compared
- Zero-Downtime Migration Process
- Step 1: Backup Your Current Site
- Step 2: Prepare New Hosting Environment
- Step 3: Transfer Files to New Host
- Step 4: Migrate and Configure Database
- Step 5: Test Before DNS Change
- Step 6: Update DNS for Cutover
- Step 7: Post-Migration Checklist
- Troubleshooting Common Migration Issues
Before You Start: Pre-Migration Checklist
Successful migrations start with preparation. Complete these tasks before beginning:
Pre-Migration Checklist
Select a new hosting provider that meets your performance, support, and budget requirements. Consider local hosting providers for better support and performance.
Note PHP version, active plugins, theme, custom configurations, email settings, and any server-specific customizations.
Ensure you can access your domain registrar account to update nameservers or DNS records. Reset password if needed.
24-48 hours before migration, lower your DNS TTL to 300 seconds (5 minutes) so DNS changes propagate quickly during cutover.
Back up both files and database immediately before migration. Download backups locally as a safety net.
Plan DNS cutover during your lowest traffic hours (usually 2-4 AM in your local time zone).
WordPress Migration Methods Compared
There are three primary approaches to WordPress migration, each with advantages and limitations:
Method 1: Plugin-Based Migration (Easiest)
Best for: Small to medium sites, users uncomfortable with technical processes
Popular Plugins:
- Duplicator Pro: Creates complete site archive and installer script. Handles migration in one package.
- All-in-One WP Migration: Simple export/import process with drag-and-drop interface.
- UpdraftPlus: Backup plugin that includes migration tools to transfer backups between hosts.
Advantages:
- User-friendly with guided wizards
- Handles both files and database in one process
- Automatically updates URLs and paths
- No need for SFTP or database management skills
Limitations:
- May struggle with very large sites (5GB+)
- Can timeout on budget hosting with low resource limits
- Some features require premium versions ($50-100)
- Still requires basic WordPress knowledge
Method 2: Manual Migration (Most Control)
Best for: Large sites, developers, those wanting complete control
Advantages:
- Works for sites of any size
- No plugin dependencies or limitations
- Complete control over every step
- Doesn’t require WordPress to be functional on old host
Limitations:
- Requires SFTP/SSH access and database management skills
- More time-consuming (2-4 hours for first migration)
- Manual search-and-replace for URL updates
- Higher risk of errors without experience
Method 3: Professional Migration Service (Most Reliable)
Best for: Business-critical sites, those wanting guaranteed zero downtime
Advantages:
- Truly zero downtime with proper DNS management
- Professional handles all technical aspects
- Guaranteed successful migration
- Post-migration support included
Limitations:
- Costs $50-300 depending on site complexity
- Requires scheduling migration window
- Less control over exact timing and process
✅ Host Anchor Free Migration
All Host Anchor hosting plans include free professional migration with guaranteed zero downtime. I handle everything personally—backup, transfer, testing, and DNS cutover.
Zero-Downtime Migration Process Overview
The key to zero-downtime migration is this: set up your site completely on the new host and test it thoroughly BEFORE changing DNS. Here’s the high-level process:
- Clone to new host: Copy files and database to new hosting without touching the old site
- Test using temporary URL or hosts file: Verify everything works on new host while old site remains live
- Update DNS: Point domain to new host only after confirming everything works
- Monitor both hosts: Keep old site running for 24-72 hours while DNS propagates globally
- Final cleanup: Once DNS fully propagates, cancel old hosting
Your site stays live on the old host throughout setup and testing. Visitors experience zero downtime because DNS only changes after the new host is fully functional.
Step 1: Backup Your Current Site
Never migrate without a fresh backup. If something goes wrong, you need a restoration point.
Backup Files via SFTP
- Connect to your old host via SFTP (FileZilla, Cyberduck, or similar)
- Download your entire WordPress directory (usually public_html or www)
- This may take 30 minutes to several hours depending on site size
- Store backup on your local computer and/or cloud storage
Backup Database via phpMyAdmin
- Access phpMyAdmin from your old host’s control panel
- Select your WordPress database from the left sidebar
- Click “Export” tab at the top
- Choose “Quick” method and “SQL” format
- Click “Export” and save the .sql file
Alternative: Use a backup plugin like UpdraftPlus or BackupBuddy to create a complete backup package (files + database). Download the backup files locally.
Step 2: Prepare New Hosting Environment
Set up your new hosting account and configure the environment to match your site’s requirements:
Create Hosting Account and Domain
- Sign up for new hosting plan
- Add your domain to the new hosting account (but don’t change DNS yet)
- Note the temporary URL provided by your new host (e.g., temp.yoursite.com or server-IP/~username)
Create Database and User
- Access cPanel or hosting control panel on new host
- Navigate to MySQL Databases
- Create new database (name it something memorable like wp_yoursite)
- Create database user with strong password
- Add user to database with ALL PRIVILEGES
- Note database name, username, password, and host (usually localhost)
Match PHP Version and Configuration
Ensure your new host runs the same (or newer compatible) PHP version as your old host. Check PHP version in WordPress Admin > Site Health, or create a phpinfo.php file:
<?php phpinfo(); ?>
Upload to old host and visit yoursite.com/phpinfo.php to see PHP version. Configure new host to match (or use PHP 8.1+ for better performance).
Step 3: Transfer Files to New Host
Upload your WordPress files to the new hosting account:
Option A: Direct SFTP Transfer
- Connect to new host via SFTP
- Navigate to public_html or www directory (your WordPress root)
- Upload all WordPress files from your backup
- This may take 1-3 hours depending on site size and connection speed
Option B: Compressed Archive Transfer (Faster)
- On old host, compress WordPress files into a .zip or .tar.gz archive via cPanel File Manager or SSH
- Download compressed archive (much faster than individual files)
- Upload compressed archive to new host
- Extract archive via cPanel File Manager or SSH on new host
SSH compression example:
# On old host - compress files
tar -czf wp-backup.tar.gz public_html/
# Transfer to new host (SCP or download/upload)
# On new host - extract files
tar -xzf wp-backup.tar.gz
Set Correct File Permissions
After uploading, ensure proper permissions:
- Directories: 755
- Files: 644
- wp-config.php: 400 or 440
Step 4: Migrate and Configure Database
Import your database and configure WordPress to use the new database:
Import Database via phpMyAdmin
- Access phpMyAdmin on new host
- Select your newly created database from left sidebar
- Click “Import” tab at top
- Click “Choose File” and select your database backup .sql file
- Leave settings at default and click “Import”
- Wait for import to complete (may take several minutes for large databases)
Update wp-config.php with New Database Credentials
Via SFTP, edit wp-config.php in your WordPress root directory on the new host. Update these values:
define('DB_NAME', 'your_new_database_name');
define('DB_USER', 'your_new_database_user');
define('DB_PASSWORD', 'your_new_database_password');
define('DB_HOST', 'localhost'); // Verify with new host
Save wp-config.php. Your WordPress installation can now connect to the database on the new host.
Update URLs in Database (If Domain Changes)
If you’re changing domains during migration, you’ll need to update all URLs in the database. Use Better Search Replace plugin or this SQL query in phpMyAdmin:
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://oldsite.com', 'http://newsite.com');
Important: Only run URL replacement if actually changing domains. If keeping the same domain, skip this step.
Step 5: Test Before DNS Change
Before updating DNS, thoroughly test your site on the new host to ensure everything works:
Access Site on New Host (Before DNS Change)
Method 1: Temporary URL (Easiest)
Most hosts provide a temporary URL like temp.yoursite.com or server-IP/~username. Visit this URL to see your site on the new host.
Method 2: Hosts File Override (Most Accurate)
Edit your computer’s hosts file to temporarily point your domain to the new host’s IP address:
Windows: C:WindowsSystem32driversetchosts
Mac/Linux: /etc/hosts
Add this line (replace with new host’s IP):
123.45.67.89 yoursite.com www.yoursite.com
Save the file. Now when you visit yoursite.com from your computer, it loads from the new host while the rest of the world still sees the old host.
Complete Testing Checklist
Pre-Launch Testing Tasks
Verify homepage displays properly with all images, CSS, and JavaScript working.
Check contact forms, product pages, blog posts, about page—all important pages load and function correctly.
Verify you can access wp-admin and all dashboard features work properly.
Submit test contact forms, test checkout process (without completing payment), verify all interactive features work.
Send test emails from WordPress (password reset, contact form) to ensure email delivery works on new host.
Ensure new host has SSL installed and site loads via HTTPS without browser warnings.
Test site on mobile devices or browser responsive mode to ensure layouts work correctly.
Only proceed to DNS cutover after confirming everything works perfectly on the new host.
Step 6: Update DNS for Cutover
After thorough testing confirms everything works, it’s time to point your domain to the new host:
Determine DNS Update Method
Option A: Update Nameservers (Recommended for Full Migration)
If you’re moving everything (website, email, DNS) to the new host:
- Get nameserver addresses from new host (e.g., ns1.newhost.com, ns2.newhost.com)
- Log into domain registrar (GoDaddy, Namecheap, etc.)
- Find DNS/Nameserver settings for your domain
- Replace old nameservers with new host’s nameservers
- Save changes
Option B: Update A Records (If Keeping Email at Old Host)
If only moving website but keeping email at old provider:
- Get new host’s IP address
- Log into DNS management (at registrar or current DNS provider)
- Update A record for @ (root domain) to point to new IP
- Update A record for www to point to new IP
- Leave MX records unchanged (keeps email at old host)
- Save changes
DNS Propagation Timeline
After updating DNS:
- 5-15 minutes: Most visitors start seeing new host (due to low TTL you set earlier)
- 1-4 hours: Majority of traffic now on new host
- 24-48 hours: Full global propagation (some remote ISPs cache DNS longer)
⚠️ During DNS Propagation
For 24-48 hours during DNS propagation, some visitors see the old host while others see the new host. This is why you must keep both hosts running during this period. Don’t cancel old hosting until DNS fully propagates.
Step 7: Post-Migration Checklist
After DNS propagation completes, verify everything works correctly:
Post-Migration Tasks
Purge WordPress cache, CDN cache, and browser cache to ensure visitors see the new site.
Ensure site loads via HTTPS. Add SSL redirect to .htaccess if not already configured.
Use tools like WhatsMyDNS.net to verify DNS has propagated globally. Test site from different devices and networks.
If you changed hosting providers, verify site ownership in Google Search Console with new host verification method.
Check Google Analytics, uptime monitoring, and server performance metrics to ensure improved performance on new host.
Don’t immediately cancel old hosting. Keep it active for 30 days as a backup in case any issues arise.
Troubleshooting Common Migration Issues
Issue: Site Shows “Error Establishing Database Connection”
Solution: wp-config.php has incorrect database credentials. Double-check DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST match your new host’s database.
Issue: Images Don’t Load or Pages Show 404 Errors
Solution: Permalinks need to be reset. Log into WordPress Admin > Settings > Permalinks and click “Save Changes” without changing anything. This regenerates .htaccess rewrite rules.
Issue: Site Loads But Looks Broken (No CSS)
Solution: URLs in database still reference old domain or paths. Run search-replace on database to update URLs, or check that site URL in Settings > General matches your actual domain.
Issue: Email Stops Working After Migration
Solution: If you changed nameservers, MX records now point to new host (which may not have email configured). Either set up email on new host or update MX records to point back to old email provider.
Issue: SSL Certificate Not Working on New Host
Solution: New host may need time to issue SSL certificate after DNS propagation. Check new host’s control panel for SSL configuration. Most modern hosts auto-install Let’s Encrypt certificates within a few hours of DNS propagation.
Conclusion: Successful WordPress Migration
WordPress migration doesn’t have to be stressful. By following this systematic process—preparing thoroughly, setting up the new environment completely before DNS changes, and testing exhaustively—you can migrate with zero downtime and zero data loss.
The key principles to remember:
- ✓ Always backup first – Fresh backups are your insurance policy
- ✓ Set up and test before DNS change – New site should be 100% functional before cutover
- ✓ Use low TTL for faster DNS propagation – Changes take minutes instead of days
- ✓ Keep old host active during transition – Don’t cancel until DNS fully propagates
- ✓ Test exhaustively after migration – Verify all functionality works on new host
While DIY migration is certainly possible, professional migration services eliminate risk and guarantee zero downtime. For business-critical websites, the peace of mind is worth the investment.
Let Me Handle Your WordPress Migration
Host Anchor includes free professional migration with all hosting plans. I handle everything personally—backup, transfer, testing, and DNS cutover—with guaranteed zero downtime.