Search

Categories to check in :
Blogging
Blogging

Discover more in Blogging

Coding
Coding

Discover more in Coding

Content writing
Content writing

Discover more in Content writing

CSS
CSS

Discover more in CSS

Email Marketing
Email Marketing

Discover more in Email Marketing

Hosting
Hosting

Discover more in Hosting

Other
Other

Discover more in Other

SEO
SEO

Discover more in SEO

Themes
Themes

Tired of searching good themes for you wordpress site?

Web Development
Web Development

Test the development process a little bit.

WordPress
WordPress

Learn everything about wordpress

How to migrate website from one server to another in 3 different ways in 2022

  • Share this:
How to migrate website from one server to another in 3 different ways in 2022

How to Migrate a Website From One Host to Another Host

It is likely that sooner or later you will need to know how to migrate a website from one server to another, or even from your local computer to a server.

This can be a tremendous ordeal if you don’t have experience doing migrations, and you might break out in a cold sweat just imagining yourself touching something you shouldn’t and end up killing something.

If that is your case, you are not alone, the same thing happened to all of us on our first day.

The fact is that there are several ways to migrate WordPress, some easier and others somewhat more complex.

And since the goal of this blog is to make your life better and easier, I’m going to explain three ways to migrate a website: from the easiest way to the most “pro” way.

Migrate WordPress with All-in-One WP Migration

Now, we are going to see how to migrate a website from one server to another using a plugin, regardless of which server you want to take it to.

I have tried several plugins that allow you to migrate, but the one that works best in all cases is All-in-One WP Migration.

Seriously, it works wonderfully, and in a relatively short time, it has become very popular for this task, so much so that it has more than two million active installations.

Not only is it very effective, but it is also very easy to use.

There is only one drawback, and that is that if the website is larger than 512 MB, the free version does not allow you to import it, so you will need to use its paid addon called “Unlimited Extension”.

That said, let’s see how you can migrate a WordPress website with this plugin.

Export the website

The first thing you have to do is install the All-in-One WP Migration plugin ( this one ) on the source website. This will create a new tab in wp-admin with the same plugin name.

Click on it, and then on “Export”.

As you can see, several options appear to choose where we want to take the backup of the web, but the only one that you can use with the free version is to export to a file, an option that is more than enough to carry out a migration.

Choosing “File” will start a full web export. This means that both the web files and their database will be exported in a single file, which will be saved on your computer.

You will have to import this file into the new server or new domain where you want to have the web, and it also serves as a backup copy of the web, in case there is a problem with it.

Now, let’s see how to import it.

Import the website

To import the website into the domain you want to migrate it to, you need to have a WordPress installation done.

Then, you have to install the same All-in-One WP Migration plugin. If the exported file is larger than 512 MB, you will need to install the Unlimited plugin as well.

Once installed, click on the “Import” tab. Here, you can drag the file you exported earlier, or select it by clicking “Import from File”.

As I say, the free version of the plugin allows you to import websites up to 512 MB, but the size of the uploaded files may be limited by the configuration of your server.

If your website occupies less than 512 MB and does not allow you to import it, you will have to increase the maximum upload size.

Once the file has been dragged or chosen, the import will begin. A confirmation message will appear to rewrite the current content of the web, which you must accept, and after a few seconds or minutes, the web will already be imported, and, therefore, migrated
So you have seen How to migrate a website from one server to another by exporting and importing it.

Migrate WordPress manually

Well, after seeing the two easiest ways to migrate, we are going to see the most artisanal way to do it: manually. Let’s see how to migrate a website from one server to another manually.

The process is similar to doing a manual backup, but with variations.

Although it is a more manual and complex process than the previous two, if you follow the steps I am going to show you, nothing should go wrong

Download the files from the web

Ok, the first thing you have to do is download the website you want to migrate to your hard drive, for example.

You have many ways to do it. One of them is to connect via FTP to your server with a program like Filezilla.

Another option is to download it through the file explorer of the hosting. This is my favorite because it’s usually much faster than doing it through FileZilla.

It will also depend on the hosting where the web

site is and if it has the option to download folders. If you do not have the option to compress or download several files to the web, you will have to use FileZilla or a similar program.

If you want to migrate WordPress from local to server, it is much easier for you, since the web files are already on your computer.

I will explain how to download the files from the web using SiteGround’s cPanel. Although your host may not use cPanel, it will most likely have some option to access your website’s files, and the following steps will also work for you.

In cPanel, look for an option called “File Manager.”

Navigate to the folder where the website you want to migrate is located, and select all the files.

