Support article
Migrate WordPress between hosts in 5 minutes, no plugins
In this video we'll explain how to move a website built with WordPress from one server to another, with no need for plugins, and in just a...
In this video we’ll explain how to move a website built with WordPress from one server to another, with no need to use plugins, and in just a few minutes.
To start, we only need to keep two things in mind: having the access details for both hosting services.
This video uses cPanel as the control panel, which is the one we use at mihosting.
A website built with WordPress has two main sections that need to be copied. First, a set of files stored in the public_html folder, and second, the database used by that installation. Therefore, we need to make backups of both the files and the databases involved.
This information will be useful as long as we don’t change the domain name or other parameters, such as the database names or connection usernames.
Follow Misael’s explanations carefully and you’ll have your WordPress migrated in 5 minutes.
Video transcript
In today’s video we’ll explain how to move a WordPress installation — a WordPress website — from one server to another with no additional plugins, and in just a few minutes. Let’s take a look!
To start, we only need to keep two things in mind: first, having access to the old (current) hosting, and second, having access to the new hosting. In today’s case, we’ll manage it through the cPanel panels.
A website built with WordPress is made up of two main parts: on one hand, a set of files, and on the other, a database. The transfer simply consists of making a backup of the files on one hand and a backup of the database on the other, then restoring them on the new server and linking them together. Let’s see it directly on the computer, in just a few minutes!
Alright, we’re ready to begin migrating our WordPress site from one hosting server to another. Here it is — it’s a freshly installed WordPress with hardly any content, but it’ll serve perfectly to test the tutorial we’re going to walk through.
Today we have the domain midominio.depruebas.com, and the goal, as we mentioned, is to move this site from one hosting to another, in principle without changing the domain name or other parameters. So we’ll head directly to the domain’s control panel.
In cPanel cases, normally it’s enough to type /cpanel to access. We enter our username and password. Great! And on the hosting administration screen for the domain, we’ll focus on two main sections: one of them is File Manager, and the other is phpMyAdmin.
As we mentioned before, a WordPress website is made up of a package of files and a database. We want to back up both so we can later restore them on the new hosting. So initially we’ll go to the phpMyAdmin option to back up our database.
On the left side we’d have the list of databases hosted on our hosting. If it’s a WordPress site, we’ll usually have one, as is the case here. We click on it and go to the Export option. Directly, without needing to configure anything, we’d click Continue. In a few seconds or minutes, depending on the amount of information, a database backup file is generated. We can save this file directly in a location set aside for that purpose.
Great, we can close phpMyAdmin and go to the File Manager. Usually, the content of the WordPress files will be inside the public_html folder. What we can do is select the first one and, without releasing the Shift key, go to the last one, right-click, and choose the Compress option. We’ll use a ZIP file type. We can specify a name, and wait a few seconds for the files to be compressed into a single ZIP file. Once we have it, as you can see, it takes up 11 megs in this case — right-click and download.
Great, and once downloaded, we copy it to the location where we have the SQL database backup. In this case, we’ll call it file backup.
Great, and we only need these two files to now restore them on our new hosting service. What we’d do now is connect to our new hosting service. In this case, since for testing we don’t have an additional server to move this data to, what we’ll do is delete the information from the current one. We delete all the contents of public_html and delete the current database from the hosting.
So, as you can see, the hosting is now completely empty, just as it would be right after signing up for our hosting service.
What are the steps now to restore our backup? Well, we’d go back to the File Manager, the public_html folder, and use the Upload option. Here we’ll upload the ZIP of our file backup directly. We can drag and drop. As you can see, it uploads quickly. Once we have the confirmation, we go back to the directory, right-click, and Extract.
Great, all the files have been extracted, so we can delete the original ZIP. And now let’s go directly to restore our database. We can’t do it directly, since the file we have is a content-restore file for it. So we’d go to the MySQL Databases section and create a new database.
There it is. And we also need to create a database user. It can have the same name as the domain. We set a password, create the user, and now we’d add the user to the database with all permissions.
Great, once we’ve done that, we head back to phpMyAdmin. Here’s our database, and now we’ll use the Import option. We’d use Import, look for the SQL database backup, and Continue. Import executed successfully — and the process is done!
We just have one last step left. We head back to the File Manager, open the wp-config file, right-click Edit, and we’d modify the contents of these three lines with the new information for the database we manually created.
So, the database was called midominio_wp, the user was also called midominio_wp, and the password I’d set was dominio#00. We save the changes and we’re all set!
Now we can close the panel, and if we open our website, we’ll see it works again as it did before. So, as you’ve seen, it’s a simple process. It takes barely 5 or 6 minutes, and there’s no need for additional plugins or additional tools, given how easy it is to do this task.
When we talk about not using plugins for this migration, it’s not because we have any problem with them — in fact, some are very useful. The issue is that most of them can have difficulties when transferring WordPress sites with a very large number of files or a very large size. Truly, there’s no comparison to the performance of doing it directly from the cPanel, since making a backup of the files and compressing them into ZIP directly from cPanel is much faster than doing it through PHP routines.
That’s why we recommend doing it directly from the cPanel. It would be a different story if we were changing domains — in that case, we’ll cover that in another video about that subject and how we could do it using plugins that make this task easier.
As you’ve seen, in barely five minutes we managed to migrate our WordPress website from one server to another. If you liked this video, hit like and subscribe so you don’t miss more topics like this that we’ll cover very soon.
Cheers!