WordPress Migration

Are you happy with your current hosting provider ?

Are you willing to migrate your WordPress site to a new server or host? Moving your website to a new host doesn’t have to be a complicated or frustrating task. Despite the fact that there are vital stages to migrating your WordPress site, if you follow our guidelines, you will be successful.

Many people find themselves in need of a new host due to issues with their present provider, and they’ve had enough. However, switching to a more dependable server is often neglected for fear of making a mistake and permanent havoc to your site (s).

People may pay a massive cost for a professional to transfer their site for them to get around the problem. Alternatively, look for a new host that includes migrating as part of a new hosting package. And then there are others who read this article and decide to try their hand at it themselves.

Migrating is nothing to be frightened about if you spend some time creating your own website. If approached properly, it can be a relatively simple project that can be simply reversed if any complications arise.

Let’s go over the steps for migrating your WordPress website to a new host, but before we get started, keep in mind that many of the best WordPress hosting companies will actually move your site for you, so if you’ve just purchased a new hosting plan and are looking to migrate your site, check with your new hosting provider first to see if they offer free migration.

Step 1: FTP-Transfer a backup of your website files

Backing up each aspect of your site is the first step before transferring. This should be part of your overall WordPress security, and it’s always a good idea to do before making any substantial changes. Nevertheless, since there is so much data to move, it is also a requirement of migrating your WordPress installation.

So, how do you keep your data safe? You can use a range of plugins to backup WordPress for you. A backup plugin is usually placed and it is used to manage which files are backed up, how often they are backed up, and where they are preserved using built-in variables.

If you intend to use a plugin, WPvivid is one of the better alternatives. Automate backups, restore points, limit files, filter large files, backup splitting, backup themes and plugins, remote storage compatibility, multisite support, and more are all accessible with this plugin.

Alternatively, you can do the manual path. To conclude, manual backups require the use of a file transfer application (FTP) to access your website files. FileZilla (PC) and Transmit (Mac) are two popular FTP applications (Mac). After installation, you’ll need to connect to your website’s server utilizing your SFTP credentials (from your web host account). Select and download all files under your website’s directory once you’ve linked. The.htaccess file, which is set to be hidden, is included in this. If you are unable to see this file, consult the help file in your FTP application to have it display hidden files.

This could take some time depending on how many media uploads you have on your site. We can commence step two and make a copy of your database while this download is underway.

Step 2: Export the WordPress Database

The process of exporting your database is basic and only involves a few steps. Open the phpMyAdmin application by entering into your web server’s cPanel account. From the list on the left hand sidebar, select the database that contains your WordPress installation, and then click the Export tab on the navigation menu.

The Quick export’s default settings and the SQL format for the export are sufficient for our requirements. The database export procedure will begin once you click the Go button, and a file will be downloaded to your local computer.

Once you’ve completed the database export and the FTP transfer of your files, you’re prepared to resume on to the next step.

Step 3: Create the WordPress Database on Your New Host Server

We need to establish a WordPress installation environment before we can begin the migration to the new web host. To do so, you’ll ought to create a database into which you can import your SQL data.

Connect to the cPanel programme by logging into your new web server using the user credentials they provided you. If your web server does not have that application installed, you should contact their customer service department to learn how to create new databases.

The processes for creating a database are simple and clear:

Create a new database in MySQL Database with a name that is appropriate for your website.
Make a brand-new MySQL user (with a secure password).
Add this user account to the new database and give it full access.
Take notice of the database name, as well as the new MySQL login and password. You’re likely to need them soon.

Step 4: Edit the wp-config.php File

Go to the folder where you stored your website files on your local computer. There’s a file entitled wp-config.php in that folder that regulates access between WordPress and your database.

Make a copy of this file and save it to a different location on your computer. This is essential in case something goes wrong with the modifications we’re about to make.

Make the following three modifications to the original version of the file utilizing your preferred text editor:

  1. Rename the database.
    Look for the line that says:
define('DB_NAME', 'db_name');

This line's db name parameter is currently set to the MySQL database name of your old web server. This must be modified with the name of the newly established database.

2. Change the Database Username

This is accompanied by the line:

define('DB_USER', 'db_user');

In this line, replace the db user portion of your old host's username with the new username you just created.

3. Change the Database User Password

Finally, make the following changes to the third line:

define('DB_PASSWORD', 'db_pass');

The db pass section of this line, like the others, must be changed to the new secure password you created for your MySQL user.

Close the document and save wp-config.php.

Step 5: Import Your WordPress Database

We can begin the import process now that you have a new database to work with.

Using your new server’s cPanel software, launch phpMyAdmin and select your new database from the list on the left-hand sidebar. When it opens, browse to the Import tab in the navigation menu.

In the File to Import section, click the Choose File button and navigate to the SQL file you previously exported.

Uncheck the Partial Import check box, select SQL as the format, and then click the Go button. The import of the database will now begin.

The time it takes to import your database depends on its size. When the import is finished, you should receive a message informing you of its success.

Step 6: Upload The WordPress Files To Your New Host

Now that you’ve created the new database and reconfigured the wp-config.php file, it’s time to start uploading your website’s files.

Connect to your new web host using your FTP programme and navigate to the folder where your website will be stored. If this is the primary or only site installed on this web server, the files must be uploaded to the public html folder.

With the remote directory selected, upload your website files, which should now include the updated wp-config.php. This process, like the previous one, can take some time.

Once the upload is complete, do not delete these files from your local computer. They will be required until the final steps are completed.

Step 7: Defining New Domain & Search/Replace Old Domain

If you are moving to a new/different domain, you should go over this step; alternatively, you can skip it because you do not need to update your site to point to a different domain.

One problem most people always seem to have when moving their site is that they’ve added links to other posts on their site or inserted images directly by pointing to a URL on the server, which induces these to break when moved to a new domain. If you want to quickly and easily search for any instances of your old domain name and replace them with the new name, we recommend checking out the Search Replace DB script on github. This would make it simpler for you. Simply DELETE it when you’re finished (for security reasons) and don’t put it in your root domain; instead, create a temp folder with a random name to host the script.

Step 8 : A Quick Final Glance

This step actually consists of two distinct mini steps detached by (potentially) several days.

First and foremost, you should always reconfigure your domain’s DNS settings before you can use the site on your new host. They will be configured to point to your old host, and you will need to modify the records to point to the new server IP address.

This will be determined by where you have your domain registered. The specifics of completing this process are too numerous to cover in this post, but your domain registrar should have all of the information you require to make this change.

DNS modifications can take up to several hours to propagate fully. It’s best to do this during a time when traffic is expected to be low. You should avoid making any changes to your website during this 48-hour period because you may be changing the old version of the site.

Second, after the 48-hour period has passed, you should now be able to access your website through the new web host. You can now connect to your old web host and delete data and repository. In case you need to roll back the migration, you should keep a local backup copy of these files and the database export, as well as the original wp-config.php file. To be on the safe side, it’s a good idea to keep these files for an extended period of time.

Are you stuck in the middle? Aren’t you convinced that you’ll be able to complete the Migration process safely without any data-loss? I have some exciting news to share with you. HelptoInstall offers a low-cost WordPress Migration Service that is tailored to your specific needs.