Moving WordPress host: a step-by-step guide

By Unlimited Published 14 December 2018 Updated 11 March 2026 6 min reading time
Moving WordPress host: a step-by-step guide

Switching web hosts is one of those tasks that sounds more daunting than it actually is. Whether you are moving because of poor performance, rising costs or simply wanting a better service, the process follows a predictable set of steps that anyone can work through.

This post covers everything you need to move a WordPress site to a new host, from taking a full backup through to pointing your domain at the right place and confirming everything is working.

Back up your site before you do anything else

A full backup is non-negotiable before any migration. If something goes wrong mid-transfer, you need a clean copy to restore from. There are two parts to a WordPress backup: the files and the database.

Your WordPress files include everything in your public_html directory: your theme, plugins, uploads and the WordPress core files themselves. Your database holds all your posts, pages, settings and user data. You need both.

The most reliable way to back up is through your current hosting control panel. In cPanel, you can use the Backup Wizard to download a full account backup, or export your database separately via phpMyAdmin. If you prefer a plugin-based approach, tools like UpdraftPlus or Duplicator will handle both the files and the database in one go. Our WordPress backup guide covers the plugin route in more detail.

Set up your new hosting account

Before you transfer anything, your new hosting account needs to be ready to receive it. Log in to your new control panel and create the domain or subdomain where the site will live. You do not need to update your DNS yet. At this stage you are just preparing the destination.

Create a new MySQL database and database user on the new host. Note down the database name, username and password. You will need these when you restore your WordPress installation. In cPanel, this is done through the MySQL Databases section. Our guide on creating a MySQL database in cPanel walks through the process.

Transfer your files and database

With your backup in hand and your new account ready, you can move the files across. The two most common methods are FTP and cPanel’s file manager.

Connect to your new host via FTP using a client like FileZilla, then upload the contents of your WordPress directory to the public_html folder (or whichever directory your domain points to). This can take a while depending on how many images and uploads your site has accumulated.

Once the files are uploaded, import your database. Log in to phpMyAdmin on the new host, select your newly created database and use the Import tab to upload the .sql file from your backup. If your database is large, you may need to import it via the command line instead. Our guide on importing SQL over the command line covers that approach.

Update wp-config.php with your new database details

After uploading your files, open wp-config.php in a text editor. This file tells WordPress how to connect to its database. You need to update three values to match the new database you created:

  • DB_NAME — the name of your new database
  • DB_USER — the database username
  • DB_PASSWORD — the database password
  • DB_HOST — usually localhost, but check with your new host if you are unsure

Save the file and re-upload it. Without this step, WordPress will try to connect to a database that no longer exists on the new server and your site will not load.

Preview the site before changing your DNS

You should test the site on the new host before pointing your domain at it. The most reliable way to do this is by editing your local hosts file, a system file on your computer that maps domain names to IP addresses. By adding an entry for your domain pointing to the new server’s IP, your browser will load the site from the new host while everyone else still sees the old one.

Our guide on editing your hosts file covers how to do this on Windows, Mac and Linux. Once you have confirmed the site loads correctly, all pages work and no images are broken, you are ready to update your DNS.

Tip: Check your SSL certificate on the new host before going live. If you are using a Let’s Encrypt certificate, you will need to issue a new one through your new control panel. Our guide on installing a Let’s Encrypt SSL certificate covers the steps.

Update your DNS and go live

When you are satisfied the site works on the new host, update your domain’s nameservers or DNS A record to point to the new server. If your domain is registered with UWH, you can manage this from your client area. If it is registered elsewhere, log in to your registrar and update the nameservers there.

DNS propagation is the process by which the updated records spread across the internet’s DNS servers. It typically takes between one and 24 hours, though it is often much faster. During this window, some visitors may still be directed to the old host. Our guide on checking DNS propagation shows you how to monitor the process.

Once propagation is complete, your site is live on the new host. Keep your old hosting account active for a few days before cancelling it, just in case you need to refer back to anything.

Common issues after migration

A few problems come up regularly after a WordPress migration. Most are straightforward to fix once you know what to look for.

White screen or database connection error. This almost always points to incorrect database credentials in wp-config.php. Double-check the database name, username, password and host against what you set up on the new server.

Broken links or missing images. If your old site used a different domain or subdomain during testing, WordPress may have stored those URLs in the database. A search-and-replace tool like WP-CLI’s search-replace command or the Better Search Replace plugin will update them across the whole database.

Redirect loops. These can occur when your SSL settings or .htaccess file conflicts with the new server configuration. Our guide on fixing too many redirects covers the most common causes.

Admin password not working. If you cannot log in after the migration, you can reset your WordPress admin password directly from the database. Our guide on resetting your WordPress admin password explains how.

Moving a WordPress site takes a bit of preparation, but following these steps in order keeps the risk low. Back up first, test before going live and keep the old account available until you are confident everything is working.

If you are looking for a new home for your WordPress site, take a look at our WordPress hosting plans.

If you run into any issues during your migration, our team is happy to help. Get in touch and we will take a look.

You May Also Like

Related articles you might find interesting.

WordPress

Boost WordPress speed with caching

5 min read. 31 March 2025. Angus.
WordPress

Unlimited Web Hosting Has Been Nominated for Monster’s Award 2022!

2 min read. 13 December 2022. Lee.
WordPress

How can plugins compromise WordPress security?

11 min read. 19 September 2021. Lee.

Running a WordPress site?

Get fast, secure and reliable WordPress Hosting with optimised for performance with AccelerateWP.

Get WordPress Hosting

Need multiple accounts?

Create fully isolated individual accounts for your clients and manage them all from one dashboard.

Get Reseller Hosting