This article is suggested reading even for an experienced user. It will show us any possible problems that might occur while upgrading, so we can avoid them.
Making backups of the current OpenCart system
One thing we should certainly do is backup our files and database before starting any upgrade process. This will allow us to restore the OpenCart system if the upgrade fails and if we cannot solve the reason behind it.
Time for action – backing up OpenCart files and database
In this section, we will now learn how to back up the necessary files and database of the current OpenCart system before starting the upgrading processes.
We will start with backing up database files. We have two choices to achieve this.
The first method is easier and uses the built-in OpenCart module in the administration panel.
- We need to open the System | Backup / Restore menu.
- In this screen, we should be sure that all modules are selected. If not, click on the Select All link first. Then, we will need to click on the Backup button.
- A backup.sql file will be generated for us automatically. We will save the file on our local computer.
The second method to backup OpenCart database is through the Backup Wizard on cPanel administration panel which most hosting services provide this as a standard management tool for their clients. If you have applied the first method which we have just seen, skip the following section to apply. Still, it is useful to learn about alternative Backup Wizard tool on cPanel.
- Let’s open cPanel screen that our hosting services provided for us. Click on the Backup Wizard item under the Files section.
- On the next screen, click on the Backup button.
- We will click on the MySQL Databases button on the Select Partial Backup menu.
- We will right-click on our OpenCart database file backup and save it on our local computer by clicking on Save Link As.
- Let’s return to the cPanel home screen and open File Manager under the Files menu.
- Let’s browse into the web directory where our OpenCart store files are stored. Right-click on the directory and then Compress it.
- We will compress the whole OpenCart directory as a Zip Archive file.
- As we can see from the following screenshot, the compressed store.zip file resides on the web server. We can also optionally download the file to our local computer.
What just happened?
We have backed up our OpenCart database using cPanel. After this, we also backed up our OpenCart files as a compressed archive file using File Manager in cPanel.