Migrate your WordPress site to Bluehost (or any other new host) quickly and free

Migrate your WordPress site to Bluehost (or any other new host) quickly and free

Most users can migrate their WordPress site with a plugin but it’s also possible to do this manually if you are experiencing difficulties with plugin methods. In this article I’ll walk you through both options.

Table of Contents

Why migrate to Bluehost?

Bluehost is a commonly used website hosting service for WordPress users. As such they have everything you need to host a site(s) here. Their user interface easily allows you to add all the relevant things you need like the site itself, new email accounts, upgrade and downgrade services as per your site(s) needs and they do it in a secure way (2 factor authentication is an option).

I personally use Bluehost to host this website and several others. I find it easy to operate and has good customer service if I do get into some sort of a pickle. They have chat feature on their website so you can, whenever you like, go speak to someone there and ask for help.

If you’re interested in seeing what Bluehost has to offer I wrote a breakdown of Bluehost Hosting Services for all budget and skill categories which you can read here. Bluehost is one of the best and most popular WordPress hosts with a simple management dashboard for all your site(s).

Are there alternatives to Bluehost?

There are lots of alternatives which you can check out in these two posts,

How to migrate your WordPress site to Bluehost?

Migrate with a plugin (easiest):

You can install this All In One WP Migration Plugin on your existing (before moving to BlueHost) WordPress site and follow the below instructions.

Step 1:

  • You can install the All In One WP Migration Plugin by going to your plugin dashboard at something like, https://yoursite.com/wp-admin/plugin-install.php and searching in the search box for ‘All in one WP Migration‘ which will then display the plugin for you to install and activate as per the below screenshot.
  • Alternatively, you could also install it manually by downloading it at All in One WP Migration and then uploading the downloaded zip file at your url similar to, https://yoursite.com/wp-admin/plugin-install.php and hitting the ‘upload plugin button’ at top of screen.
  • Once installed make sure to ‘activate‘ it before moving onto the next steps.

Step 2:

Now its installed you can go to this a similar URL this on your site, https://yoursite.com/wp-admin/admin.php?page=ai1wm_export, and add some settings to the export of your site.

Some export options for your site

Choose whatever settings you like and then hit ‘Export‘ Button.

NOTE: If you are changing the URL at the same time as moving hosts (unlikely but possible) there is an option here to replace the URL (or any other string) in the database. This is necessary because WordPress hardcodes the URLs into the database. This will break your new installation if you don’t change this. This is assuming you are changing URLs. If your URL will remain the same then this is not necessary.

You will have a choice of exporting to different formats. I selected ‘Files‘ and proceeded from there.

You will see an ‘export‘ screen while it performs the export task. This could take a while depending on the settings you chose and the size of your site.

Once complete you will see a download button for your site. Click it and let the compressed .zip file of your site download.

Once the file is downloaded we then need to go on over to your new hosting account.

If you have a Bluehost Account then the rest of this tutorial contains screenshots from Bluehost. If you are not using Bluehost then the process is similar at a high level but the specific location of certain tabs and icons will be different to some degree.

Step 3:

On your Bluehost Account go to the ‘Domains‘ Tab and then ‘Assign’ Tab in the left hand menu. You can choose to set up a site that has already had its Name Servers pointed to Bluehost and even a site in which you haven’t yet. The later is good if you are not quite ready to launch yet.

If you don’t already have to have a domain name (eg yoursite.com) in order to do this. If you don’t then

  • you can set up a sub-domain (also in the left hand menu under ‘Domains’)
  • and later, once you have bought the domain name, come back to the ‘Assign’ tab and use the ‘Domain name not already associated with your account’ option.
  • From there you can, in the same assign tab process, select ‘add on domain’ and then select the existing directory which houses your WordPress installation with which you created the WordPress site at.
  • In this way you can set up a WordPress site without having the domain name yet, use a sub-domain to set up a WordPress site, and later use this process to assign your newly purchased domain name to the sub-domains directory.
Find the Domains and then Assign tab.
3.1: Create a new WordPress installation on your new Bluehost server account:

