Step-By-Step WordPress Migration Between Hosts
A manual, plugin-free guide to safely moving your WordPress site to a new host
Moving a live WordPress site from one hosting provider to another can feel risky. You worry about downtime, broken pages, and the nightmare of losing data if something goes wrong.
In this step-by-step guide, you’ll learn how to perform a manual, plugin-free WordPress migration between hosts. You’ll copy your files and database, configure the new server, test everything safely, and then switch DNS with minimal downtime.
If you’re completely new to hosting, it can help to quickly review how WordPress hosting works so the steps in this migration guide make more sense.
Prerequisites
Before you start moving anything, make sure you have everything you need for a clean, low-stress migration.
- Login access to your old host (cPanel, Plesk, or custom panel).
- Login access to your new host (control panel + FTP/SFTP and/or SSH).
- Access to your domain registrar to update DNS or nameservers.
- Your current site must be working correctly (fix any obvious errors first).
- Enough disk space on the new host to hold all site files and backups.
If you’re not confident about your backup process, follow this dedicated tutorial on how to backup a WordPress site before you continue.
Step 1: Plan Your WordPress Migration Between Hosts
A little planning dramatically reduces downtime and surprises when you move between hosting providers.
- Pick a low-traffic window. Schedule your migration for late night or early morning in your main audience’s time zone.
- Check PHP and MySQL versions. Confirm your new host supports at least the same or newer versions than your old host.
- Disable non-essential changes. Let your authors or team know there is a content freeze during the migration so no new posts or orders are added mid-move.
- Lower DNS TTL (optional but recommended). If your DNS TTL is high (e.g., 4 hours), lower it to 300–900 seconds the day before migration to speed up DNS propagation.
Step 2: Backup Your WordPress Site Safely
Even though this guide walks you through a controlled process, mistakes can happen. A full backup lets you roll back to your original host if needed.
2.1 Backup your files
- Log in to your old host’s control panel and open File Manager (or connect via FTP/SFTP).
- Locate the folder that contains WordPress (commonly
public_htmlor a subdirectory). - Select all WordPress files and folders (
wp-admin,wp-content,wp-includes, and root files likewp-config.php). - Use the “Compress” or “Archive” option to create a single
.zipfile of your site.
2.2 Backup your database
- From the control panel, open phpMyAdmin.
- In the left sidebar, click your WordPress database (the name is referenced in
wp-config.php). - Click the Export tab, select Quick export and SQL format, then click Go to download the
.sqlfile.
Step 3: Prepare the New Hosting Environment
Your new host needs a ready environment for WordPress before you copy anything over.
- Create a new database. In the new host’s control panel, open MySQL Databases (or similar) and create a new database.
- Create a database user. Create a new user and assign a strong password.
- Assign user to database. Give the user All Privileges on the new database.
- Note the credentials. Write down:
- Database name
- Database username
- Database password
- Database host (often
localhost, but some hosts use a different hostname)
wp-config.php later. Step 4: Move WordPress Files to the New Host
Now you’ll copy the WordPress files you backed up from the old host into the document root on the new host.
4.1 Upload the backup archive
- Log in to your new host’s control panel and open File Manager.
- Navigate to the folder where the site should live (often
public_htmlor a subfolder for add-on domains). - Upload the
.zipfile you created on the old host.
4.2 Extract the backup
- Once the upload finishes, select the
.zipfile. - Use the Extract option to unpack the WordPress files into the current directory.
- Verify that directories like
wp-contentand files likewp-config.phpare present.
.zip archive to save disk space. Step 5: Export the Database from the Old Host (If Not Done Yet)
If you already exported your database in Step 2, you can skip directly to the next step. Otherwise, export it now.
- Open phpMyAdmin on your old host.
- Select the correct WordPress database in the left sidebar.
- Click Export, choose the Quick method and SQL format, and click Go.
Step 6: Import the Database on the New Host
Next, you’ll import your WordPress database backup into the new database you created on the new host.
- On the new host, open phpMyAdmin and select the new database you created in Step 3.
- Click the Import tab.
- Click Choose File and select the
.sqlfile you exported from the old host. - Leave the format as SQL and click Go to import.
- Wait for the success message confirming all tables have been imported.
mysql command. Step 7: Update wp-config.php with New Database Details
Your WordPress files still reference the old database. You need to point them to the new database on the new host.
- In the new host’s File Manager (or via FTP/SFTP), open the WordPress root folder.
- Locate
wp-config.phpand open it in the code editor. - Find the following lines:
define( 'DB_NAME', 'old_db_name' );
define( 'DB_USER', 'old_db_user' );
define( 'DB_PASSWORD', 'old_db_password' );
define( 'DB_HOST', 'localhost' ); - Replace the values with your new database name, user, password, and host from Step 3.
- Save the file.
wp-config.php. A small typo can trigger connection errors or PHP warnings. Step 8: Update URLs and Paths After Migration
If your domain is staying exactly the same, you often don’t need a full search-and-replace. However, it’s still smart to check for any references to the old host’s temporary URLs or old paths.
8.1 Update site URL (if needed)
If you’re testing via a temporary URL or changing the domain, you may need to update the site URL and home URL in the database.
- In phpMyAdmin on the new host, open the
wp_optionstable. - Update the
siteurlandhomevalues to the correct final URL (e.g.,https://yourdomain.com).
8.2 Optional: Use WP-CLI for bulk URL changes
If you have SSH access and WP-CLI installed, you can safely update URLs from the command line.
wp search-replace 'old-domain.com' 'new-domain.com' --skip-columns=guid Run this command in your WordPress installation directory on the new host. It will replace all instances of the old domain in the database while skipping the post GUID field.
Step 9: Test the Site on the New Host
Before you flip DNS, you should fully test the migrated site on the new hosting environment.
9.1 Preview using a temporary URL or hosts file
- Many hosts provide a temporary URL (e.g.,
https://ipaddress/~username) to preview your site. - If not, edit your local hosts file to point your domain to the new server’s IP address. For example:
203.0.113.10 yourdomain.com www.yourdomain.com Replace 203.0.113.10 with your new host’s IP. Only your computer will use this mapping, so visitors still see the old host until you update DNS.
9.2 Run through a wordpress migration checklist
- Test homepage, key landing pages, and blog posts.
- Log in to wp-admin and verify you can access the dashboard.
- Check permalinks (Settings > Permalinks) and re-save them if you see 404 errors.
- Submit forms, test search, and complete test orders if you run WooCommerce.
- Confirm media files (images, downloads) load correctly.
wp-config.php values and your site URL settings in the database. Step 10: Switch DNS and Monitor After Go-Live
Once you’re happy with how the site behaves on the new host, you’re ready to point the domain to the new server.
10.1 Update nameservers or A records
- Log in to your domain registrar.
- If your new host manages DNS, change your domain’s nameservers to the new host’s nameservers.
- Otherwise, update the DNS A record for
yourdomain.com(andwwwif used) to point to the new host’s IP address.
10.2 Monitor propagation and performance
- DNS changes can take a few minutes up to 24–48 hours to fully propagate, depending on TTL and caches.
- Keep both old and new hosting accounts active for at least a couple of days to be safe.
- Monitor error logs on the new host for any PHP errors or 500 responses.
- Ask a few users in different locations to confirm they see the site on the new host.
For deeper troubleshooting of edge cases during or after the move, you can refer to this dedicated guide on troubleshooting WordPress migration errors.
Wrapping Up Your WordPress Host-to-Host Migration
You’ve now completed a full manual WordPress migration between two hosting providers: backing up files and database, preparing the new environment, copying everything over, updating configuration, testing thoroughly, and switching DNS with minimal downtime.
Once you’re confident the new host is stable and all traffic has switched over, you can cancel your old hosting account. Keep your backups for a while longer and document your process so you can repeat it smoothly the next time you move or clone your site.
As a next step, consider optimizing your new hosting setup for speed, security, and regular backups so you’re ready for growth and future changes.
Further Reading
- How to Migrate a WordPress Site to a New Host
- WordPress Migration Checklist for Blogs
- WordPress Disaster Recovery Walkthrough
- How to Create a WordPress Staging Site
- WordPress Hosting Backups: What You Need to Know
Frequently Asked Questions
Can I migrate my WordPress site between hosts without any downtime?
What should I do if I see a database connection error after migration?
wp-config.php settings don’t match the new database. Check that DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST match exactly what you created on the new host. Also verify that the database user has full privileges on the database and re-test.



