Every once in a while, You might need to move your WordPress site to a new host because your current host is giving you trouble. WordPress Migration is a must-do task for websites that are slow and giving new errors now and then. Many people just put off migrating because they think it is too much work and they might do something wrong and break their WordPress site. But we are here to help you migrate your WordPress site to a new host easily without any issues.
Whether you want to transfer your WordPress site from WordPress.com or Hosted WordPress from any other host, Here you’ll find detailed instructions on how to move your site to a new host.
WordPress Migration Ultimate Guide:
Transferring your WordPress website to another consist of 3 steps: Transfer website files, Transfer Database and Changing of a few settings. In this guide, You’ll find detailed instructions on how to do each step, Step by step.
Transfer Website Files to a New Host
Let’s start with the first step. To move your files to your new host, First, download the files to your local computer via an FTP client or Cpanel. If you want to use FTP, Connect to your website via a FTP client like FileZilla, You’ll be shown all WordPress files for your installation. Simply drag the files to your local computer, and it’ll start downloading. It will take some time to download all files to your server since it’ll download all files one by one.
If you want to do it quickly, You can go to your Cpanel, Make a .zip file of your files and download the .zip file to your local computer. Since it’ll just be one file, It should be downloaded quickly.
After downloading all the files to your computer, Now it’s time to move them to your new host. Just upload them via FTP and if want to do it quickly as before, use Cpanel to upload the .zip file and extract it using File Manager.
Transfer the WordPress Database
Now for the second step, First you have to export the database using Cpanel. After logging into Cpanel, there are two ways to export your database and download it. First is via phpMyAdmin. In phpMyAdmin, Go to Export, Select your database and download the database file to your computer. Another way is to go to Backup in your Cpanel if your host is offering it. Go to Backup and click on your database file and download it.
Now for Importing that file to your new host, Go to phpMyAdmin and open Import.
There, Upload the file and import it. Just like exporting, You can also import via Backups. Go to Backup, In Restore a MySQL Database Backup, Upload the database file that you have downloaded before and import it.
Configure settings for the new server
Now that you have moved all the files and database to the new host, It is time to change all the necessary settings to make it work. To do this, Edit your wp-config.php file from the root folder and find the following lines:
define( ‘DB_NAME’, ‘database_name_here’ );
define( ‘DB_USER’, ‘username_here’ );
define( ‘DB_PASSWORD’, ‘password_here’ );
define( ‘DB_HOST’, ‘localhost’ );
Replace those values with your database details from the new host. Save this file and your WordPress site will be up and running from your new host.
Move WordPress from WordPress.com
Many users using WordPress.com will eventually decide to move to their own hosted version of WordPress but they don’t act on it because they think it’s a tedious task. But it’s actually very easy to do so nowadays.
To move your site from WordPress.com, First login to your WordPress.com dashboard. Then, Head to Settings -> Export from the menu.
Click Export all and it’ll download a .xml file to your local computer. Save that file and go to the next step.
After downloading the file, Go to your new WordPress installation on your new host.
After logging into the dashboard, Go to Tools -> Import from the menu. It’ll show you many options on from where you want to import the data from. Choose WordPress from the options.
After clicking on Run Importer, It’ll install the plugin and get you to the Import page.
Here, Click choose file and select the .xml file you previously downloaded from WordPress.com dashboard and click Upload file and import.
It’ll then import all your data from your old site to your new standalone WordPress installation.
It is important to note that this will only transfer your posts, pages, media from WordPress.com. Plugins and themes from WordPress.com cannot be transferred to your new installation. You have to choose a new theme for your new installation and install necessary plugins you need.