Development

How to migrate a WordPress website? | A step-by-step guide

Do you know? Over 70 billion blog posts are published on WordPress every month. However, they might not all be performing very well. They might want to improve speed, enhance security, change their CMS, or switch to a new hosting platform. This is when WordPress website migration comes in. 

Migrating a WordPress website means transferring it from one hosting environment or domain to another, without losing your content, web design, or SEO rankings. It may sound technically complicated, but with the right method, it can be very simple. 

If you want to learn “How to migrate a WordPress website?”. This guide discusses the best methods for migrating a WordPress site. Understand them and choose the best ones according to your needs. 

Why might you need to migrate a WordPress site?

Here are the common reasons why you need to migrate your WordPress websites: 

⭕ Changing hosting providers: One of the main reasons is to change hosting providers. Many users start with shared hosting platforms. As their traffic grows, they move to faster or more secure hosts to improve their performance efficiently. 

⭕ Switching domain names: Switching domain names also requires businesses to migrate their websites. For instance, when they rebrand, they may switch from a .net domain to a .com domain or upgrade to a more suitable one. 

⭕ Converting from staging to live: Migration is also essential to convert a website from staging to a live environment. Developers, when building websites, work on them in a staging environment and migrate them to the live server when testing is complete. 

⭕ Redesign or structural changes: According to a report, 95% of organisations struggle with server downtime, and it can last almost 2 hours. When they are updated, migration helps significantly than rebuilding them on the live domain. 

⭕ Security, backup, or restoration: Websites face various cyber threats from external intruders. You may want to migrate them from hacks, restore a previous version, or clone your website elsewhere for testing. 

No matter the reason, migration should be precise to avoid data loss, downtime, or SEO issues. 

DO YOU KNOW?

The hourly cost of downtime now exceeds $300,000 for 91% of SME and large enterprises. 

Things to do to prepare the site for migration

Before migrating your WordPress website, there are several things that you must do. 

Before touching anything, make sure that your current site and destination server are fully ready. This significantly avoids 90% of the common migration errors. Here are some things you should keep in mind before migration: 

1. Backup everything first

The first thing is to back up, which is storing both your WordPress files and databases. For that purpose, you can use plugins like UpdraftPlus, Duplicator, and BlogVault. However, you can also use your hosting control panel to manually download backups. 

Backups are important because if anything goes wrong during migration, you can always restore your original site instantly. 

2. Check software compatibility

Checking the new software for its compatibility and consistency. Make sure that the target hosting environment supports your WordPress version and PHP version. 

For example, if your website uses PHP 8.1, make sure that the new server isn’t limited to PHP 7.4. A lower PHP version of the new hosting will lead to the breakage of themes and plugins. 

3. Note down credentials

A WordPress website has many credentials. When migrating it to a new hosting environment, you must note them down. Common site credentials are FTP/SFTP login for file transfer, cPanel or hosting dashboard access, and database name, username, and password. 

You might also require the domain registrar login to update DNS later. Keeping these credentials ready can save you time mid-process. 

4. Temporarily disable caching and firewalls

WordPress websites are commonly protected using firewalls like Cloudflare, Wordfence, or W3 Total Cache. 

So, when migrating your site, ensure that you block them temporarily, as they can block file transfers or database imports. It would be helpful to avoid timeouts or incomplete migrations. 

5. Enable maintenance mode

It is recommended to put the site in maintenance mode during the migration process. When you’re working on your WordPress website during the live domain, visitors will be able to see broken pages during migration. 

So, use plugins like SeedProd Coming Soon to enable maintenance mode effortlessly. It will enable you to work peacefully on your website. 

Method 1: How to migrate a WordPress website with a plugin?

The first method to migrate a WordPress website that we’re going to discuss in this blog is using a plugin. WordPress controls 60.8% of the CMS market. Plugin-based migration is the easiest and safest method to migrate a website, and you don’t need to be technically aware to do it. 

For that purpose, there are multiple popular plugin options, such as Duplicator, All-in-One WP Migration, and UpdraftPlus Migrator. Let’s discuss the steps to migrate a website using one of the most reliable plugins, known as Duplicator. 

Step 1: Install and activate Duplicator

The first step is to install Duplicator. To do so, go to the Plugins. Click the Add New button in your WordPress dashboard. Search for Duplicator. Install it and activate it for use. 

Step 2: Build a site package

After you have activated the Duplicator, the next step is to navigate it. Find Packages and then click Create New. Follow the on-screen instructions to scan the site for issues. Click the Build button to create the installer file and the archive file. It will allow you to have a full backup of your website. 

Step 3: Download the files

Once the site package is complete, the next step is to download those files. To do so, download the installer.php and the .zip archive files. They will contain the data and information of your website. 

Step 4: Upload to the new hosting

Now that you have the package files, it’s time to upload them to the new hosting. Use FTP or your hosting file manager to upload both installer.php and .zip files to the root directory of your new hosting. 

Step 5: Run the installer

After uploading the critical files, you must run the installer. If your browser, go to: 

https://yournewdomain.com/installer.php

An installation window will open. Then, follow the installation wizard: 

  • Create a blank database and enter the credentials of the new database. 
  • Click Run Deployment to unpack the site. 
  • Update the URL of your site if needed, from staging to production. 
  • Complete the final cleanup. 

After taking all these essential steps, your WordPress site is now live on the new server. Check for broken links, missing images, and permalink structures. 

Method 2: How to migrate a WordPress website manually?

The second method that we’ll discuss is the manual migration. If you don’t wanna use plugins and want full control, then manual migration is an excellent alternative. This involves manually exploiting the database, moving files, and reconfiguring settings. 