If there is NOT already a WordPress Installation on your new host then you need to follow this step. If THERE IS then you can skip it and go to section 3.3.

  • Inside your Bluehost Dashboard go to your Advanced Tab (cPanel) and find the ‘WordPress Manager with Softaculous‘ Icon.
Advanced Tab or cPanel tab inside Bluehost Dashboard
  • Click into Softaculous and create a new WordPress site with ‘Install’ button to create a new WordPress Installation.
  • It will take you through the installation process and allow you to login to your new WordPress site.
  • NOTE: You may want to take note of the installation file path if your are aiming to point an old URL to this new installation of WordPress. In the following steps we will import the old site and it will be the same site as before on a new server but this will mean that your URL will need to point to a new set of Nameserver’s. I’ll cover this in a further section of this post so for now just note the installation path if you plan on keeping the same URL for your new site as your old.
3.2: Install All in One WP Migration

On this new installation install the All in One WP Migration Plugin. This is the same process as you followed above in the old site. This time follow the same steps as before but on the new site.

3.3 Import your original site which you exported in step 2 above:

In your new installation of the WordPress CMS and on the left hand side go to ‘All in WP Migration’ menu item and then ‘import’.

Upload the file compressed file with which you exported the original site in the previous step. This could take a while depending on the size of your site and the options you selected.

NOTE: This will overwrite the initial installation of WordPress which means you will need to login again.

3.4: Login to your new site and change permalink settings in the new site:

Because you just uploaded a new database you will be asked to login again to this Bluehost version of the original site. Login with your normal details that you would have used for the previous (original) site.

Once logged in, you will also want to go to the left hand side of CMS and ‘Settings’ -> ‘Permalinks’. Click ‘Permalinks’.

Hit ‘Save’ button on this page.

Then hit ‘Save’ button AGAIN on this same page. This will make WordPress execute some internal rules for its permalink structure.

3.5: Review and troubleshoot:

You should now be able to browse the front end and the CMS of your site at its new home on the Bluehost server. Check it out and see if you have any issues. If so, try to re-read the above instructions to be clear. If something odd has happened then try your Bluehost Customer Service. Look for the Chat Widget on right hand side of your screen.

Migrate manually (harder)

Export your existing database:

Step 1:

Go to your PHP MyAdmin which is on your host account cPanel. You will need to go to your hosts website and login and access the cPanel to get into PHP MyAdmin.

Step 2:

Find your Database in the list and lick into it.

PROTIP: If there is more than one database and you aren’t sure which one is the relevant one then you can check this in your https://yoursite.com/wp-config.php file by looking at the value for the DB_NAME variable. You can access this from the ‘File System’ navigator from your cPanel. It can’t be accessed from the WordPress CMS.

After clicking into the database in the horizontal menu near the top of the page you will see an ‘Export’ button. Click it.

Then you will be presented with some options to apply to the exported .sql file we are about to download. You probably only need to select the ‘Include DROP File’ checkbox but even this is optional.

Then click ‘Export’ and wait for your file to download. It will be an SQL file with suffix of .sql

Step 3:

WordPress hardcodes its URL’s in the database meaning that when you move it you MIGHT need to update these.

If the new URL at the new host server of your site is different than the old one then you WILL need to replace these in order for the site to work in the new server.

You can do this in a couple ways,

  • Open up the dowloaded .sql file and do a ‘find and replace’ on the old and new URLS. For eg, I use Sublime Editor to find and replace https://originalsite.com to https://newsite.com
  • The other option is do do a similar find and replace in SQL on the new server before you load up the site in the new server however I find this approach more simple so I’ll stick with this for this tutorial in the interest of simplicity.

Download the site files:

We have the database but now we need the files which make up your WordPress site. Follow these steps to find, compress and download these files,

  • Go back to your cPanel as you did above.
  • Find the File System Icon. Click into it.
  • Now find the root of your WordPress’s sites files but don’t click into it.
  • PROTIP: In the File System viewer you will see a folder named something like, ‘yoursite.com’ or simply ‘yoursite’. If you don’t see these check the ‘public_html’ folder as they may also be in there.
  • Now single click on the file.
  • Then near the top of the page find the ‘compress‘ button and click it.
  • Select ‘.zip‘ as the compression file type and execute.
  • In a few moments the page will refresh once the folder has been zipped and you will see a file name something like ‘yoursite.com.zip‘ or ‘public_html.zip. This is the compressed version of your entire WordPress files including Core WordPress, Plugins, Themes, anything you’ve uploaded…. everything.
  • Double click on the newly created .zip file and it will download to your local computer.

