How to move WordPress to a new host
Nearly four in ten websites run on WordPress. In its November 2026 survey, W3Techs found WordPress on 38.3% of the sites it tracked. It remains the most widely used content management system. W3Techs usage statistics.
A photographer might use WordPress to share a portfolio, a school to post its class schedule, a restaurant to update its menu, or a toy shop to take orders. You sign in to update a photo, publish a post, or change a price. As long as your work goes smoothly and pages load quickly, there’s little reason to think about hosting.
Over time, your site might outgrow its plan. Maybe there’s no room for new photos, or pages take longer to load when more people visit. If you regularly hit your plan’s limits, ask your host whether another plan would help. If it has no suitable option, it’s worth looking elsewhere. Once you’ve found a new host, how do you move a site people still use every day?
How the WordPress move works
You can set up WordPress on the new host and test it yourself while visitors still use the old site. Once the copy works, bring over the latest changes and point your domain to the new host.
You’ll need the files and the database. Themes, plugins, and images live in the files. Posts, users, and settings live in the database. First, we’ll restore both and check the copy. Then we’ll bring over anything that changed on the old site during testing.
We’ll work from the hosting control panel and the WordPress dashboard. Talk through the move with your host in advance if you run a WordPress Multisite network or a store that can’t pause checkout.
1. Set up the new host and back up your site
Give the copy a place to live while your old site is still running. Add the domain in your new hosting panel. Look next to the domain for the folder the server will use for the site. Note its name and the new server’s IP address. You’ll use the IP when you test the copy under your domain.
Check that the new host can run your version of WordPress and your plugins. On the old site, go to Tools → Site Health → Info. The Server and Database sections show the PHP and database versions. If you’re unsure about compatibility, send those details and your active plugin list to the new host. Ask whether you can test the copy over HTTPS before you point the domain to the new server. Those same details can help you choose a plan if you’re still deciding where to move. Host4Biz WordPress hosting.
You’re ready to download two files from the old host.
- An archive of your WordPress files. In the file manager, archive the whole site folder. Check that it includes wp-content with your themes, plugins, and uploads, along with the hidden .htaccess file if your site has one. Find wp-config.php. If it lives one level above the site folder, download it separately.
- An SQL file with your database. Open wp-config.php and look for the name beside DB_NAME. In the old hosting panel, open phpMyAdmin, a tool for working with the database in your browser. Choose that database from the sidebar and open the Export tab. Save the site’s tables in SQL format. If several sites share the database, ask your host which tables belong to yours. You’ll need the plugin tables too. The export tool in the WordPress dashboard won’t include them.
Try opening the archive and make sure you have the SQL file. If the file exceeds the upload limit in the new host’s phpMyAdmin, ask support to help with the import while the old site is still running.
2. Restore the files and connect WordPress to the new database
In the new host’s file manager, unpack the archive into the folder you noted in step one. If it’s called httpdocs, look for index.php directly inside it, at httpdocs/index.php. If you see the host’s default page later, check whether the files ended up one folder too deep. Once you’ve unpacked the archive, remove it from the site folder so it can’t be downloaded through a browser.
Now bring back your posts and settings. In the new hosting panel, create an empty database and a user who can access it. Open phpMyAdmin on the new host, pick the new database on the left, and upload the SQL file from the Import tab. Look for the list of tables under the database name when the import finishes.
WordPress still has the credentials for the old database. In the file manager, open wp-config.php on the new host and enter the values from your new hosting panel.
| Find this in the file | Enter this value |
|---|---|
| DB_NAME | The name of the database you imported into |
| DB_USER | The database user’s name |
| DB_PASSWORD | That user’s password |
| DB_HOST | The database server address your host provides |
Look for $table_prefix in the same file. It’s the first part of the table names. If phpMyAdmin shows a table called move_options, the prefix should be move_. If WordPress asks you to install it again, start by checking the database name and prefix. If it can’t connect, check the four values and confirm that the user has access to the new database. WordPress configuration reference.
Some hosts let you import a WordPress site directly from their panel. If the import copied your files and database for you, you’re ready to test the site.
3. Test the new copy while visitors use the old site
Your files and database are in place. But for now, opening the usual address still takes you to the old site. To reach the new server from your computer, add a line to your hosts file with the new IP and your domain. In 192.0.2.10 example.com, the IP comes first, followed by the domain. Substitute your own values, then open the site again. If the two copies look alike, tell your new host which page you opened and when. Support can check the server logs to see if your request reached the new copy. How to edit the hosts file.
If you’re changing domains, test the copy at the new address. If the browser sends you back to the old one, open the settings table in your new database in phpMyAdmin, such as wp_options. Look for two rows with addresses.
- home is the address visitors use to open your site.
- siteurl is the address of the WordPress installation itself. If the files are in a subfolder called /wordpress, keep that part of the address if the folder still exists after the move.
Enter the new addresses in the option_value column. If WP_HOME and WP_SITEURL are set in wp-config.php, update the file too. Once you can sign in to the dashboard, you can fix links inside the pages.
If the browser warns about the certificate, use the preview method your host provided. Some hosts can issue a certificate only after you change DNS. If that applies to you, check HTTPS again right after the switch and before reopening checkout.
Start with the pages people use. Open the homepage, another page, and an existing photo. If the homepage loads but other pages show a 404 error, go to Settings → Permalinks and save your current settings. If that doesn’t help, send your host a link to a page that fails.
Then sign in and upload a new photo to the Media Library. Open it from its link. Old photos can still load even when WordPress can no longer save new ones. This check catches the problem while you still have time to fix it.
If you have a contact form, send a test submission and check the test inbox. If you run a store, try the checkout in your payment provider’s test mode. Keep live payments and automated mailings turned off on the copy. The payment provider can’t see the hosts change on your computer. Test its payment notifications on a staging site it can reach, or check them after the switch.
4. Fix any old file paths or links you find
Suppose the site opens at its usual address, but the backup plugin tries to save an archive in a folder that no longer exists. The domain can stay the same even when the full path changes from /home/olduser/public_html to /var/www/vhosts/example.com/httpdocs. If the error comes from just one plugin, start in that plugin’s settings.
If the test photo wouldn’t upload, open the settings table in the new database with phpMyAdmin. Find upload_path in the option_name column. If option_value still shows the old path, update it. For the standard wp-content/uploads folder, you can leave the value blank. Check wp-config.php too. If UPLOADS is defined there, WordPress takes its path from that setting. If the path looks right, ask your host to check whether WordPress can write to the folder. How WordPress chooses the uploads folder.
A domain change can leave a different trace. You open a post on the new copy, click a link, and end up back on the old site. If you have lots of links to fix, back up the new database and install Better Search Replace on the new site. Open it under Tools in the dashboard. Enter the old and new addresses, select the site’s tables, and run a dry run. If the results look right, run it again with dry run turned off. Leave GUID replacement off to keep the permanent identifiers of your posts. You can fix an old folder path the same way in a separate run. Better Search Replace.
Why not just open the SQL file and replace the old domain? Some plugins store text together with its length. A plain text replacement can make those settings unreadable. Better Search Replace and WP-CLI handle that format. If you can’t install plugins, send your host the exact old and new values and ask them to run the replacement on the copy.
If you already use WP-CLI, you can run the dry run from the folder of the new copy:
wp search-replace 'https://old.example.com' 'https://new.example.net' \
--all-tables-with-prefix --skip-columns=guid --dry-run
Use your own addresses or put in two folder paths. The command checks tables with this installation’s prefix, including plugin tables with the same prefix. To limit the check to specific tables, name them instead of using --all-tables-with-prefix. Remove --dry-run once you’ve reviewed the results. After fixing the issue, repeat whichever check failed. Upload another photo, try the link, or run a backup again. WP-CLI search-replace reference.
5. Bring over the latest changes and switch the site
The test copy works. Think back to the first time you exported the database. Comments, inquiries, and orders that came in later are still on the old site. Pick a time when you can briefly pause changes, then export the database again. Copy files added or changed since the first backup too.
For a store, pause checkout on the old site before exporting the database. Look at the orders awaiting payment and ask the payment provider how to reconcile their statuses. If a customer pays after you export, the order may still show the old status in the copied database. Check it against the payment provider’s records. Export all store tables. WooCommerce can store orders separately from regular WordPress posts. How WooCommerce stores orders.
On the new host, import the fresh SQL file into an empty database and point wp-config.php to it. Apply any address and path changes you made on the test copy. Before you switch, sign in and look for the latest posts or inquiries. If it’s a store, check orders, payment statuses, and stock levels as well.
Now you can send visitors to the new server. If your domain points straight to the host, change the IP in its A record to the new server’s IPv4 address. If there’s an AAAA record, ask the host which IPv6 to use or whether to remove it. If you use a service like Cloudflare, check the domain settings there. If you’re changing domains, set up redirects from old pages to their new addresses. How to move a website to a new host and check DNS and email.
Remove the temporary line from hosts and open the site at its usual address. Check that the new server delivers the page and the browser accepts its certificate. On the new store, enable live payments and place a test order. Keep checkout closed on the old copy while anyone might still land there. Run automated mailings and background jobs on one copy so they don’t run twice.
If you need to send visitors back to the old server, first check for new inquiries or orders on the new copy. If any came in, save both databases and work with support to bring those records back. That saves you from looking for customers’ data in two dashboards after the rollback.
After the move
Go back to the reason you changed hosts. If your photography blog ran out of room, upload a new set of photos. If the school site slowed down on the days you posted the schedule, see how it handles the next update. For a store, make sure a customer can place an order and you can see the payment in the dashboard.
You can close the old hosting account once the new site can handle its usual work, you’ve checked for missing data, and you’ve moved any services still running on the old host, such as email for your domain. Keep the files and database backup somewhere you can find them if you need an older photo or an order record.
If you’re planning the move and would like our help, send us the site address and tell us what matters most. It might be email, booking inquiries, or orders you’re still waiting to be paid for. Get help moving your site.
Good luck with the move. We hope the new host gives you more time to spend on the site itself.