With all the files and folders selected, click on the “Compress” button at the top.

Choose a compression format (you can put the .zip) and give it the name you want.

Click on “Compress Files” and the compression will start. When it finishes, close the process window and you will see that there is a new .zip file. If you don’t see it, click “Update” in the file manager options.

Now you just have to select the .zip file that has been created, and click on “Download”. The file will be downloaded to your hard drive. If this were a kitchen recipe, I would say “reserve for later”.

Download the database from the web

You already have the web files ready, but that’s only 50% of the web. Now, you have to download the database.

To do this, in the same cPanel, click on “phpMyAdmin”.

This is the application to manage the databases that you have created in your account. All the databases of the websites you have will appear in the left column. If you only have one, then there it will be.

Select it by clicking on its name, go to the “Export” tab, and, without changing any options, click on the “Continue” button.

A .sql file with the name of the database will be downloaded to you. Save it for later.

Upload files from the web

Well, now that you have the files and the web database on your hard drive, it’s time to upload them to the new server or new domain.

In the same way as before, you can upload the files through FileZilla or directly from the hosting control panel, in case it allows uploading.

You will also need to have the domain on your server, either the main domain for the account or added as an addon domain.

In the case of using cPanel, enter the file manager again and navigate to the folder of the domain to which you want to migrate the web.

Once inside, click on “Load”.

In the new window that opens, click on “Browse…” and find the .zip file that you downloaded earlier.

Once uploaded, go back to the file browser, select the .zip file you just uploaded, and click the “Extract” button. This will extract all the files from the web and make them ready for use (if you don’t see it, click “Refresh”).

If you have confirmed that they have already been successfully extracted, you can delete the .zip file from the server, which you will no longer need.

Create the new web database

We are reaching the most crucial point of migrating WordPress manually. And it is that, unlike the files, the database cannot be uploaded without having “nothing”.

That is, you need to first create a new and empty database, and then import the one you have on your hard drive.

To do this, in cPanel, open “MySQL Databases”.

Now, you have to create a new database. As I already dedicated an article explaining how to create a database, and in order not to duplicate the content.

Import the database

Ok, now you have an empty database, and it’s time to import the database you have exported.

Open phpMyAdmin again, select the database you just created, and click the “Import” tab.

Click on the “Browse…” button and select the database that you have exported and that you have on your hard drive.

Then click “Continue”.

The import will start and all tables from the source web will be stored in the new database.

Modify site URL and home

When you migrate a website that has one domain to a different domain, there are a couple of database records that you have to change.

With the new database selected, click on the “wp_options” table (it can have a different prefix than “wp”, but in most cases, it will have this prefix).

Locate the “site URL” and “home” rows:

In these two rows, the URL of the originating website will appear, and you have to change it to the new URL. If before, the website was https://oldurl.com, you will have to change it to https://newurl.com.

Take into account if the new domain has an SSL certificate installed, because you will have to put HTTPS, and if it does not, you will have to put HTTP.

Click edit, and type in the new URL. When you have it, click “Continue”.

Do the same for both rows.

We’re almost there, but there’s still a step to go to complete our knowledge about how to migrate a website from one server to another.

Modify wp-config file

Among the WordPress files, there is one called wp-config, which contains the information necessary to connect the web with the database.

As you have migrated the web files without modifying them, this file will have access data to the old database, so you have to edit it to put the data of the new one.

To do this, you can access the file manager of the hosting control panel (or through FileZilla), and look for the wp-config file, which is located at the root of WordPress.

Select it and click on “Code Editor”. Locate the following lines:

Here, you will have to change the three lines indicated in the previous screenshot.

DB_NAME: put the name of the new database.

DB_USER: put the name of the user with permissions on the new database.

DB_PASSWORD: put the password of the user.

Save the changes.

So we have discussed the most useful 3 ways how to migrate a website from one server to another. If you have done everything right, the website will be successfully migrated and working without problems. Now you know how to migrate a website from one server to another. This article may come of great help to your friends, so share this article with them so that they can know how to migrate a website from one server to another.

Conclusion

We have tried our best so that, it can help you. If you like this article ” how to migrate a website from one server to another” then please leave a comment. It is very important to know how to migrate a website from one server to another because we often face different problems with our hosting. So you should know it. Share this article to your friends so that they can also know how to migrate a website from one server to another.

To know more like this article visits our website WordPress Journal regularly.

Read More : 

4 Essential WordPress Security Plugins for Your Website

Become a member

Get the latest news right in your inbox. We never spam!

Leave a comment