Step-by-Step Guide to Migrate a WordPress Website

Guide-to-Migrate-a-WordPress-Websites

Thinking about moving to a new server or host or migrating to a WordPress website? WordPress is one of the leading Content Management systems that empower 43.0% of all websites. Many contemplate the migrating process as a stressful task, however, it is not! All you have to do is follow some of the considerable steps!

To carry out the process, users either look for a WordPress website development company that offers migration services or choose to do it by themselves. For those, we are here with the guide that helps you to migrate the website to a new host!

Best Ways to Migrate the WordPress website

ways-to-Migrate-the-WordPress-websites

Step 1# Pick a New WordPress Host

When it is about migrating the site, surely you are changing the host and moving to a new one. Let’s say; if your website has some breaching issues, then you might be searching for a provider with outstanding security features.  So, before choosing the one, it becomes essential to know various hosting providers, check out some below:

  • Shared

It is usually the most affordable option when one server hosts multiple websites with shared resources.

  • Virtual Private Server (VPS)

VPS has virtual partitions in shared servers. It  provides reliable resources to your website.

  • Dedicated 

These plans give a physical server to host and support your site.

  • Managed

It lets you manage any kind of hosting plan when the hosting provider keeps a tab on the technical operations like updates and backups for you. 

For selecting the right option, you need to look after your priorities such as customer support, speed, data storage, and security, etc. 

Step 2# Keep a backup of your site files

WordPress has several plugins with which you can have a backup of your site. With their support, you can leverage the built-in settings for managing the backed up files, knowing when they are backed up, and where they are stored.

For using the plugin, you can go with WPvivid. It provides several backup choices to restore points, scheduling, filtering huge files, limiting files, backup plugins and themes, backup splitting, multisite support and remote storage capability, etc. 

Also, a manual way can be followed. To do so, you need a file transfer tool (FTP) to access the site files. There are two leading FTPs; Transmit (Mac) and FileZilla (PC). Once it is installed, you have to use the SFTP details from the web host itself for connecting with the site server. After connecting, choose and download the files from the site repository. It has a .htaccess file that can be hidden. 

Step 3# Exporting of the WordPress Database

Database exporting is an easy process. Simply, it needs some steps to get completed. Sign in to the webserver’s cPanel account and redirect to the phpMyAdmin application. 

Choose the database with the WordPress installation from the left-hand sidebar. When it gets selected, choose the Export tab from the navigation menu. 

The default settings for exported SQL format and quick export are enough for our needs. Choose the “Go” button, and the database export process will start. The file will get downloaded to your local PC. After the export process of the database and file FTP transfer is completed, move to the next step. 

Step 4# Build the WordPress Database on Your New Host Server

Before initiating the process of migrating to a new web host,  complete the settings of the WordPress installation. To complete this, make a database for importing the SQL data. 

Sign in to the new web host with the user details they have provided and a link to cPanel software. Here, MySQL Databases application is used. When the web host does not own the application in the running state, approach the support team to find methods for making new databases.  Below are the steps to generate a database:

  • Open MySQL Database.
  • Make a new database with a suitable name for the site.
  • Make a new MySQL user with a protected password.
  • Include the user account in the new database and give a grant to every privilege.
  • Remember the database name, new MySQL username/password. 

Step 5# Edit website’s wp-config.php File

When you have uploaded the files on the new server, you have to access the WordPress root folder again. If you want to visit the site now, then, you cannot as it is not in a working state now. The reason is that it demands updating the WordPress wp-config.php file.

To perform this action:

  • Move the wp-config.php file to the new root folder
  • Right Click on the folder
  • Choose the edit/View option

Following the above steps, you can open the file with the local text editor. It allows you to perform the changes. Below are the three lines you will require to update:

  • define(‘DB_NAME, ‘db_name’);
  • define(‘DB_USER, ‘db_user’);
  • define(‘DB_PASSWORD, ‘db_pass’);

As of now, these three lines have values that direct towards the existing database. Move ahead and amend the lowercase variables with the details of the new database created before. 

After that, save the modifications and close the file. Now, you can access the WordPress site that will appear in the same ways as before. 

Step 6# Upload The WordPress Files To Your New Host

Once your new database is created, reconfigure the wp-config.php file. Now, you can start uploading the site’ files.

Get connected to the new web host with the FTP program and choose the folder where you want it to be placed. If it is the only website installed on the web server, uploading the files to the public_html folder is the standard directory.

As the remote directory is now chosen, you can upload the site files that have the current version of wp-config.php. Same as the earlier downloading, this method can consume some time. 

It is not recommended to delete the files from your PC when it gets uploaded. They are required even when the final steps are finished. 

Step 7# Replace the Old Domain and Replace with New Domain 

Those who are migrating to a new domain should follow this step otherwise skip it.  In general, the users come across the issue while migrating to the new site is that they have included the links to different posts on websites or added images with a URL on the server. It gives a break while carrying out the process.

To easily and quickly search for an instance of an existing domain name and change it with the new name, we advise you to check the Search Replace DB script. It enables you to perform it easily. Assure that you remove it once completed. However, do not put it on the root domain, make a temp folder with a usual name for script hosting. 

  • Modifying Site URL

After searching and changing the existing domain, replace it with the new one you will be changing the Home URL and website URL in the database. It assures that while signing in to the website with a new domain, it will not redirect to the existing domain.

Migrating WordPress Website With a Plugin

While migrating the WordPress website, it is obvious to have nervousness.  Of course, you have to give your best to have the best; indeed, you do not lose any of the information. When WordPress has migration plugins in its pocket, you do not need to worry. 

The plugins give you an Insurance Policy. Most of these plugins help create backups for the site and offer recovery services. In addition, in case you want to only migrate some part of the website, then, the plugin helps customize the process according to your requirements. Below are some of those plugins: 

Concluding Remarks

Now you know the step-by-step process of migrating the WordPress site. Do you find the process difficult? Isn’t it easy? All you have to be cautious while carrying out the process.

Have you moved the WordPress site? How is your experience? Share your thoughts with us. Thanks for reading!