WordPress Migration Guide - Complete Guide
Migrate your WordPress website to new hosting? Complete step-by-step guide with plugin methods, manual migration and solutions to common problems.
How to Migrate Your WordPress Website to New Hosting
Migrating your WordPress website to a new hosting provider can seem daunting, but with the right approach, it can be smooth and secure. Whether you're looking for better performance, lower costs, or additional functionality â this complete guide will teach you how to professionally migrate your WordPress website without data loss or downtime.
Why Migrate Your WordPress Website?
There are several good reasons why you might consider migrating your WordPress website to a different hosting provider:
Performance Issues
If your website loads slowly (more than 3 seconds), this could be due to an overloaded server or outdated hosting infrastructure. Faster hosting improves not only user experience but also your SEO ranking. Google considers load time as a ranking factor, so slow hosting literally costs you customers.
Signs of performance problems:
- TTFB (Time to First Byte) above 600ms
- Regular 503/504 errors
- Slow backend/admin panel
- High CPU usage notifications
Cost Optimization
Some hosting providers charge high rates for functionality that's standard elsewhere. By comparing providers and switching, you can save âŦ50 to âŦ200 per year. Watch especially for:
- Hidden costs for SSL certificates
- Expensive add-ons for backups
- High rates for additional domains
- Overpriced email accounts
Scalability
As your website grows in traffic and content, you may need more resources. Shared hosting is fine for starting websites, but with more than 50,000 visitors per month, you should consider upgrading to VPS or managed WordPress hosting.
Support and Service
Poor customer service can be frustrating during problems. Providers specializing in WordPress often offer better support with:
- WordPress-specific knowledge
- Faster response times
- Proactive security monitoring
- Automatic updates
Check our complete guide on website migration for general tips and strategies.
Managed WordPress Hosting vs. Standard Hosting
What is Managed WordPress Hosting?
With managed WordPress hosting, the provider handles all technical tasks:
- Automatic WordPress updates
- Daily backups
- Security scanning and malware removal
- Caching and performance optimization
- Staging environments
Advantages: Less technical work, better performance, proactive security. Disadvantages: Higher costs (âŦ15-50/month vs âŦ3-10/month), less flexibility.
When to Choose Managed Hosting?
- You have a business website generating revenue
- You want to focus on content, not technology
- You don't have technical knowledge in-house
- Downtime directly costs you money
When is Standard Hosting Sufficient?
- Personal blog or hobby project
- You have technical knowledge
- Budget is important
- You want full control
Preparation: Essential Steps
Step 1: Create a Complete Backup
This is the most important step. A backup is your safety net if something goes wrong. A complete WordPress backup consists of two parts:
1. Files:
- WordPress core files
- wp-content/themes/ (your theme files)
- wp-content/plugins/ (all plugins)
- wp-content/uploads/ (media library)
- Custom files in root
2. Database:
- The MySQL database with all your content
- Posts, pages, and custom post types
- Settings and configuration
- Users and permissions
- Plugin data
You can create a backup via:
- Hosting control panel: cPanel, DirectAdmin, or Plesk have backup tools
- WordPress plugins: UpdraftPlus, BackWPup, Duplicator
- Manually: FTP + phpMyAdmin export
Step 2: Document Your Current Setup
Note before you begin:
- PHP version (Settings â Site Health â Info)
- WordPress version
- Active plugins and versions
- Theme and child theme
- Custom .htaccess rules
- wp-config.php modifications
- Cronjobs if applicable
Step 3: Choose Your New Hosting Provider
Look for these factors:
- WordPress optimization: Does the host support LiteSpeed, Redis cache, or other WordPress optimizations?
- Migration service: Do they offer free website migration?
- Uptime guarantee: At least 99.9% uptime is essential
- Backup system: Automatic daily backups are a must
- PHP version: Minimum PHP 8.0+ for modern WordPress
- SSL certificate: Free Let's Encrypt should be included
Check our hosting provider comparison to make the best choice.
Method 1: All-in-One WP Migration (Beginners)
All-in-One WP Migration is a popular free plugin suitable for sites up to 512 MB (or unlimited with the paid version).
Exporting Your Website
Step 1: Install the plugin
- Log in to your WordPress admin dashboard
- Go to Plugins â Add New Plugin
- Search for "All-in-One WP Migration"
- Install and activate
Step 2: Export your website
- Go to All-in-One WP Migration â Export
- Click "Export to" â File
- Wait for the export file to be generated
- Download the .wpress file to your computer
Importing on New Hosting
Step 3: Install WordPress on new hosting
- Use your new provider's WordPress installer (Softaculous, Installatron)
- Install a fresh WordPress installation
- Log in with the temporary credentials
Step 4: Import your website
- Install All-in-One WP Migration on the new WordPress
- Go to All-in-One WP Migration â Import
- Drag your .wpress file or click to upload
- Wait for the import to complete (may take a while for large sites)
After completion, log in with your original WordPress credentials (not the temporary ones).
Upload Limit Issues
If you get a file size error:
- Install the "All-in-One WP Migration File Extension" plugin
- Or increase PHP upload limit via .htaccess:
php_value upload_max_filesize 512M php_value post_max_size 512M php_value max_execution_time 300
Method 2: Duplicator (Advanced)
Duplicator offers more control and is suitable for larger websites or more complex setups.
Creating a Package
Step 1: Install and configure
- Install Duplicator on your current site
- Go to Duplicator â Packages â Create New
- Give your package a clear name (e.g., "migration-dec-2024")
Step 2: Scan and build
- Duplicator scans your site for potential issues
- Resolve any warnings (large files, permissions)
- Click Build to create the package
- Download both files: installer.php and the .zip archive
Installing on New Server
Step 3: Upload to new hosting
- Create a new empty database via your hosting panel
- Note: database name, user, and password
- Upload installer.php and .zip via FTP to the root folder
Step 4: Run the installer
- Go to: https://yourdomain.com/installer.php
- Enter the database credentials
- Choose whether to adjust URLs
- Follow the wizard to completion
- Remove installer files for security
Method 3: Manual Migration (Experts)
The manual method gives full control but requires technical knowledge.
Moving Files
- Connect with FTP client (FileZilla) to your current hosting
- Download the complete WordPress folder (this can take hours for large sites)
- Connect to your new hosting
- Upload all files to the correct folder (public_html or www)
Exporting Database
- Open phpMyAdmin on your current hosting
- Select your WordPress database
- Click Export â Custom
- Choose: SQL format, all tables, add DROP TABLE
- Download the .sql file
Importing Database
On your new hosting:
- Create a new database and user
- Give the user all privileges on the database
- Open phpMyAdmin â select new database
- Click Import â upload your .sql file
- Wait for import to complete
Updating wp-config.php
Update the database credentials in wp-config.php:
define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_database_user');
define('DB_PASSWORD', 'new_database_password');
define('DB_HOST', 'localhost');
DNS Changes and Going Live
Test Your New Website First
Use the hosts file to test your site before changing DNS:
Windows: C:\Windows\System32\drivers\etc\hosts Mac/Linux: /etc/hosts
Add:
123.123.123.123 yourdomain.com www.yourdomain.com
Replace 123.123.123.123 with your new hosting IP. Now you can test your website without visitors noticing.
Checklist Before DNS Switch
- [ ] All pages load correctly
- [ ] Images are displayed
- [ ] Forms work
- [ ] WooCommerce checkout functions (if applicable)
- [ ] SSL certificate is installed
- [ ] Permalinks work (no 404 errors)
Changing DNS
- Log in to your domain registrar
- Change the nameservers to your new hosting, OR
- Change the A-record to the new IP address
- Wait for DNS propagation (usually 2-4 hours, max 48 hours)
Force HTTPS After Migration
Add to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
After Migration: Optimization
Performance Check
- Test load time with GTmetrix or PageSpeed Insights
- Compare with old hosting - should be faster
- Activate caching plugin if not already active
Security Hardening
- Change all passwords (WordPress admin, FTP, database)
- Install security plugin (Wordfence or Sucuri)
- Verify .htaccess protection works
- Remove unused plugins and themes
SEO Verification
- Check Google Search Console for crawl errors
- Test sitemap.xml is accessible
- Verify robots.txt is correct
- Check that canonical URLs are correct
Common Problems and Solutions
Database Connection Error
Symptom: "Error establishing a database connection"
Solutions:
- Check wp-config.php database credentials
- Verify the database exists
- Check the user has correct privileges
- Test credentials via phpMyAdmin
White Screen of Death
Symptom: Empty white page, no error message
Solutions:
- Enable debug mode in wp-config.php:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); - Check wp-content/debug.log for errors
- Deactivate plugins via FTP (rename plugins folder to plugins_backup)
- Check PHP version compatibility
Images Not Loading
Symptoms: Broken images, 404 on media
Solutions:
- Check if wp-content/uploads/ was fully transferred
- Check file permissions (folders 755, files 644)
- Use Better Search Replace plugin to replace old URLs
- Regenerate thumbnails with Regenerate Thumbnails plugin
404 Errors on Pages
Symptom: Homepage works, other pages give 404
Solutions:
- Go to Settings â Permalinks â click Save (regenerates .htaccess)
- Check if .htaccess exists and is writable
- Check mod_rewrite is active on the server
Mixed Content Warnings
Symptom: Padlock not green, "mixed content" in console
Solutions:
- Install Really Simple SSL plugin
- Or use Better Search Replace: replace http:// with https://
- Check hardcoded URLs in theme files
Frequently Asked Questions
How long does a WordPress migration take?
An average migration takes 1-4 hours:
- Small site (< 500MB): 30-60 minutes with plugin
- Medium site (500MB-2GB): 1-2 hours
- Large site (> 2GB): 2-4 hours or more
- DNS propagation: 2-48 hours additional
Can I migrate without downtime?
Yes, by following this strategy:
- Migrate to new hosting while old is still active
- Test thoroughly via hosts file
- Only change DNS when everything works
- Old and new site run in parallel during DNS propagation
What happens to my SEO rankings?
If you perform the migration correctly, your rankings remain intact. Important:
- URLs must stay exactly the same
- Don't introduce broken links
- Configure SSL correctly (https redirect)
- Update sitemap in Search Console
- Load time should not worsen
Do I need to migrate email too?
Not necessarily. Email and hosting are technically separate. Options:
- Keep email with old provider (change only A-record, not MX)
- Migrate email to new provider
- Switch to external email (Google Workspace, Microsoft 365)
Read our email migration guide for details.
Which plugin is best for migration?
For beginners: All-in-One WP Migration - simple and reliable For advanced users: Duplicator - more control and options For large sites: Duplicator Pro or WP Migrate DB Pro For managed hosting: Often their own tools (WP Engine, Kinsta)
Conclusion
Migrating your WordPress website doesn't have to be complicated. Choose the right method for your situation:
- Beginner? Use All-in-One WP Migration
- Experienced? Duplicator offers more control
- Don't want hassle? Choose a provider with free migration service
Test thoroughly before changing DNS, and your website will be running smoothly and securely on your new hosting.
Check our hosting provider comparisons to find the best match, or read our exit guides if you specifically want to leave your current provider.