Import to the new site:

At this point you have two downloaded files, the database (.sql) file and the WordPress site files (.zip) file. With these two things we can now go to our new server host and upload the new files to their location over there. The below instructions are on my Bluehost server (which I use personally) but generally the steps are the same.

Step 1:

On your Bluehost Account you may have a few diff set ups. If your account only has one URL (main URL as its known) then you are good to go and you can skip to the next step.

If, however, you have multiple sites on the same Bluehost Server then you need to ‘Assign a Domain‘ to your Account. You can do this with or without having pointed your name servers to your Bluehost account.

The short version is something like,

  • Go to your Bluehost cPanel and click the ‘Domains‘ Tab and then the ‘Assign‘ tab in the left hand menu.
  • Add your domain. It doesn’t have to point to the Bluehost server at this point if you don’t want it to but also it could. As you please.

If you don’t already have to have a domain name (eg yoursite.com) in order to do this. If you don’t then

  • you can set up a sub-domain (also in the left hand menu under ‘Domains’)
  • and later, once you have bought the domain name, come back to the ‘Assign’ tab and use the ‘Domain name not already associated with your account’ option.
  • From there you can, in the same assign tab process, select ‘add on domain’ and then select the existing directory which houses your WordPress installation with which you created the WordPress site at.
  • In this way you can set up a WordPress site without having the domain name yet, use a sub-domain to set up a WordPress site, and later use this process to assign your newly purchased domain name to the sub-domains directory.

Step 2:

  • Now go to the ‘Databases‘ icon on the cPanel. Click into it.
  • Create a new database and note down the name of it because in the next steps you will need it.
  • You also need to create a new Database User which is on the same page as the one which you created a new database.
  • Again, note down the new users username and password as you will need them soon.

Step 3:

  • Now go to your ‘File System‘ on your cPanel and find the root folder for your server.
  • NOTE: This is not the root folder of you newly assigned website but the root folder of the entire server.
  • Find the name of the newly assigned websites folder and note down what it’s called. We are going to do a little folder renaming soon and you’ll need this.
  • Single click on this newly assigned folder. Hit the ‘rename’ button above.
  • Rename the folder from originalFolderName to originalFolderName.original
  • Upload your .zip file which comprises the WordPress site files (which we downloaded in the above steps) to the root of your server also.
  • Now decompress this .zip file by single clicking on it and selecting ‘decompress’ from the menu near top of screen.
  • Once this is done rename the resulting folder from ‘nameOfUploadedZipFile‘ to ‘oldFolderName
  • We are basically uploading the WordPress site files, decompressing them and then naming the new folder that of the old so the assigned domain will point to the correct set of files.

Step 4:

  • Now go back to cPanel and find the PHP MyAdmin icon. Click into it.
  • On the left hand side menu you will see the database with which you created in the above steps. Click on it.
  • Find the ‘Import‘ button at the horizontal menu near top of screen.
  • There will be a file upload field.
  • Click it and upload the .sql file with which you downloaded in a previous step.

Step 5:

  • Now go back to your File System viewer and go into the folder of the newly renamed site. In the example above this will be website.com
  • Find the wp-config.php file and click the edit button in menu near top of screen.
  • You need to replace the value for 3 variables related to the newly created database name, username and password. Hopefully you noted these down as I suggested so you can recall them here.
  • Find and replace the code below with your particular values.
define( 'DB_NAME', 'databaseName' );
define( 'DB_USER', 'databaseUserName' );
define( 'DB_PASSWORD', 'databasePassword' );

Troubleshoot:

At this point you are more or less done except you will want to check everything is ok because what we just did was quite significant and bugs can creep in depending on your particular situation. Load up your website and check it out. You should be able to login with your old username and password.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *