CGA Media Official Blog

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

  1. In WordPress Admin → Plugins → Add New, install and activate Duplicator.
  2. Go to Duplicator → Packages → Create New.
  3. Follow the wizard (scan) and Build the package.
  4. Download two files: installer.php and the archive (usually a .zip).

Tip: If your site is large, exclude /wp-content/uploads year folders you don’t need or consider Duplicator Pro (supports larger sites).

2) Prepare the new host

  1. Create a new, empty MySQL database and user; grant All Privileges.
  2. Point a temporary domain or use your hosts file to preview (recommended), or be ready to switch DNS after testing.
  3. Ensure the document root (e.g., /public_html or /var/www/yourdomain) is empty.

3) Upload and run the installer

  1. Upload installer.php and the package .zip to the new host’s document root via FTP/SFTP or the host’s File Manager.
  2. In your browser, open https://yourdomain.com/installer.php (or the temporary URL).
  3. Follow the on-screen steps:
    • Provide DB name, user, and password you created.
    • Let Duplicator extract and import.
    • Update URL if changing domains.
  4. 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.php and 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)

  1. Open phpMyAdmin (or your MySQL panel) in the old host’s control panel.
  2. Select your WordPress databaseExportQuickSQLGo.
    Save the .sql file 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)

  1. In the new host’s control panel, create a new database, user, and password.
  2. Grant the user All Privileges to the database.
  3. Open phpMyAdmin on the new host, select the new DB → Import → upload the .sql file.

4) Upload the files (new host)

  1. FTP/SFTP your downloaded files to the new host’s document root.
  2. Edit wp-config.php with 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
  3. If the table prefix changed, confirm $table_prefix matches 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 (755 directories, 644 files, 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 .htaccess domain 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
    Check DB_NAME, DB_USER, DB_PASSWORD, DB_HOST in wp-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

  1. Lower DNS TTL
  2. Backup site (files + DB)
  3. Duplicator or manual export/import
  4. Upload to new host & set DB
  5. Update wp-config.php
  6. Search-replace (if domain changes)
  7. Flush permalinks, enable SSL, clear caches
  8. Test thoroughly (forms, login, media, speed)
  9. Switch DNS
  10. 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!

 

About CGA Media

Arlington Heights Web Design and Development

CGA Media, based in Arlington Heights, IL, is a web and multimedia company dedicated to delivering design and digital solutions. We build custom high-performance websites that increase user experience and engagement. Serving the Northwest Chicago suburbs including Arlington Heights, Palatine, Mount Prospect, Des Plaines, Buffalo Grove, Rolling Meadows, Prospect Heights, Schaumburg and Elk Grove Village.

Contact Us Today

Copyright © 2025 CGA Media. All rights reserved. Videos by Jaffe, Inc.

Privacy Policy | Disclaimer | Sitemap