How to Manually Migrate a WordPress Site (Step-by-Step Guide)
1/7/2026 · 7 min read
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
- Connect to your current host via FTP (FileZilla, Cyberduck, etc.)
- Download your entire WordPress directory (usually
public_htmlorwww) - Save it to your local computer
Pro Tip: This can take 30-60 minutes depending on your site size and internet speed.
Backup Database
- Log into your hosting control panel (cPanel, Plesk, etc.)
- Open phpMyAdmin
- Select your WordPress database from the left sidebar
- Click Export at the top
- Choose Quick export method and SQL format
- Click Go to download the
.sqlfile
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
- Log into your new hosting control panel
- Navigate to MySQL Databases (or equivalent)
- Create a new database (e.g.,
newsite_wp) - Create a database user with a strong password
- Assign the user to the database with All Privileges
Write down these details:
- Database name:
_____________ - Database user:
_____________ - Database password:
_____________ - Database host:
_____________(usuallylocalhost)
Step 3: Upload WordPress Files
Via FTP
- Connect to your new host via FTP
- Navigate to the web root directory (usually
public_html) - Upload all the files you downloaded in Step 1
- Wait for the upload to complete (this can take 30-60 minutes)
Via cPanel File Manager (Alternative)
- Compress your WordPress folder into a
.zipfile - Upload the
.zipvia cPanel File Manager - Extract it directly on the server (much faster than FTP)
Step 4: Import Your Database
- Log into phpMyAdmin on your new host
- Select the database you created in Step 2
- Click the Import tab
- Click Choose File and select your
.sqlbackup - 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_filesizein yourphp.ini
Step 5: Update wp-config.php
This is the critical step that connects WordPress to your new database.
- Using FTP or File Manager, locate
wp-config.phpin your WordPress root directory - Download it and open it in a text editor
- 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
- 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)
- Open phpMyAdmin on your new host
- Select your WordPress database
- Click the SQL tab
- 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.
- Log into your domain registrar (GoDaddy, Namecheap, etc.)
- Find DNS Management or Nameservers
- Update the A Record to point to your new server's IP address
- Or update nameservers to your new host's nameservers
- 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:
- Edit your local
hostsfile:- Windows:
C:\Windows\System32\drivers\etc\hosts - Mac/Linux:
/etc/hosts
- Windows:
- Add this line:
(Replace123.45.67.89 yoursite.com123.45.67.89with your new server's IP) - 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.
- Log into WordPress admin (
/wp-admin) - Go to Settings → Permalinks
- 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.
- In your hosting control panel, find SSL/TLS
- Install a free Let's Encrypt certificate
- Update your site URLs to use
https://instead ofhttp:// - 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.phpcredentials - Verify the database user has proper permissions
- Confirm
DB_HOSTis correct (trylocalhostor127.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
.htaccessexists and is writable - Verify
mod_rewriteis 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.