The most effective way to migrate a site from PrestaShop 1.4 to 1.6 or 1.7
Finally, a truly safe and simple solution for upgrading your old Prestashop site to the latest version, while retaining all data...
Problems with the official migration method offered by PrestaShop
Not a week goes by without a user of my modules asking me whether or not it's a good idea to migrate an "old" site to the latest version of PrestaShop 1.6, 1.7 or 8.x, and if so, how to go about it.
Having myself had to embark on the adventure of migrating this site from 1.4.5.3 to 1.6.1, I was able, like almost everyone else, to realize that PrestaShop's automatic migration tool (the "one click upgrade" module) was totally incapable of seeing the process through. The number of errors and crashes following the use of this tool is quite incredible, as soon as you start from a fairly old version.
.
If you still want to try it out, my best advice would be to take it step by step:
- 1-click migration from your current version to the latest version 1.4
- 1-click migration to the latest 1.5
- 1-click migration to the latest 1.6
For 1.7 and 8.x, I remind you that 1.6-compatible modules are not necessarily compatible on 1.7, and above all that 1.6 themes don't work on 1.7 or 8.x. There's no point in trying, it's not the same technology that's being used.
In conclusion, the probability of success with this method is pretty low.
Thankfully there's another solution, and it works!
Alternative PrestaShop update method, more technical, but crashes less often
So there's better, much better and I'm going to share with you this really great method. To sum it up:
- Migrate the database to the new 1.6 format, preserving its data, without doing any PrestaShop code migration at the same time.
- Associate the updated database with a brand-new, blank Prestashop 1.6, to end up with a fully functional 1.6 site, with the default theme, but using your data.
- Change the site theme, reinstall your add-ons (1.6 compatible versions of course)
Hosting choice:
Before presenting this step-by-step method, I'd like to come back to the choice of hosting for your new site. Indeed, if your current site is slow, performing a major PrestaShop upgrade is I think the right opportunity to choose the right hosting solution.
Mutualized or dedicated? : Below 1000 orders per month, site traffic doesn't justify investing in dedicated.
There are an incredible number of hosting providers and can only speak independently of those I've had the opportunity to test, of which there are 4:
- LWS: not an expensive solution, but one I'd strongly advise against if the notion of support is important to you. Questions are answered by a ticket system, often only the next day, and most of the time completely beside the point.
- OVH: everyone knows, number 1 in the world. But frankly, I don't know why. I've lost count of the number of times I've had to work on sites hosted on a shared basis with OVH that were intermittently very, very slow. Rumor has it that OVH has set up a bandwidth "protection" system on its shared servers, limiting the speed or volume of SQL requests allowed on a site, so as not to penalize other sites on the same server. I don't recommend this either.
- o2Switch: Sitolog has long been hosted by them and I still have an account with them for another site. I'd say it's still a good, economical choice, as everything is "unlimited" for €6 a month. Their support is also very available and competent. But they chose to have only one offer in the catalog and overall I was disappointed by the speed of the server and its lack of stability (frequent intermittent shutdowns lasting a few minutes, never explained). In o2Switch's opinion, because of my PrestaShop, and not having been able to get assistance to optimize it, I preferred to leave...
- Yoorshop: I migrated my site from o2Switch to Yoorshop, another French host, and immediately noticed a clear improvement in terms of speed. For a little more (€16/month), I get automatic backups, an SSL certificate and a solution that's really optimized for speed. Their support is top-notch.
The only downside with this host is that communication is a bit "rough" at times. I'm old school and appreciate courtesy. This last point finally convinced me to leave them. - Monarobase: this site is currently hosted by them. Professional, responsive, human-sized, good servers, stable, almost perfect even if it's a hair more expensive. than with the previous two. I recommend them.
Step-by-step alternative migration method:
Imagine that your old PrestaShop is on the server in a /actual/ folder
- Make one, not two, backups of your entire site, /actual/ files (with Filezilla for a PC backup or, much faster, with your Cpanel file manager for a backup on the server itself) and database (with PrestaShop or with PHPMyAdmin).
- By the way, it goes without saying, but writing it down is even better: I decline all responsibility should the procedure below fail and you experience data loss or any negative impact whatsoever.
- During the operation, it's advisable to put the current store in maintenance mode. So it's best to do it at night when everyone's asleep to avoid losing orders.
Important: if you're not comfortable with doing all this directly on the server, it's also possible, even recommended, to install a PC server emulator (like EasyPHP) and do everything locally. Then upload the new site and database once everything is working locally.
Since my site required a lot of customization after migration, that's actually what I did, to avoid having to leave the site in maintenance for too long.
- Create a new directory on the server (the new one if you've changed hosting). I call it /new
- Optionally, for security, you can also create another temporary working directory on the server and duplicate your entire current site in it. I call it /old
Knowing that this is very time-consuming, I for one skipped this step, as the risk seemed low to me having previously made good backups.
- Download Prestashop 1.6, unzip the file on the PC into a temporary folder and with a tool like Filezilla, transfer the entire contents of this folder, with subfolders, into the /new directory. Go and have a coffee, it's very long....
- Once the transfer is complete, rename the admin folder of this new Prestashop with the same name as the admin folder of your old Prestashop
- Give access right 777 to the setting.inc.php file contained in the new PrestaShop's admin folder.
- Copy from /old/ (or /actual/), to /new/ the following folders with their contents:
/mails
/img, except subfolders /img/admin and /img/jquery-ui
/download
/upload
- Launch PHPMyAdmin on the new server (or the same one if you're not changing servers), create a new database, which I'll call "ancienneamigrer" and import your latest backup of your current database into it.
- Copy from /old/config/ to new/config/ the settings.inc.php file (replacing the file already in this folder)
- Edit the contents of this file (any word processor will do) as follows:
define('__PS_BASE_URI__', '/new/');
define('_THEME_NAME_', 'default-bootstrap');
define('_DB_NAME_', 'oldamigrer′);
define('_DB_SERVER_', 'localhost');
define('_DB_USER_', 'root');
define('_DB_PASSWD_', '');
Note: Adapt root and password to your own SQL settings, of course.
- This is where it all happens: from your web browser, go to this address:
urlduserveur/new/install/upgrade/upgrade.php
or if you're working locally:
localhost/new/install/upgrade/upgrade.php
This launches a script to migrate your current database to the format (or structure) of the latest version of PrestaShop, while preserving the data.
After a few seconds or minutes, if the page displays an xml file whose 1st line contains
action result = ok error =
That means everything went well. Congratulations.
If not, you'll have to analyze and understand the errors indicated (or not) in the xml file, correct them and run the script again. What I observed:
- If you have a lot of errors all over the place: step 9 didn't work properly, tables are missing from the database.
- Error 5: writing rights problem in settings.inc.php, reset it to 777
- Error 28: issues with define('__PS_BASE_URI__', '/new/'); line in settings.ic.php
- White page: there's a syntax error in setting.inc.php such as a missing quotation mark.
- If everything is ok, test the new site (start with the back office with your usual logging). Should be a nice site in version 1.6, with its default theme and your old data.
- Delete the /new/install/ folder for security.
- Implement your modules, choose another theme or customize the default theme, etc.
- If you've been working locally, when everything's ok, put it into maintenance, duplicate everything, files and base to the server, adapt the setting.inc.php file accordingly, test and exit maintenance mode when everything's working well.
- Satisfied? just say so! There's one more step taking 20 sec, optional, but you'll be thanked for it, please share this page on social networks thanks to the buttons present at the bottom of the article.
- You still need to manage your catalog in the best possible way. If you haven't already, now's a good time to equip yourself with professional mass publishing solutions, Merlin Backoffice Flex for creating categories and organizing products and for creating and modifying products, adding photos, importing, managing sales and so much more. Try it and you'll love it:
Other issues encountered during the update:
- Product images do not appear => Activate "Legacy images" mode, then move images to subfolders and deactivate "Legacy images" mode. If that's not enough, run thumbnail regeneration.
- Numerous local 404 errors => disable URL redirection
- Numerous 404 errors in remote => disable URL redirection and re-enable it to rebuild the .htAccess.
- The backoffice or site displays without the layout, often an error with the line define('__PS_BASE_URI__', '/new/'); in the setting.inc.php file
Unfortunately, there are still many cases where this alternative method doesn't work. Some of the comments below bear witness to this. And it's not always easy or possible to understand the reason and correct it.
That leaves the 3rd solution of last resort. Its great advantage: it works in all cases.
3rd migration method, by xls export / import thanks to our PrestaShop module
- Installation of a brand-new PrestaShop 1.6 or 1.7 with its theme and modules.
- Exporting the catalog from your PrestaShop 1.4 or 1.5 using Merlin Backoffice ™ in xlsx or csv format. We recommend creating three separate files, one for categories, one for products and specific prices, one for declinations (with or without special prices and specific photos)
- Import the complete or partial catalog into PrestaShop 1.6 or 1.7 using Merlin Backoffice from the files.
Merlin Backoffice ™ for Prestashop (15-day free trial)
Create or import your products and modify them en masse
- Power
- Speed
- Flexibility
Benefits of this method:
- Work regardless of PrestaShop version or database size.
- There's no database format conversion, so there's little risk of error. It's our module that takes care of importing the data in the right format.
- The investment in these two modules will pay off very quickly, as you'll discover the full power of these tools, which aren't just import modules, but a real alternative to the whole catalog management part of the back office, thanks to mass management functionalities that are then hard to do without.
- The format of the xls or csv files produced by the export tool are directly compatible with the import functionality. This makes column mapping quick and intuitive.
- An option allows you to re-use product and category identifiers. In this way, the Urls will be preserved and there will be no impact on SEO (page referencing).
Disadvantages of the method:
- Actually, these applications only know how to export and import "only" the catalog (products, categories, declinations, attributes, characteristics, images,...) and not orders and customers. But there are other modules on Presta Addons that can handle this part very well (feel free to comment and share your solution).
How do I do it? :
- Buy and install the Merlin Backoffice Flex module. More exactly the application, as this is Windows software.
- Follow this tutorial regarding the csv or xls import functionality
- Solicit our assistance if you can't manage on your own.
I hope this article will help more than one, migrating a PrestaShop site from one version to another being a real pain, the solutions that really work are few.
Category's other articles Guides and tips on PrestaShop and online selling
-
How to avoid PrestaShop 404 errors by implementing 301 or 302 redirects
Guide
This article explains why it is important to redirect PrestaShop pages not found and how to do it using various technics like writing 301, 302 redirect rules in the htAccess file
-
How to succeed in dropshipping with PrestaShop
Tip
Guide
Comprehensive article on tips, pitfalls and best practices for starting a dropshipping e-commerce business with PrestaShop CMS