More
    Home Web Development WordPress Migrate WordPress Website to a New Host - Step...

    Migrate WordPress Website to a New Host – Step by Step Easy Guide

    If this is the first time you’ve done this task, learning how to migrate a WordPress site can be a big task, but in fact, the process is much simpler than it seems. As businesses and websites continue to grow, they are increasingly demanding their hosts, and sometimes this means that your site needs to move to a larger space in order to scale.

    Often, the web designer who originally created the site has moved to other projects and is too lazy to move the site for you, allowing him to make some decisions—find a host that provides migration services, hire a professional, or perform surgery on the site himself.

     

    How to Migrate a WordPress Website?

    While hiring a professional is a sure way to get things done, you should try to learn how to migrate your WordPress site, or you will spend your hard earned money. why? Because the migration process is likely to occur multiple times, and this is also a good, worthwhile skill.

    1. Back up website files

    2. Export the database

    3. Upload the website files

    4. Create a database at the destination

    5. Import the database

    6. Fix wp-config.php

     

    Let’s walk through all of these required steps to learn how to quickly and easily you can migrate a WordPress site.

     

    1. Back up Website Files

    First, we must retrieve your website files from the original host. We will use the File Transfer Protocol (FTP) to download them to your local computer. If you don’t already have a favorite FTP client, we will use FileZilla.

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 1

     

    This process can take some time depending on the number of plugins installed and the number of uploaded files. Once the transfer is complete, you can proceed to the next step: copy the database.

    If you have cPanel powered hosting then you can also use the cPanel file manager to make a zip of all your website files and download the zip file into your computer.

     

    2. Export the Database

    The database is the most important part of the WordPress site – it is like the brain, hosting all your pages and articles. Surprisingly, copying is also the easiest. Most hosts provide access to the database via phpMyAdmin.

    Simply log in to your host control panel and access phpMyAdmin.

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 2

     

     

    Select the database for your website in the left column and click Export in the top menu bar.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 3

     

     

    The export method should default to fast, which is acceptable for these purposes. You will also want to make sure the format is SQL. This will ensure that your backup is generally accepted for MySQL.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 4

     

     

    Then you will click Next and you will be prompted to download the .sql file. Move this file to the same folder as your website to track it when the migration is complete.

     

     

    3. Upload Website Files

    Now that we have copied the site, we can back up the site files in the same way we used to upload them to the destination host.

    Log in to the destination account using FileZilla and browse to the web root of the destination host account. If you are using cPanel, it is usually a public_html/ folder.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 5

     

     

    Then, drag and drop your website files from your local computer to the web root of the new host. This process can take some time depending on the size of the uploaded file and the size of the plugin.

    You can also use the cPanel file manager to upload the zip file of your website files and then extract it via the file manager itself.

     

    4. Create a Database at the Destination

    Before you migrate your database to a new host, you must first create an empty database.

    Log in to the control panel of the destination account. If you are using cPanel, you are looking for a MySQL® database.

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 6

     

    Create a new database and name it a website that’s right for you.

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 7

     

    Once the database is created, create a new database user, then add the new user to the new database and have all its privileges. Make sure to record the database name, username, and password – you will need them later.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 8

     

    If you are facing issues while creating the database or assigning the user with permission to it then alternatively you can also use the MySQL Database Wizard from cPanel to create your database.

     

     

    5. Import the Database

    Once the database is set up, we can import the database. This step is similar to how you exported the database before.

    Log in to phpMyAdmin on the destination account and click on the name of the new database you just created. Then click the Import button in the top menu bar.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 9

     

    As before, you won’t need to change any settings – just click the Browse button and select the .sql file you generated earlier.

     

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 10

     

     

    Click Next and the database will begin the import process. Depending on the size of your site, this process can take a while to complete.

    If you face error while uploading the database due to size restrictions you need to modify the php.ini file and increase the size limits.

     

    6. Fix wp-config.php File

    We have successfully moved all of your data, but the site has not been properly loaded on the new host. Now we will modify the wp-config.php file to put the file and database together.

    You can edit this file in FileZilla by right-clicking and selecting Edit (cPanel also provides a file manager that can edit the file). What you are looking for is the following settings in the file:

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 11

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 12

     

     

    Get the database information you recorded earlier, and then replace the old database information in those lines with the new one.

    Migrate WordPress Website to a New Host - Step by Step Easy Guide 13

     

    At this point, if the domain name remains the same and the DNS is set up during the migration process, then your site should be working properly. However, there may be some different scenarios that can make you unsuccessful.

     

    Finishing Work

    Now, there are some small details that may prevent your migration from completing.

    Domain Name Change

    If the domain name of your website has changed during the migration process, the site URL and home page URL will need to be changed to reflect the new domain name. You can do this by adding the following line to the wp-config file and replacing the text “example.com” with your domain name:

    Define(‘WP_HOME’,’http://example.com’);

    Define(‘WP_SITEURL’,’http://example.com’);

     

    DNS Change

    If the domain name is the same after the migration is complete, then you only need to change the A record of the domain name to point to the IP address of the new hosting account. Depending on the registrar, this process will be different, so it’s best to know how to do this with your domain name provider.

     

    In Conclusion

    Congratulations! You have successfully mastered the migration process for a WordPress site. You can save the website files and databases to this folder on your local machine and save them in a safe place, as it can now be used as a backup for your website, just in case.

    Keep in mind that all sites are different at build time. Sometimes, if your site is more complex, you may need to take additional steps. Keep practicing. Remember, you can always take a step back and try again. 

    Thank you for reading the article, you can share your questions or opinions in the comments below.

    Editor's Pick

    9 Benefits of Using WordPress for Your Business Website

    Since its inception back in 2003, WordPress has become one of the most sought after blogging platforms in the market. Over the last couple...

    Headless WordPress- Designing WordPress Site Without a Theme

    Wordpress has always been the go-to solution for most businesses that look out for a digital presence. The leading CMS platform excels...

    AMP for Emails: Tips and Tricks You Should Know

    AMP 4 Email is undoubtedly the number one email marketing trend since spring 2019 and the most discussed topic in this sphere respectively. Tons...

    Top 7 Most Comfortable On-ear Headphones in 2020

    Treblab on-ear headphones are mainstream audio electronics amongst athletes of any level. From beginners to A-class sportsmen - everyone can find here...

    What’s the Difference Between Intel I5 and Intel I7 – Which One to Buy?

    For buyers that are planning to invest on a new laptop, or desktop computer, the most complicated thing to decide is which...
    Subscribe
    Notify of
    guest
    0 Comments
    Inline Feedbacks
    View all comments
    0
    Would love your thoughts, please comment.x
    ()
    x