Having trouble transferring WordPress website hosting? So read this article till the end.

Moving your site to a new host can be a scary and worrying process, but it isn’t. There are several important steps for this transfer, if you follow them and implement them carefully, you don’t have to worry about anything. Changing hosts can have many reasons, such as poor service from the current host, but usually, many people postpone this change because of the fear that they might make a mistake and damage their site. For this reason, many people may spend a lot of money to leave this work to a professional, and although it is not a bad job at all, you should know that you can easily do it yourself.

Before we go to the steps of transferring the site to a new host, keep in mind that most of the reputable hosting companies in the world will do this for you when you decide to transfer the host. Therefore, it is better to ask them in this field before you start working yourself.

The steps of transferring the WordPress site to a new host

1- Back up your website files

The first step before moving the site is to back up all aspects of the site. This should be part of your overall WordPress security and is a good thing to do before making any major changes. This is one of the requirements of migrating your WordPress installation because a lot of data is being transferred. How to back up the site? There are many plugins you can use to do this, such as VaultPress and Duplicator. Using the backup plugin, you install it and use the in-program settings to manage the files that need to be backed up, at what time intervals, and where to save the backups.

The other way you have is the manual way. To summarize, manual backups require a file transfer (FTP) tool to access your site’s files. Two of the most popular FTP programs are FileZilla and Transmit. After installing them, you must use SFTP credentials to connect to your site’s server. After connecting, you can select and download all the files on your website. This includes the .htaccess file, which should be hidden. Depending on the number of uploaded files you have on your site, this may take some time. While this download is in progress, we can go to the second step and create a copy of your site’s database.

2- Export the WordPress database

Exporting your database is a simple process with just a few short steps. You need to log in to your cPanel web server account and open the phphMyAdmin application.

Select the database that contains your WordPress installation file and then select the Export tab option in the menu. The default settings of Quick Export and the SQL format for export are what we need. Select the Go option and the database export process will start and the files will be downloaded to your computer. Once your database export and FTP file transfer are complete, you’re ready to move on to the next step.

3- Create the WordPress database on your new hosting server

Before you start moving to another web host, we need to create an environment to install WordPress. For this, you must create a database in which you can import your SQL data.

First, you must log in to your web host according to the user credentials they gave you and connect to the cPanel software. For this guide, we will use the MySQL database application. If your web host does not have this application running, you should contact them and ask them how to create new databases. In addition to working on the site, you should pay attention to improving the ranking in search engines and its SEO.

The steps to create a database are very simple:

  • Open MySQL Database and create a database with a suitable name for your site.
  • Create a new MySQL user.
  • Add this new user account to the new database and give it all access.

4- Set the wp-config.php file

Look at the folder where you placed the download files of your site. In this folder, there is a file called wp-config.php that controls the access between WordPress and your database. Make a copy of this file and save it in another folder on your computer. This work is very necessary for the changes we want to apply because there may be a problem. Now open the original version of the file with a text editor of your choice and apply these changes to it.

  • Change the name of the database

Find this bottom line.

define(‘DB_NAME’, ‘db_name’);

The db_name section is currently set to the MySQL database name of your previous host. This should be changed with the name of the new database host you have.

  • Change the database username

Below the previous line, you will see this line.

define(‘DB_USER’, ‘db_user’);

In this line, you should change the db_user section, which is set to the username of your previous host, to the username you just created.

  • Change the database user password

Finally, you need to edit the third line.

define(‘DB_PASSWORD’, ‘db_pass’);

As before, the db_pass part of this line should be changed to the password for the account you just created. Save your file and close the editor.

5- Import your WordPress database

Now that you have a database to work with, we can start importing. Open phpMyAdmin from cPanel on your new server and select your new database from the left. When it opens, select the Import tab.

In the File to Import section, select the file selection button and select the SQL file that you exported earlier. Check the Partial Import check box and make sure that the format is SQL and then click the Go button. The import process will now begin. The time of this import depends on the volume and size of your site. At the end of the import, you should receive a message that the process was successful.

6- Upload the WordPress files on your new host

Now that your database is ready and you have set the wp-config.php file, it’s time to upload the WordPress files. Connect to the new web host using your FTP program and navigate to the folder where your site will be stored. If this site is the main site or the only site that is going to be installed on these hosting servers, uploading the files to the public_html folder can be a good choice.

By choosing the upload path, you can start uploading WordPress files that include the adjusted and updated wp-config.php file. As with the previous download, this may take some time. Do not delete these files from your computer when the upload is finished. They are still needed until the end of the final stage.

7- Defining the new domain and searching and replacing the old domain

If you want to transfer your site to a new domain, you must follow this step, but if you do not intend to do this, you can skip this step because you do not need to update your site to redirect to the new domain.

One of the most common problems that people face when transferring a site is that they have added links to their posts or uploaded photos directly to the server pointing to different links, which causes time to Transfer to a new domain, and these contents will be lost. If you want to quickly search and find all the items on your site with the previous domain and replace them with the new domain, we suggest you use different tools for this purpose. The only thing to remember is to make sure you delete them as soon as you find them and don’t put them in your Root Domain, create a temporary folder where you can put them. give

By performing a lookup and replacing the old domain with the new domain, you also change the site_url and home URL values in the database, which ensures that when you try to log to your site on the new domain, it won’t which will redirect you to the old domain.

8- Final sections

This stage consists of two smaller stages that are several days apart. First, before you can use your site on the new host, you must reset your domain’s DNS settings. They are set to point to your old domain and you need to transfer the correct records to the new IP addresses of the new server.

This process depends on where you registered the domain. The details of completing this process are too varied to fit into this post, but your domain registrar should have all the information you need to make this change. DNS changes can take up to 48 hours to complete. It is best to do them during periods when you have less traffic. During these 48 hours, you should avoid making any changes to your old site.

In the second step, after these 48 hours, you should be able to access the new web host when you log in to the site. At this point, you can connect your old web host to delete files and databases. You should still have a copy of the files and database on your computer, along with the original wp-config.php file in case you need to transfer it back. It can be a good idea to have these files for a longer period in case you need them.

Leave a Reply

Your email address will not be published. Required fields are marked *