How to Migrate a WordPress Website: Step-by-Step Guide

In many cases, moving to a new host isn’t such a big deal because your new WordPress hosting provider often takes care of the transfer. And if your website isn’t too big or overly complicated, the whole transfer rarely takes more than an hour or two.

Still, there are times when switching to a new provider means you have to migrate the site data manually. If you ever find yourself in such a situation, this guide might be the perfect solution. We will show you how to properly transfer an existing WordPress website with minimum effort, regardless of whether both providers utilize cPanel.

Let’s get to it then.

Compatibility Checks: Ensuring Your New Hosting Environment is Ready

It may sound like a no-brainer, but you have to first ensure your chosen environment is well-suited for a WordPress site migration. The silliest thing you can do is to opt-in for a new hosting provider only to find out they don’t support your CMS. In the case of WordPress, for example, going for a Windows server will make the task of hosting your website next to impossible.

So, what do you need to keep in mind? 

Two things should be of prime consideration, really – your application core and your WordPress plugins. 

The CMS itself is pretty reasonable when it comes to requirements – it only needs PHP and MySQL to function properly, so pretty much any Linux server configuration can do the job. Naturally, depending on your app version, you have to see which version of the programming and database solutions will best fit your needs. 

Your WordPress theme and plugin compatibility should not be underestimated, either. Each add-on has its specifics, so you must also check if yours would work well on the new hosting server. Keep a close eye on the PHP version for each of your plugins and check with your host if they support the version that can best accommodate them all. 

IMPORTANT: The ScalaHosting support team will gladly review your entire site and check the version requirements for your core application and add-ons. We support all PHP versions from 5.6 onwards, and Scala clients can even switch between them easily from their control panel with us.  

Backup your WordPress site: Essential Steps to Ensure Data Safety

Backing up all the files and database of your website should be a daily procedure, regardless of whether you make any changes or not. Naturally, before undertaking such a critical operation as a site migration, doing a full backup is self-explanatory. 

There are several ways you can go about creating your archive:

  • Ask your hosting provider to perform a data backup and give you the file location
  • Utilize a WordPress plugin to create a backup file
  • Create the backup manually and use an FTP client as an export method

Whenever you switch hosting providers, it’s always a good idea to clean some site clutter. Do a full review of your WordPress project and see if you can remove unnecessary plugins or customizations that might be slowing down your performance. If your website is not properly optimized on your old hosting account, moving it to a new one will rarely solve any performance issues. 

IMPORTANT: Don’t forget that your site files are not the only ones that need backing up. You have to also consider your database, add-ons, emails, and any custom settings you might have applied. Full account backups are often the best solution.

Export your WordPress database

First things first. Before moving your old website to a new location, we need to secure its main components – the database and the site files. The former contains all the records of your site data, so it is essential to keep them intact so your pages remain operational.

Here are the steps to export your information:

  1. Log into your control panel.
  2. Go to PhpMyAdmin under the Databases tab.
  1. Once inside, find your database on the left and choose the Export tab from the top menu.
  1. You will see options for Quick and Custom export. Make sure to keep the Format drop-down as SQL.
  1. Click the Go button. You will be prompted to choose a destination on your computer to download the database file archive.

You now have a copy of your WordPress database saved on a local machine. We will need that later, but now we have to turn our attention to the site files.

Transferring your WordPress Files

Now that we have secured our database, it’s time to do the same for our website files. To do that, we can either use the File Manager in our control panel or transfer them via an FTP client like FileZilla. 

If you choose to utilize the in-built File Manager, the process of downloading your files is as simple as clicking the option, selecting your WordPress folder, and clicking the Download button.

FTP clients are a bit more complicated but still relatively straightforward. If you are using FileZilla:

  1. Log into your FTP client. For that, you need your server hostname, username, password, and port number. If you are unsure of any of these credentials, simply ask the hosting provider where your live WordPress site resides.
  2. Once you input your information, click on Quickconnect.
  3. You will see a full list of your files in the right panel. If your website is in the public_html folder, you can safely select all files and click the Download option. If your installation is in a subfolder, you can download just that.

