How To Upgrade OpenCart From 1.5.6.x To 2.2.0.0 In 3 Easy Steps

The instructions in this post are also valid for upgrading to OpenCart 2.3.x.

 

Why update when my site is running OK, you might ask. Even if you are perfectly fine with how your site performs there is always room for improvement. As a software product, OpenCart gets better with every new version. 

Some of the benefits include: new features, bug fixes, security enhancements and improvements. Apart from being new, new versions diminish the need for security vulnerabilities, software malfunctioning, introduce new features or new designs and in general are destined to make our lives easier. 

Another good point is that most extensions and themes are always released for the latest version which will give you further exposure. Last but not least, hey, you are running the most recent version.  

In this post I will walk you through a sample OpenCart upgrade from 1.5.6.x to 2.2.x. For most parts, these steps will work when upgrading to and from the majority of the OpenCart versions.  

The tutorial will be organized in 3 steps:

  1. Backing up your data
  2. Uploading the new files
  3. Wrapping up and enjoying your latest version
     

At the end, there will be a troubleshooting and recommendations section.

 

Important: If you are running a custom theme or you have third party modules or any other modifications it is important to check compatibility prior to the upgrade. You can read more about this in Recommendations.

 

1. Backing up your data

Before we begin, it is vital to make a store back up. This is vital as we want to make sure all information will be preserved. This is a very important step as these files will go into the new OpenCart.

1.1 Database backup: 

The first and most important step is to backup your database. You can take two approaches here. You can either use the built-in OpenCart functionality or log-into your phpMyAdmin and do the backup from there.

If you decide to take the first one all you need to do is navigate to System > Backup & Restore.

Select all the tables available in your database and click backup.


The second approach is to use phpMyAdmin. It is quite similar but more secure according to me. All you need to do here is to log-in to your cPanel and then open up phpMyAdmin.
 

Select the database associated with your store and click export. Here you have more options to choose but sticking with the default settings will do the job. 
 

1.2 Downloading files from the root directory:

The second step of the backup is to download all the files and folders from your site root directory. I will do that through cPanel. Just select all of the content of your site root directory compress it to a zip file and download it to your local machine.

See the next image to get a better idea.

 

2. Uploading new files

2.1 Get the most recent OpenCart version (or the one you want to update to)

Download the latest version of OpenCart from here.

Once you are done with that, extract the downloaded zip file.

There are a bunch of files and folder in it but we are interested in the upload folder only, so open it as well. 

2.2 Exploring the OpenCart file structure:
 

Once you open the upload folder you will see the OpenCart original folder structure. 

 

 

We will need to upload all of these files and folders to your existing store. Again you may use the cPanel file manager or an FTP client of your choice.

 

2.3 Important: Make sure config.php and admin/config.php remain the same

 

During the upload you will be prompted to handle files with the same name you can choose to override and apply those actions for the whole queue. The most important part here is to make sure that the existing config.php and admin/config.php files remain the same.

 

 

This is not so likely to happen because in the default OpenCart upload package those files are named config-dist.php. To be on the safe side, make sure their content remains untouched. The config files contain vital information for your OpenCart application, which it needs to run as expected.

 

3. Finishing the upgrade

3.1 Triggering the actual install

If you have been following along the next thing you need to do is open up a browser and go to:

http://<yourstore.com>/install replacing the <yourstore.com> with your site address.

For example if <yoursite> was funstuff.com you would need to access the following URL funstuff.com/instalI

If all the previous steps have been successful, you should see the OpenCart upgrade page in front of you.

Click upgrade. After several seconds, you should see the success screen in front of you.

3.2 Clear browser cache and cookie history

To avoid any odd behavior of your website, clear your browser cache and cookie history before visiting your store admin page. Once you open the admin dashboard, refresh the page so any style related browser cache gets cleared. Here is how to do it on Google Chrome:

3.3 Give full rights to the admin

Following we need to give top administrator user full rights so he can access the new settings available in the store. To do so navigate to System > Users > User Groups and edit the Top Administrator user groups by selecting all available options.

3.4 Fill in/Save the system settings

Next navigate to System > Settings. Fill in any blank fields with the appropriate information. Even if there aren't any fields click the save button. This will ensure that the database up to date with the new settings.

 

3.5 See what you have created.

The last step is to load your store home page and refresh it a couple of times as well. This step is required so any old browser cache is deleted.
 

Recommendations and things to look out for

Even though it is not mandatory, we will recommend you to spend some more time on the upgrade process and go through the localizations settings and click the save button as well. Here is an example:

Another thing you need to look for you might experience is related to the fact that not all of the extensions you had running on your old store might function correctly after the upgrade. To troubleshoot any problems related to that you, can simply uninstall and install them again.

This step will take care of problems caused by different encoding and decoding methods used for storing settings across the different OpenCart versions.

IMPORTANT: If that does not help the best and safest way would be to contact the extension developer and ensure that the OpenCart version you have just upgraded to is supported by the module you are using.
 

View Recommended Tools


​Hope this guide would make the upgrade process of your OpenCart store a bit easier so you can take full advantage of the eCommerce platform you have put your trust in.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time
comments powered by Disqus