Website migration happens when you make substantial changes to a website. Some examples include changing the domain name, switching to a new platform, changing the URL site structure, or migrating to another web hosting provider.
This article is a website migration guide for WordPress users who want to move to another host. While many hosting providers offer free migration, some users might prefer to go the DIY route.
Keep reading to learn how to complete a successful website migration both manually or automatically using a plugin.
What to Do Before Website Migration Some website migrations fail due to a lack of preparation. So before you proceed, make sure to do the following during the planning stage. This way, the website migration process will happen smoothly with minimal negative impact:
Purchase a quality web hosting plan with sufficient resources. Make sure to choose a hosting provider with a good performance track record and a plan that can handle your website’s data and traffic. Check out my recommendations for the best web hosting for WordPress .Communicate with your team and visitors. As the site owner, you should inform your team and your visitors about the site migration in advance so that everyone is on the same page. Plus, issues may happen following a migration, so it’s a good idea to keep everyone posted either way.Review your site’s traffic and other metrics. Take note of your existing site’s metrics, such as organic traffic from Google Analytics and Google Search Console. You’ll be able to compare your site performance in the search results before and after the migration to identify any issues.Consider creating a staging environment. A staging site lets you create a copy of your existing site and perform changes without affecting your actual live site. Once you make sure the staging site has no issues, you’ll be able to make the changes to the real site with minimal risks. How to Migrate a Website Manually In this section, you will learn how to perform a successful site migration to another host manually. Let’s go over each process step-by-step:
1. Backup Database and Files The first step of the manual website migration process is to back up your current website database and files.
The database is the foundation of your website. It allows WordPress to store and fetch all website data in an organized way so that the website functions correctly and smoothly.
The entire site's content, including all the pages, posts, comments, and existing settings, is stored in the database. Within the database are various tables consisting of different pieces of information that make up a WordPress site.
For example, the wp_posts table contains all the post types, post content, revisions, and custom post types.
To back up your site database:
Go to your current hosting control panel. For illustration purposes, I will be using screenshots for how to backup website databases and files on a hosting account that uses cPanel . Whichever control panel your hosting provider uses, the steps should be similar.
Under Databases , select phpMyAdmin . Select the WordPress database you'd like to backup from the navigation menu on the left. For example, my database is called “hosti348_wp665 ”. The tables within the selected WordPress database will appear. Select the Export tab at the top of the page. Choose the Quick export method and SQL as the format from the drop-down menu. Click Go . The database files should be downloaded to your computer. After downloading your database, it’s time to backup your site files as well. Here’s how to do it:
Open your hosting control panel. Under Files , select File Manager . Find your WordPress site’s root folder, usually called “public_html” . Download all the content of the folder to your computer. Some file managers allow downloading multiple files simultaneously, but not entire folders. Therefore, you might have to download each subfolders' content one by one.
2. Upload All Databases and Files to the New Host The next step to migrating a website is to upload all databases and files from your old site and host to the new host. This ensures that the existing website will work normally even though the web host has changed.
To create a new database on your new host and upload the databases from your old host, do the following:
Log in to your new hosting account control panel. For this tutorial, I will be migrating the WordPress site to Hostinger .
Therefore, the screenshots will be from hPanel , Hostinger’s own control panel. However, the steps should be similar no matter what hosting provider you’re migrating to.
Under Databases, navigate to MySQL Databases . Under Create a New MySQL Database And Database User, create the new database name, username, and password. Don’t lose these credentials – keep them in a safe place. Scroll down to find the List of Current MySQL Databases And Users . Locate the new database and select Enter phpMyAdmin . In phpMyAdmin, make sure that the new, empty database is selected. Then, select the Import tab at the top of the page. Upload the .sql file you previously downloaded from the old web server. Leave the other settings as is, then scroll down and click Go to begin the import process. Now that the databases have been transferred, let's begin uploading files from the old website:
Go to your hosting control panel. Under Files , select File Manager . Navigate to your website’s root folder or “public_html ”. Upload all the website files you have previously downloaded. 3. Edit wp-config.php Congratulations, you have successfully transferred all your website’s content to the new site on another host. However, there are still a few tweaks to be done before your website works properly, one of which is editing wp-config.php .
By this point, the current wp-config.php is still pointing to the database in the old web host. Here’s how to edit the file so that your website will now point to the database you’ve created in the new host:
Open your hosting control panel. Go to Files -> File Manager . Find the wp-config.php file within the public_html folder and open it. Locate the following lines in the file: define('DB_NAME, 'db_name');
define('DB_USER, 'db_user');
define('DB_PASSWORD, 'db_pass');
Replace the text in lowercase with your new database credentials. Save the changes. 4. Point Your Domain Name By now, you have migrated all the content from the old host to the new site on another host. However, your domain name is still attached to the old host. To point your domain name to the new host, you must update your domain name servers (DNS).
If you purchased your domain name from your old host, it’s a good idea to transfer the domain to another domain registrar first. However, if you registered your domain somewhere else, all you have to do is follow these steps to update your DNS:
Find your new web host’s DNS nameserver information. Usually, it looks similar to the following: ns1.hostname.com
ns2.hostname.com
Log in to your domain registrar. Navigate to the DNS / Nameservers menu. For this tutorial, I will be showing you the control panel for a domain name registered to Hostinger. Select Change Nameservers . If your website isn’t hosted with Hostinger, choose Change nameservers and enter the new host’s DNS nameserver information manually. Click Save . 5. Fix Permalinks In some cases, migrating a site to another host can trigger the 404 Page Not Found error when users try to access your website. In this case, you have broken permalinks.
Fortunately, fixing this issue is relatively straightforward. Here’s how to fix broken permalinks by resetting the permalinks or URL structure:
Open your WordPress Admin Dashboard. Navigate to Settings -> Permalinks . Select a permalinks structure that’s different from your current one. For example, if you’re using Post name , switch to Day and name . Save the changes.Change it back to your former preferred permalinks structure. Finally , save the changes once again. How to Migrate a Website With a Plugin Compared to the manual method, migrating a site using a plugin is easier and faster. In this section, I will take one of many WordPress migration plugins and demonstrate how to use it step-by-step.
But before you proceed, make sure that you already have a fresh install of WordPress in your new web host. Many web hosts, including Hostinger, have 1-click installers that make the process quick and easy.
1. Install a Website Migration Plugin There are many website migration plugins available for WordPress. Here are some of my recommendations:
All-In-One WP Migration . A freemium plugin that lets you migrate an entire site to any hosting provider with just a few clicks. While the main migration feature is entirely free, paid extensions are available, costing $99/extension .Duplicator . In addition to being a backup solution, the Duplicator plugin also lets you quickly migrate a website to another host. The premium version, Duplicator, starts at $69/year .Migrate Guru . A completely free plugin that offers easy migration across any web host. It specializes in moving large websites with up to 200 GB of data. All you have to do is install the plugin and enter the credentials of the new host.WPvivid Backup and Migration . This freemium plugin is both a backup and migration tool. The premium version starts from $49/year, and it offers additional features such as database encryption and staging site creation. In this tutorial, let’s use the plugin All-In-One WP Migration to do the job. Follow these steps to install it:
Log in to the WordPress admin dashboard. Go to Plugins -> Add New. Search for All-In-One WP Migration. Select Install, then Activate. Go to the fresh WordPress installation on the new host and follow the same steps to install and activate the plugin there, as well. 2. Export Files Now that All-In-One WP Migration is installed and activated, let’s export the website files from the current web host. Follow these steps:
On the WordPress admin dashboard of your existing site, access All-In-One WP Migration -> Export from the sidebar menu. Choose export to File. Wait until the plugin finishes archiving all your website files. Then, download the .wpress file to your computer. 3. Import Files Now that you have downloaded all the files from your website to your computer, it’s time to import them to the new website on the target host.
But before I show you how to do that, you might have to change the maximum upload file size of WordPress. The default limit is only 128 MB , which won’t be enough for most websites – especially ones with lots of content.
To change this limit, I recommend contacting your new web host and asking them to increase the maximum upload size limit for you. If you’d like to go the DIY way, you’ll have to edit your .htaccess file:
Access to your new hosting account control panel. Go to Files -> File Manager . Locate the .htaccess file in the root folder and open it. Paste the following code before the “#END WordPress ” line. Don’t forget to change “XX ” into your desired file size in MB. php_value upload_max_filesize XXM
php_value post_max_size XXM
Make sure that the value for “post_max_size ” is always larger for “upload_max_filesize ” to avoid errors. For example, I will set the values as 300M and 301M, respectively.
Save the changes. Now that the maximum upload file size has increased, let’s proceed to import WordPress to the new host:
Log in to the WordPress admin dashboard of your new host. Navigate to All-In-One WP Migration -> Import . Upload the .wpress file that you have previously downloaded. Wait until the import process is complete. A warning message will appear. Since you’re migrating to a fresh WordPress installation on the new host, there’s no need to perform a backup in advance. Select Proceed . Wait until the file restoration process is complete. Once you receive a message that the import was successful, click Finish. 4. Re-Save Permalink Structure If you're experiencing broken links upon migration, reset the permalink or URL structure:
Open the WordPress admin dashboard. Go to Settings -> Permalinks . Switch to an alternate permalink structure and save the changes. Choose your preferred permalink structure and save the changes again. What to Do After Site Migration Congratulations, you have successfully migrated your WordPress site to a new web hosting provider. Now, let’s go over some additional steps you might need to take in the following post-website migration checklist:
Monitor traffic. Use Google Search Console or a traffic tracker of your choice to monitor your site's performance in the search results before and after the migration. Upon a new site launch, it's normal for traffic to drop temporarily, but a steady increase usually follows them.Install essential plugins. Your existing plugins should also be migrated with the transfer. However, if you need to install additional ones, it's a good time to do so. Remember not to install too many plugins – doing so can slow down your site.Redesign the site if needed. The migrated site should use the same theme previously used on the old host. If you feel like the site needs a web design refresh, feel free to customize the current theme or change it to a new one. Just make sure that the theme stays light and mobile-responsive so that you won't lose traffic.Promote your website . Research digital marketing methods to attract more site visitors. For example, you can plan and execute a search engine optimization (SEO) content marketing campaign to attract more organic traffic and improve your site’s rankings on Google and other search engines.Cancel the old hosting account. Once you have fully completed the migration, feel free to cancel the old hosting account. Keep in mind that this guide and this checklist only apply for website migrations that do not include URL changes. If you happen to also change your old domain to a new one, there are other critical additional steps you'll have to look out for.
These steps include URL mapping to the new domain, setting up 301 redirects to fix content issues between the old and new site, checking broken internal links, fixing duplicate content, and updating the robots.txt file.
For more information, check out this helpful URL website migration guide by Google.
Conclusion Site migrations involve making significant changes to a website, such as moving to a new host.
In this guide, I have explained each step of a WordPress site migration to a new host using the manual method and a plugin. I also offered a post-website migration checklist for the next recommended steps.
I hope that this article has helped you perform your WordPress site migration project. If you have further questions or would like to share a tip or two, feel free to share in the comments section.
דירה דיסקרטית בחולון
Everything is very open with a really clear clarification of the issues. It was definitely informative. Your site is extremely helpful. Many thanks for sharing!