IMPORTANT: Make sure to select all WordPress folders—wp-admin, wp-content, and wp-includes—as well as any hidden files, like the .htaccess one.

  1. Choose a destination folder on your computer and click Save.
  2. Not a mandatory step, but you can now archive your information into a single ZIP file. This will compress the data and make it easier to upload later. 
  3. We are now moving to your new web hosting account. Either log into your control panel File Manager or re-login to your FTP client with the new server credentials.
  4. Select the public_html folder (or the subfolder you want to migrate the WordPress site to). If there are other files existing in the folder – delete them to avoid discrepancies.
  5. Click the Upload option and select your old site archive file from your computer. 
  6. Extract the archive once the upload is complete. 

This should do the trick for your site files. It is now time to get back to the database and recreate it with your new web host.

Create a New WordPress Database

How to Migrate a WordPress Website: Step-by-Step Guide, Create a New WordPress Database

We have already saved an SQL file from our existing website on our computer, but we cannot just copy it to the new server. This is why we have to create a new database and upload the saved data. 

  1. Log into your control panel.
  2. Go to MySQL Databases under the Databases tab (the same for SPanel and cPanel).
  3. Click the button Create Database or a User.
  4. On the next screen, we fill in the needed credential information. Make sure to leave the checkbox Grant Access to Database ticked.

You now have a database on your new hosting account, but it is empty. There is another quick step we need to undertake. 

Import Your WordPress Database

In order to fill our new database with the existing WordPress website data, we have to do the following:

  1. Open your control panel dashboard.
  2. Go to phpMyAdmin under Databases.
  3. Select your new database on the left and click on the Import tab.
  4. Find the old site’s database on your computer.
  5. Once selected, click Go to initiate the migration process.

The entire import shouldn’t take more than a minute or two. After all is done, you can move to the next step.

Configuring the wp-config.php file

The wp-config file is crucial as it contains information about your database. Not only that, but it also helps your WordPress app connect to the right database and its underlying data.

You will find the wp-config file in the folder where your WP installation resides. Open it with any notepad tool and look for the following lines:

/** The name of the database for WordPress */

define( ‘DB_NAME’, ‘database_name_here’ );

/** Database username */

define( ‘DB_USER’, ‘username_here’ );

/** Database password */

define( ‘DB_PASSWORD’, ‘password_here’ );

/** Database hostname */

define( ‘DB_HOST’, ‘localhost’ );

Here, you need to replace the existing database name, user, password, and host with the credentials from your new host. After that, you can save the file and close the Notepad app.

Test Your Website to Ensure Everything is Working

After you complete the steps above, it’s time for a test to verify your website is loading fine on the new server. You can do so by editing the hosts file on your computer to make your domain resolve to the new server, but just for you. This means that regular visitors will still load the content from the old server while you check if everything is running fast and error-free on the new machine. Think of it like a staging site at this point. 

Don’t forget to set it back to default after your testing is completed to avoid confusion in the future.

Sounds a bit too complicated?

Here is a wonderful guide to help you edit the hosts file

DNS Settings Update

This step is needed if you already have a domain name for your existing website and will continue using it with the new WordPress site. 

You have already moved your files and database, but the domain still points to the old server IP address. To point it to your new hosting service, you need to go to the domain name registrar and change the destination IP to resolve the new server (your host can give you the details if you don’t have them). 

IMPORTANT: Keep in mind that any DNS change requires some time to propagate globally. Usually, that happens within a few hours, but it can sometimes take 24-48 hours at maximum. In the meantime, don’t cancel your old hosting account to avoid downtimes.

While there is no definitive way to ensure the propagation period is over, you can try a few online DNS propagation checkers as they test your domain connectivity through different nameservers.

Permalinks Update for Proper Site Navigation

This step is necessary if you’re not only migrating your WordPress website but changing to a new domain name as well. Failing to do this will render your images and site URL paths inoperable.

WordPress users can benefit from an evergrowing ecosystem of plugins that allow them to change all kinds of functionalities and add a limitless variety of features to their websites. Updating permalinks is no different, and the WP community offers numerous tools for that purpose.

The more popular choices include:

  • Search & Replace Everything by WPCode
  • Search and Replace DB
  • Update URLs
  • Go Live Update URLs

