How to Manually Migrate a WordPress Site (Step-by-Step Guide)

1/7/2026 · 7 min read

#wordpress#migration#hosting#tutorial

Migrating a WordPress site manually might seem intimidating, but it's actually straightforward when you break it down into steps. This guide will walk you through the entire process—no migration plugins required.

Why Migrate Manually?

While plugins like Duplicator or All-in-One WP Migration are convenient, manual migration gives you:

  • Complete control over the process
  • Better understanding of how WordPress works
  • No file size limits (common with free plugins)
  • Cleaner migration without plugin bloat

What You'll Need

Before starting, gather:

  • [ ] FTP/SFTP access to both old and new servers
  • [ ] Database access (phpMyAdmin or similar) on both servers
  • [ ] A text editor (Notepad++, VS Code, or Sublime)
  • [ ] 1-2 hours of uninterrupted time

Step 1: Backup Your Current Site

Never skip this step. Even if you're confident, always have a backup.

Backup Files via FTP

  1. Connect to your current host via FTP (FileZilla, Cyberduck, etc.)
  2. Download your entire WordPress directory (usually public_html or www)
  3. Save it to your local computer

Pro Tip: This can take 30-60 minutes depending on your site size and internet speed.

Backup Database

  1. Log into your hosting control panel (cPanel, Plesk, etc.)
  2. Open phpMyAdmin
  3. Select your WordPress database from the left sidebar
  4. Click Export at the top
  5. Choose Quick export method and SQL format
  6. Click Go to download the .sql file

Save this file safely. You'll need it in Step 4.

Step 2: Set Up Your New Hosting Environment

On your new host:

Create a Database

  1. Log into your new hosting control panel
  2. Navigate to MySQL Databases (or equivalent)
  3. Create a new database (e.g., newsite_wp)
  4. Create a database user with a strong password
  5. Assign the user to the database with All Privileges

Write down these details:

  • Database name: _____________
  • Database user: _____________
  • Database password: _____________
  • Database host: _____________ (usually localhost)

Step 3: Upload WordPress Files

Via FTP

  1. Connect to your new host via FTP
  2. Navigate to the web root directory (usually public_html)
  3. Upload all the files you downloaded in Step 1
  4. Wait for the upload to complete (this can take 30-60 minutes)

Via cPanel File Manager (Alternative)

  1. Compress your WordPress folder into a .zip file
  2. Upload the .zip via cPanel File Manager
  3. Extract it directly on the server (much faster than FTP)

Step 4: Import Your Database

  1. Log into phpMyAdmin on your new host
  2. Select the database you created in Step 2
  3. Click the Import tab
  4. Click Choose File and select your .sql backup
  5. Scroll down and click Go

If you get an error about file size:

  • Split your database into smaller chunks using a tool like BigDump
  • Or increase upload_max_filesize in your php.ini

Step 5: Update wp-config.php

This is the critical step that connects WordPress to your new database.

  1. Using FTP or File Manager, locate wp-config.php in your WordPress root directory
  2. Download it and open it in a text editor
  3. Find these lines and update them with your new database details:
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' ); // Usually localhost, but check with your host
  1. Save the file and re-upload it to your server

Step 6: Update Site URLs in the Database

If your domain is changing (e.g., from oldsite.com to newsite.com), you need to update URLs in the database.

Method 1: Using phpMyAdmin (Recommended)

  1. Open phpMyAdmin on your new host
  2. Select your WordPress database
  3. Click the SQL tab
  4. Run these queries (replace the URLs with yours):
UPDATE wp_options SET option_value = replace(option_value, 'https://oldsite.com', 'https://newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'https://oldsite.com','https://newsite.com');

UPDATE wp_posts SET post_content = replace(post_content, 'https://oldsite.com', 'https://newsite.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://oldsite.com','https://newsite.com');

Note: If your table prefix isn't wp_, replace wp_ with your actual prefix (found in wp-config.php).

Method 2: Using WP-CLI (Advanced)

If your host has WP-CLI installed:

wp search-replace 'https://oldsite.com' 'https://newsite.com' --all-tables

Step 7: Update DNS Settings

Now point your domain to the new server.

  1. Log into your domain registrar (GoDaddy, Namecheap, etc.)
  2. Find DNS Management or Nameservers
  3. Update the A Record to point to your new server's IP address
    • Or update nameservers to your new host's nameservers
  4. Save changes

DNS propagation takes 4-48 hours. During this time, some users may see the old site and others the new one.

Test Before DNS Propagation

To test your new site before DNS updates:

  1. Edit your local hosts file:
    • Windows: C:\Windows\System32\drivers\etc\hosts
    • Mac/Linux: /etc/hosts
  2. Add this line:
    123.45.67.89  yoursite.com
    
    (Replace 123.45.67.89 with your new server's IP)
  3. Save and visit your site in a browser

Step 8: Test Everything

Once DNS has propagated, thoroughly test your site:

  • [ ] Can you log into /wp-admin?
  • [ ] Are all pages loading correctly?
  • [ ] Are images displaying properly?
  • [ ] Do forms work (contact forms, search, etc.)?
  • [ ] Are plugins functioning correctly?
  • [ ] Is SSL/HTTPS working? (Install an SSL certificate if needed)
  • [ ] Test on mobile devices

Step 9: Update Permalinks

Sometimes permalinks break during migration.

  1. Log into WordPress admin (/wp-admin)
  2. Go to Settings → Permalinks
  3. Don't change anything—just click Save Changes

This regenerates the .htaccess file and fixes most permalink issues.

Step 10: Set Up SSL (If Not Already Done)

Most hosts offer free SSL via Let's Encrypt.

  1. In your hosting control panel, find SSL/TLS
  2. Install a free Let's Encrypt certificate
  3. Update your site URLs to use https:// instead of http://
  4. Add this to your wp-config.php (above the "That's all" line):
define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
    $_SERVER['HTTPS']='on';

Common Migration Issues & Fixes

"Error Establishing Database Connection"

  • Double-check your wp-config.php credentials
  • Verify the database user has proper permissions
  • Confirm DB_HOST is correct (try localhost or 127.0.0.1)

White Screen of Death

  • Increase PHP memory limit in wp-config.php:
    define('WP_MEMORY_LIMIT', '256M');
    
  • Check file permissions (folders: 755, files: 644)

Images Not Loading

  • Run the URL replacement queries again (Step 6)
  • Check that the /wp-content/uploads/ folder uploaded correctly

Permalinks Return 404

  • Re-save permalinks (Step 9)
  • Check that .htaccess exists and is writable
  • Verify mod_rewrite is enabled on your server

Post-Migration Checklist

After migration is complete:

  • [ ] Update Google Search Console with new server location
  • [ ] Update Google Analytics (if domain changed)
  • [ ] Update CDN settings (Cloudflare, etc.)
  • [ ] Update email settings (SMTP, transactional emails)
  • [ ] Monitor site for 48 hours for any issues
  • [ ] Keep old hosting active for 7-14 days as a safety net

When to Keep Your Old Site Running

Don't cancel your old hosting immediately. Keep it active for:

  • 7 days minimum to catch any migration issues
  • 30 days if you changed domains (for email forwarding, etc.)

Conclusion

Manual WordPress migration gives you complete control and a deeper understanding of your site's infrastructure. While it takes longer than using a plugin, you'll know exactly what happened and can troubleshoot issues more effectively.

The key is to work methodically, test thoroughly, and never skip backups. Follow this guide step-by-step, and your migration will be smooth and successful.

Pro Tip: Document your migration process. Next time you need to migrate (or help someone else), you'll have your own custom checklist ready to go.

Category: WordPress