Here are the critical steps that you must follow to migrate your WordPress website manually: 

Step 1: Download website files

The first step is to download your website files. Connect your current website using FTP or SFTP. Then, download all WordPress files, including the wp-content folder, wp-config.php, themes, plugins, and uploads. This can take time for larger sites. 

Step 2: Export the database

Once you have downloaded the essential files, the next step is to export them to the new hosting. Go to your hosting’s phpMyAdmin. Select the WordPress database, then click Export. Choose the Quick and SQL format, and click the Download button. You now have a .sql file containing all your site’s content, settings, and structure. 

Step 3: Prepare the new environment

As you have all the critical information from the existing hosting, prepare the new environment to post it. On the new hosting, create a black MySQL database, username, and password. Note these credentials carefully, as you’ll update wp-config.php with them. 

Step 4: Upload files to the new host

Now, you have to upload the downloaded files and data to the new host. Use FTP to upload everything from the old server, including plugins, themes, and graphics, to the new server’s public_html directory

Step 5: Import the database

After uploading files, import the database that you exported from the old server. Go to phpMyAdmin on the new host. Select the new database, click Import, and upload your .sql file. Wait for the import to finish without errors. 

Step 6: Edit wp-config.php

Once you are done with uploading files and the database, edit the wp-config.php on the new hosting. Update the following lines to match your new database credentials: 

define(‘DB_NAME’, ‘new_database_name’);

define(‘DB_USER’, ‘new_database_user’);

define(‘DB_PASSWORD’, ‘new_password’);

define(‘DB_HOST’, ‘localhost’);

Save and re-upload the wp-config.php file if you have edited it locally. 

Step 7: Update domain URLs

If you have changed your domains, run these SQL queries in phpMyAdmin: 

UPDATE wp_options SET option_value = ‘https://newdomain.com’ WHERE option_name = ‘siteurl’;

UPDATE wp_options SET option_value = ‘https://newdomain.com’ WHERE option_name = ‘home’;

Moreover, you can also use a Search-Replace tool to fix any old URLs inside posts, menus, or widgets. 

Step 8: Test your website thoroughly

Now that you have migrated your WordPress website, it’s time to test it. Visit your new URL and check whether frontend pages load correctly and admin dashboards work as expected. Also, check if images, links, and forms function properly. 

Lastly, there are permalinks; re-save them in settings. 

Method 3: How to migrate a WordPress website using hosting tools?

The third method for migrating your WordPress website is to use hosting tools. Many modern hosting services offer automated migration tools. It is often the fastest way to migrate if both old and new hosts support it. These tools are particularly good for shared hosting users or those who want minimal involvement. 

Some popular examples of hosting tools are SiteGround Migrator, Bluehost Site Transfer, WP Engine Automated Migration, and Hostinger Migration Wizard. 

No matter what tool you use, here are some tips to follow to migrate your WordPress website: 

Tip 1: Log in to your new hosting account. 

Tip 2: Go to the Migration Section. 

Tip 3: Either enter your old website credentials or install their official migration plugin. 

Tip 4: Start the migration. It will be done quickly, as the tools automatically copy everything. 

Tip 5: Once the migration is complete, update the DNS settings to point your domain to the new server. 

What to do after migrating your WordPress site?

The work doesn’t end with migration. After migration, check every detail to ensure that the transition is successful. Here are some things you need to do: 

  1. Update DNS records: To do so, log in to your domain registrar and point the domain to the new server. 
  2. Check internal links: Sometimes, links are not migrated correctly. It can often occur if URLs weren’t updated correctly. 
  3. Verify media library: Sometimes, media also don’t transfer correctly. So, check your uploads folder. 
  4. Regenerate permalinks: To do this, go to settings. Search for Permalinks, then click Save Changes to fix broken URLs. 
  5. Check Email Accounts: Update MX records if you hosted email with your old host. 
  6. Enable SSL certificate: To enable SSL certification, install Let’s Encrypt or your own SSL for HTTPS. 
  7. Monitor performance: Monitor the speed of your site to ensure that everything opens seamlessly. Use tools like GTmetrics or PageSpeed Insights. 

Comparison of migration methods

Method Skill Level Control Downtime Best For
Plugin Beginner Medium Low Quick, safe migrations without technical steps
Manual Advanced High Low-Medium Developers, complex sites, custom setups
Hosting Tool Beginner-Intermediate Low Very Low Fast migration between compatible hosts

Need help migrating your WordPress website?

Don’t know which method to use to migrate your WordPress site? Don’t worry, as you can always get help from WordPress development professionals who will thoroughly assess your website’s condition and choose the best possible method to migrate your website efficiently. They will ensure that all your important files and information are transferred to the next hosting without any interruption.

Frequently asked questions

The most common questions we get asked.

It may take from 30 to 120 minutes to migrate a website, depending on the site’s size and the hosting size.

SEO ranking will remain the same if URLs, content, and structure remain unchanged. Moreover, it also depends on whether 301 redirects are set properly if the domain changes.

Not necessarily. If you migrate first, test on the new server. Then, update DNS, and you’ll achieve near-zero downtime.

Yes, you can migrate your site without plugins. It works well if you understand databases and FTP. This method gives you more control over your website.

If the new host has different PHP or MySQL versions, ensure that your themes and plugins are compatible with the new environment. If not, update them or adjust server settings before going live.

Written by Elaine Halliburton

Elaine Halliburton is a seasoned content creator. With a focus on web design, development, and marketing insights, Elaine crafts engaging and informative content to help businesses navigate the ever-evolving digital landscape.