How to Transfer a WordPress Website to a New Host (Step-by-Step)
Move your site safely with either a plugin (like Duplicator) or a manual FTP + database method—no panic, no mystery.
- Fastest & easiest: Use a migration plugin like Duplicator to package your site and deploy it on the new host.
- Most controllable: Migrate manually by copying files via FTP/SFTP and moving the database via phpMyAdmin/MySQL.
- Key to zero downtime: Lower your DNS TTL, test on the new server (hosts file/temporary URL), then switch DNS.
When to Use Each Method
- Use a plugin (Duplicator) if your site isn’t huge (<2–5 GB), you’re not changing domain names, and you prefer guided steps.
- Go manual if your site is large, the plugin times out, you’re changing domains, or you want full control (great for power users).
Pre-Migration Checklist
- [ ] Full backup of files and database from the old host
- [ ] Lower DNS TTL to 300 seconds (do this 24 hours before the move)
- [ ] Credentials ready: old & new host logins, FTP/SFTP, database access
- [ ] Check PHP/MySQL versions on the new host meet WordPress requirements
- [ ] Disable/clear caching (plugins + server cache/CDN)
- [ ] Turn off maintenance mode (if any)
- [ ] Note email setup (if email is on the old host’s cPanel, plan where it lives after the move)
Method 1: Migrate with Duplicator (Plugin)
1) Create a package on the old host
- In WordPress Admin → Plugins → Add New, install and activate Duplicator.
- Go to Duplicator → Packages → Create New.
- Follow the wizard (scan) and Build the package.
- Download two files:
installer.phpand the archive (usually a.zip).
Tip: If your site is large, exclude
/wp-content/uploadsyear folders you don’t need or consider Duplicator Pro (supports larger sites).
2) Prepare the new host
- Create a new, empty MySQL database and user; grant All Privileges.
- Point a temporary domain or use your hosts file to preview (recommended), or be ready to switch DNS after testing.
- Ensure the document root (e.g.,
/public_htmlor/var/www/yourdomain) is empty.
3) Upload and run the installer
- Upload
installer.phpand the package.zipto the new host’s document root via FTP/SFTP or the host’s File Manager. - In your browser, open
https://yourdomain.com/installer.php(or the temporary URL). - Follow the on-screen steps:
- Provide DB name, user, and password you created.
- Let Duplicator extract and import.
- Update URL if changing domains.
- Log into WordPress on the new host when prompted.
4) Post-migration tasks (plugin method)
- Save Permalinks: Settings → Permalinks → Save (twice is fine)
- Force HTTPS (after SSL is active)
- Re-enable/clear caches and CDN
- Check media, menus, forms, and login
- Delete
installer.phpand package files (Duplicator can do this) - Switch DNS to the new host when everything looks good
Method 2: Manual Migration (FTP + Database)
1) Export the database (old host)
- Open phpMyAdmin (or your MySQL panel) in the old host’s control panel.
- Select your WordPress database → Export → Quick → SQL → Go.
Save the.sqlfile locally.
2) Download the files (old host)
Use FTP/SFTP (FileZilla, Cyberduck) to download all site files, including:
- WordPress core files (wp-admin, wp-includes)
- wp-content/ (themes, plugins, uploads)
- wp-config.php and .htaccess (or Nginx config if applicable)
3) Create the database (new host)
- In the new host’s control panel, create a new database, user, and password.
- Grant the user All Privileges to the database.
- Open phpMyAdmin on the new host, select the new DB → Import → upload the
.sqlfile.
4) Upload the files (new host)
- FTP/SFTP your downloaded files to the new host’s document root.
- Edit
wp-config.phpwith the new DB credentials:php define('DB_NAME', 'new_database_name'); define('DB_USER', 'new_db_user'); define('DB_PASSWORD', 'new_db_password'); define('DB_HOST', 'localhost'); // often 'localhost'; check your host’s docs - If the table prefix changed, confirm
$table_prefixmatches your tables.
5) If the domain is changing (search-replace)
WordPress stores absolute URLs in the DB (including serialized data). Use WP-CLI (safest for serialization):
# From the WordPress root on the new host:
wp search-replace 'http://oldsite.com' 'https://newsite.com' --all-tables
No WP-CLI? Use a trusted plugin like Better Search Replace. Avoid manual SQL on serialized data.
At minimum, update these in wp_options if needed:
UPDATE wp_options SET option_value='https://newsite.com' WHERE option_name='siteurl' OR option_name='home';
6) Post-migration tasks (manual method)
- Save Permalinks (flush rewrite rules)
- Install SSL (Let’s Encrypt) and fix mixed content
- Check file permissions (
755directories,644files, typical) - Clear caches/CDN and regenerate CSS if your theme uses a builder
- Test forms (set up SMTP if mail breaks)
- Switch DNS when satisfied (A record to new IPv4/IP6)
How to Avoid Downtime
- Lower DNS TTL to 300 seconds (5 min) a day before the move.
- Preview on the new host using your hosts file (maps your domain to the new IP locally) or a temporary URL.
- Switch DNS only after everything checks out, then monitor for 24–48 hours.
SEO Considerations (So Your Rankings Don’t Flinch)
- Keep the same URLs and permalink structure if the domain is unchanged.
- If the domain changes, set 301 redirects from every old URL to the new one. A basic
.htaccessdomain redirect:apache RewriteEngine On RewriteCond %{HTTP_HOST} ^oldsite\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.oldsite\.com$ RewriteRule (.*)$ https://www.newsite.com/$1 [R=301,L] - Regenerate sitemap and resubmit in Google Search Console & Bing Webmaster Tools.
- Update canonical tags (themes/SEO plugins usually handle this).
- Watch for mixed content after enabling HTTPS—use your browser console and fix with a search-replace if needed.
Common Problems & Fixes
Error establishing a database connection
CheckDB_NAME,DB_USER,DB_PASSWORD,DB_HOSTinwp-config.php. Make sure the DB user has privileges.White screen / 500 error
Disable plugins by renaming/wp-content/plugins/temporarily. Check.htaccess; re-save permalinks to rebuild rewrites. Confirm PHP version compatibility.Images or CSS not loading
Likely URL/path issues or mixed content. Do a search-replace for old URLs and clear caches.Upload/import too large
Use command-line MySQL or split the SQL with a tool (e.g., BigDump alternative). For files, upload in chunks.WooCommerce orders/users during migration
Put the old site in maintenance mode briefly or schedule the final cut-over during low traffic. Consider a delta migration if needed.
Quick Reference: Order of Operations
- Lower DNS TTL
- Backup site (files + DB)
- Duplicator or manual export/import
- Upload to new host & set DB
- Update
wp-config.php - Search-replace (if domain changes)
- Flush permalinks, enable SSL, clear caches
- Test thoroughly (forms, login, media, speed)
- Switch DNS
- Monitor, resubmit sitemaps, keep old host for a few days just in case
FAQ
Will migrating hurt my SEO?
Not if URLs stay the same and the site remains accessible. With a domain change, use 301 redirects and resubmit sitemaps.
How long does a migration take?
Small sites can be under an hour. Bigger/complex sites (WooCommerce, large media libraries) can take longer, mostly due to uploads.
Do I need to move email?
Only if your email is hosted with your old provider. If you used cPanel email, plan new mailboxes or move to a dedicated email service (e.g., Microsoft 365/Google Workspace).
Is Duplicator safe for big sites?
It’s fine for many. For very large sites, consider Duplicator Pro or manual migration to avoid timeouts.
What about Multisite?
Use tools that explicitly support Multisite or go manual with care; mapping and search-replace become more nuanced.
Final Thoughts
If you want speed and simplicity, Duplicator is a great first choice. If you need fine-grained control, go manual with FTP + MySQL. Either way, follow the checklist, test on the new host before DNS cutover, and your WordPress move will be clean, fast, and SEO-safe.
Need a provider to make the move for you? Contact CGA Media and let us do the rest!