Before I get started, lets define some things...
The version of PrestaShop in my case was 188.8.131.52, however the same kind of process should be applicable to all versions.
Since this kind of migration requires a name server change at your domain registra, it can take up to 24 hours to take effect. Be prepared for an extended down time for the store in other words!
Step 1 - Put the store into maintenance mode.
This is done on Host A. On the Preferences tab change Enable Shop to No and save the settings. This will ensure that no new transactions come through, no new customer registrations are made, etc...basically it's to lock the shop down for moving.
Step 2 - Take a DB Backup
This is done on Host A. Go to the Tools tab, then to the DB Backup page. Agree to all the questions and generate the backup. This should not take too long.
Download this backup to your computer.
Step 3 - Transfer all the store files from Host A to Host B.
This can be done any number of ways, I chose to take a file system backup on Host A, download it to my computer and extract it's contents. I then compressed all of the files inside the public_html directory into a zip and uploaded that to Host B. This file was then extracted on Host B. I won't go into details of transferring these files over, but basically what needs to happen is to copy all of the PrestaShop files from Host A to Host B.
Step 4 - Get the DB details.
I didn't know any of the database details of the original installation, luckily there is a configuration file that stores all of these. In the PrestaShop directory there should be another directory called config, this in turn contains a file called settings.inc.php. It will have a number of configuration definitions, but the ones we need are listed below, take note of those in your configuration.
Step 5 - Create a new DB and user on Host B.
There are different ways of doing this, in my case I chose to use CPanel to create a new MySQL database and user. The idea is to use the details gathered in step 4 to create this new database on the new hosting provider, Host B.
After the database is created a user needs to be created in MySQL.
Once the user is created, add this user to the database that was created and give it all privileges.
Step 6 - Import the DB Backup into the new DB.
The easiest way to do this is to use phpMyAdmin. This is usually installed already by any decent hosting provider. This step is done on Host B. In phpMyAdmin, select the new DB that was created, click the Import tab, select the DB backup file that was downloaded earlier and click Go.
If everything goes well, something like this will be displayed...
The shop is essentially moved over now, but the Internet doesn't know about the new location yet. So onto the next step.
Step 7 - Change the domain name server details to point to Host B.
This is done at the domain registra level. Basically wherever your shop's domain name is registered is where you need to change this information. In my case I transferred the domain from the old host to the new host so my change was done on the new host. I won't go into details on how to do this since there are many ways of doing it and if you're not sure contact the new web hosting provider to show you how.
After the name servers are changed it can take anywhere between an hour to 24 hours for changes to take effect. This is due to how the Internet name servers work and there is no way around this.
Step 8 - Wait for the name servers to update and point to your new host, Host B.
How do you know that everything switched over to the new host? Right now you don't because both Host A and Host B have the same identical shop and database details.
As a handy trick you can edit the index.php file inside the PrestaShop directory on Host B. Simply comment out everything in the file, or even better just make a backup of this file. Then put in something like this into the file at the very top:
This will force the shop to display the "Maintenance mode, shop returning shortly." message instead of the usual maintenance screen. Once you see that message, you can be sure that the shop has been switched over to Host B.
When you do see this message, either restore the original index.php file or uncomment the parts that were commented out and make sure to remove that line that was added from above.
Step 9 - Clear your browser cache.
This is optional but as a precaution it is a good idea to clear the browser cache so you know that you're getting all the fresh files from Host B when you access the shop and that there are no stale files left over from Host A.
Step 10 - Disable maintenance mode.
Login as admin into PrestaShop and enable the shop. This is similar to Step 1, except you select Yes to enable the shop.
Note: I didn't cover moving email addresses over as that's outside the scope of this article, but yes you do need to think about that. The PayPal details usually don't need to change so you can start receiving payments straight away.