Any of these WordPress add-ons will help you replace your old URLs with new ones. For example, using the Search & Replace Everything plugin will only require a quick installation, after which you will see a new menu with the same name under Tools in your WP dashboard. 

Clicking on it, you can update all your permalinks quickly through the two fields:

  • Search For: [old domain name]
  • Replace With: [new domain name]

You can also select individual tables in your WordPress database to change the URLs for a particular section (e.g., the comments section).

IMPORTANT: If you’re keeping the same domain name, simply log into your WordPress dashboard and go to Settings->Permalinks. Choose the desired URL structure and click on Save Changes to update your permalinks.

Using Migration Plugins to Move to a New WordPress Host

Transferring your WordPress site manually is not a particularly difficult task, but you can make it even easier with…you guessed it…the help of a plugin.

Here are some of the best tools to move WordPress sites to a new location:

  • UpdraftPlus
  • Duplicator
  • All-in-One WP Migration

For the purpose of our guide, we will review the easy steps to migrate a WordPress project with All-in-One WP Migration.

  1. Download and install the plugin from the WordPress repository. You should do that on both your old and new servers.
  2. Go to All-in-One WP Migration on the left menu and choose Export. This will create a site backup in a .wpress format. 
  3. Save the backup file on your computer.
  4. Go ahead and install WordPress on the new hosting account.
  5. Get into the dashboard of the new site, and once you install the plugin, go to Import
  6. Click the option Import From and then File. Find the .wpress backup file and start the upload process.

IMPORTANT: If your backup file is too big, it might take too long to upload and become unresponsive. In such a case, uploading the archive through FTP is the best approach.

  1. Now, go to All-in-One WP Migration -> Backups. Locate your backup file. Next to it, there is an option Restore.
  2. Click Proceed to restore the archive.

Once you have restored your backup, make sure to update permalinks using the instructions in the previous chapter. 

Troubleshooting Common Migration Issues

While you can migrate a WordPress site without advanced technical knowledge and previous experience, there are still some potential risks to watch out for. This rings especially true if we’re moving the files and database and switching to a new domain name. 

Here are some common pitfalls that WordPress webmasters may encounter in their journey:

Fixing Broken links: Updating URLs and Correcting Paths

When you move your CMS site to a different domain name, updating your permalinks should be one of your prime concerns. We have already learned how to use popular WordPress plugins to handle this task, but what happens if there are still URLs that lead to nowhere (the so-called 404 error pages)?

Quite easy, actually – another add-on can easily be your go-to option.

Take the All-in-One SEO plugin, for example (developed by the same people who brought us the All-in-One WP Migration tool we used earlier). Once installed, you can go to its Redirects menu, Settings tab, and turn on toggles for 404 and Redirect logs.

Once you have those logs enabled, you can easily collect data about links that lead to non-existent pages. Using this information, the plugin allows you to create redirects to each of those pages so there are no “dead ends” on your WordPress website.

Dealing With File Permission Issues

File and folder permissions are another thing you should keep in mind when doing a manual migration of your website.

Unless you have applied some custom rules on your WordPress projects, the default values you’re looking for should be:

  • 755 for folders – the owner can read, write, and execute them.
  • 644 for files – the owner can read and write them, while other users can only read them.

To learn more about file/folder permissions in your control panel – check out this article.

Now, while you can do the necessary checks and changes with a WordPress add-on, let’s learn how to edit your permissions via FTP. 

Once you migrate your WordPress site to the new hosting environment, open your FTP client and load the destination folder where your app resides.

First, select your folders, right-click, and select File Permissions. In the pop-up window, make sure the numeric value is 755 and the ticked option is Recurse Into Subdirectories -> Apply to Directories Only. Click OK.

Now, select all files and folders and go to File Permissions again. This time, the value should be 644, and the bottom option – Apply to Files Only. That’s all there is to it.

phpMyAdmin is Timing Out

If your WordPress website is small and contains little information – you will probably never have an issue transferring it. The more it grows, though – its database gets bigger and fills in with more records. This can get to the point where a database import/export through phpMyAdmin could take too long and just time out. 

So, how do we deal with that?

The best way to surpass this obstacle is to use a command prompt tool – SSH or WP-Cli can easily do the trick. Most hosting providers offer that option, so you can check with them on how to use those solutions.

In the SSH terminal, for example, the command for importing a database is:

mysql -uUSERNAME -p DATABASE < backupname.sql

As for database export, you can use:

mysqldump -uUSERNAME -p DATABASE > backupname.sql

Simply replace the fields with your database credentials and your backup file name. 

Error establishing a database connection

The most common reason for this error is some typo in your wp-config file. To eliminate this possibility, open the PHP file with a notepad app and double-check your database name, username, and password

If everything looks good on that end, type yoursitename.com/wp-admin to see if you can open your admin backend. If you see an error there – this was the cause of the database connection issue. To fix it, you can type the following line in the wp-config.php file:

mysqldump -uUSERNAME -p DATABASE > backup.sql

Once done, go to the URL: https://www.yoursite.com/wp-admin/maint/repair.php . You should see a screen that looks like this:

The first option performs a standard repair, which is sufficient enough in most cases.

If everything starts working as it should, you can re-open the wp-config file and delete the repair line you added earlier. 

Transferring a WordPress Website to ScalaHosting

If you want to enjoy a fast and seamless data migration, look no further than ScalaHosting. As part of our services, we will be glad to transfer your WordPress sites absolutely free of charge, so you don’t have to deal with any of the procedures we discussed today. 

Once you become a customer, you only need to submit a ticket to our support team, provide your login credentials with the old host, and specify the best time for migration. Our experts will take care of the data transfer and ensure everything works properly afterward. Your site visitors will not experience any downtime, and you only need to change your domain name server to point to the new account with us. 

WordPress fans will feel right at home with ScalaHosting. You can choose from a number of web server solutions and data center locations for a great website foundation. Once a client, you can enjoy unique software offerings like SPanel (for server and site management), SShield (for security monitoring), and SWordPress Manager (for new WordPress installation and security tweaks). 

The ScalaHosting Support Team is certainly one to write home about as well. The friendly boys and girls are specifically trained to help with any WordPress-related issues, and even if you can’t get your case resolved immediately – you can always escalate to a next-level member to have a look.

Final Takes

As you can see, migrating a WordPress website is an easy task, especially if you have the right hosting provider behind your back. Check out ScalaHosting’s managed WordPress plans, and benefit from lightning-fast servers and uninterrupted uptime at highly affordable rates. For best performance and security, you can also consider our versatile Managed Cloud VPS deals.

How to Migrate a WordPress Website: Step-by-Step Guide
Supercharge Your Business with an All-inclusive Fully Managed Cloud
Free, Effortless & No-Downtime Migration
Anytime Unconditional Money-back Guarantee
Full Scalability & 24/7 Expert Cloud Support

Frequently Asked Questions

Q: What are the steps to manually migrate a WordPress site?

A: A manual WordPress migration typically goes through a few important steps:
1. Creating a site backup
2. Exporting the WordPress database
3. Transferring the site files
4. Creating a new WordPress database
5. Importing the existing database data
6. Testing if everything works as it should
7. Updating the permalinks
8. Updating the DNS nameservers

Q: Will my website suffer from downtimes during a migration?

A: If done right, a WordPress website migration should involve no downtime at all. For starters, make sure to keep your old hosting account active, and your domain name pointed to it. Perform the site transfer and ensure everything works as expected in the new environment. You can then point your domain to the new server, and only then should you cancel your old hosting account if needed. 

Q: How long does a WordPress site migration normally take?

A: The site migration duration strongly depends on the size of the WordPress website and its complexity. A fairly small and simple project can take less than an hour. The bigger it gets – the more time you should expect it to take. Large enterprise sites with many custom settings can take a good portion of the day. 

Was this article helpful?

What’s your goal today?

1. Find the right WordPress hosting solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lightning-fast

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Make your website lighting fast—or your money back
Slow websites lose visitors and sales. See how you can surf tsunami sized traffic spikes—or any traffic—with ease with ScalaHosting. Fill out the form, and we’ll be in touch!
Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.

Photo

Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2025

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain