How to Update WooCommerce in Right Way Without Breaking Online Store

How to Update WooCommerce in Right Way Without Breaking Online Store

Updates of WooCommerce are common phenomena. It is required to Update WooCommerce to meet with the required changes. When you update  WooCommerce, it is expected to be better than the previous version and should add more features to it. Once you decide on WooCommerce Upgrade to any other version you have to make sure the theme you have installed will be compatible with the new version. The same thing is with other plugins you use. You can update WooCommerce to the latest version both manually and automatically.  If you have it at automation, you can expect smooth automatic updates.

First of all, what to backup?

Two things you have consider as backup: web files and the database.  For a WooCommerce site you need to take backups as often as you can, because whenever a new customer registers or anyone makes a new order on your website, the database is updated. In case your store breaks or is hacked, taking the most recent backup is the best way to ensure that you don’t lose any data.

Method 1: Use Updraft WooCommerce as Backup

Step 1:  Install Updraftplus plugin

To install Updraftplus log into your WordPress admin page, navigate to Plugins > Add New, search for UpdraftPlus, install it and then activate it.

Install Updraftplus

Now you will see UpdraftPlus Backups option appear inside of the Settings tab.

Step 2: Settings of Updraft

Click on the Settings tab of the UpdraftPlus plugin as shown in the image below.

Setup Updraftplus

You must set the policies of your backup before keeping the backups automated.

Let’s go over the settings one-by-one.

2.1 File backup intervals:

This section should always be kept enabled to take the backups of the WordPress core files.

2.2 Database backup intervals:

Apparently, the most important thing to backup in WooCommerce is the database where all the settings and data reside.

It’s a good idea to take the backups of both web files and database at the same frequency.

2.3 Include in files backup:

In this section, it is allowed to choose what files to include or exclude when taking the backup of the web files. I recommend you to take the backup of plugins, themes and uploads folders.

It is advisable to keep them as by default. Folders and files can be excluded manually by typing in: the folder name + a trailing “*”.

Infiles backup

Step 3: Enable Reporting

Enable reporting will give you an email with status updates  of when your website is backed up.

Finally, navigate to Current Status > Backup Now. A popup will appear with a few options, do not select anything as you need a full backup of your website and database. Click Backup Now and there will be a progress bar.

Congratulations! You have successfully completed WooCommerce backup for your Online Store by using Updraft plugin!

Method 2: Manual Backup

You can easily take manual backups of your WooCommerce files and database as you wish. In this tutorial,  cPanel is being assumed.

If you are hosting your web via Xampp, here is a short tutorial on how to backup the database using MySQL Manager

Step 1: Keep Backup of your webfiles

Firstly you need to take the backup of your webfiles before taking the database backup. This can be done easily via using a FTP client like FileZilla.

Once you connect to the FTP service, navigate to the folder where the WordPress application is installed.

Download all the files in the root of where your WordPress instance is installed. Select them all by clicking on a single file and then pressing the key combination of CTRL + A. Right-click on the selected files and select the Download Option.

Downloads all files

All files will be downloaded in a manner of minutes depending on the size of your website. Once the process is finished you may close your FTP client and with that you have successfully backed up the webfiles of the WordPress application.

Step 2: Backup your online store database

2.1 To keep the backup of your online store database you have to know the database name. 

If you don’t know where to find, the database name is contained in a file named wp-config.php in the home folder of your website where the WordPress application is installed at.

Right-click on wp-config.php when you find it and choose the Code Edit option then you should be able to edit and look at the code of the file. Look at the following snapshot of code:

define('DB_NAME', 'database_name');

Here the “database_name” string should be the actual name of the database used by the WordPress application.

2.2 The backup process for your database begins by accessing the phpMyAdmin feature of the cPanel.

2.3 Then you will need to search the database name in the vertical tree view located in the left side of the phpMyAdmin application. Once you find the database, click on the Export tab from the top navigation menu.

Export database

Finally, click on GO button.

Get ready for major WooCommerce releases

You can be sure if you should go for the latest update if you are a follower of WooCommece Development Blog. The blogs contain all necessary details and suggestions that you should keep in mind before accepting the change. You’ll find the pros and cons of the change, the areas affected by the update and the pre-requisites to update WooCommerce to its latest releases. You can also find useful links for further reading in these blogs. Apart from these, you can also read the existing issues raised by users to know more about the problems arising.

As soon as you get notified of any major WooCommerce release, make sure that all of your installed plugins are tested on the latest WooCommerce. If not, the plugin might not function properly.

Update WooCommerce on Staging Website

Once the new WooCommerce version has been released, it’s time to head on over to staging to update WooCommerce.

Now you can click the update plugin link 

You should also now update any third party WooCommerce extensions and WooCommerce themes you rely on.

Execute Test on Staging Website

While still being in the staging website, you must ensure that you test various functions under the latest WooCommerce.

To test the extensions, enable the WP_DEBUG_LOG. By doing this you can capture all the programming and basic errors and their causes. The debug mode will also direct to the places where you can fix those issues. My recommendation is that you check the responses in both the backend and the frontend.

In Frontend test you can check the pages, products pages, login and profile updates, purchase, transactions etc.

And in Backend test you can check for order, products and different settings in WooCommerce.

If you get test results as per expectations you can move forward to installing the latest WooCommerce to your live website. Otherwise go for fixing issues during the test.

Fixing Issues on Staging Test

If you encountered issues while testing, you can check the debug messages and contact the developers and WooCommerce support so that issues can be resolved. Usually, when you contact for support in these cases you are asked for the debug messages.

It’s vital to provide as much data as possible on the issue:

  • Exact steps along with screenshots, error messages and so on. Make sure you write bug reports that developers will love you for.
  • Your WooCommerce System Status Report
  • If appropriate, provide them with access to see the issue on your staging environment.

Once you fix all the issues in your staging store, it’s time to deploy from staging store to live.

Deploy from staging to live

If you run a busy eCommerce store your database is constantly changing – which makes pushing changes from staging to live more complex than it otherwise might be on website with content that doesn’t change that often.

Manual

This option is quite simple. You need to follow the same steps you followed for making the staging website. In short, start with the manual process of update, followed by making the staging website and testing the functions of the website. And follow the same process on your live website i.e go for a manual update and test the functions on the live website after a successful test on staging website.

Push from Staging to Live

This process is used when you have complexities in the staging website. When you have a large code and database change occurring due to the update, you will require a technical pushing process, which will transfer the changes to the live website. Now as we know database changes are still manual in WooCommerce, an automatic pushing of codes to a website gets a bit risky. There are a few plugins and services that are starting to emerge to help solve this problem.

Partial pushing

And the last is partial pushing of codes from a third-party WooCommerce management platform. One of the most popular such platforms is Github. Using Git with Bitbucket helps you to manage WooCommerce deployments through a central git repo. Changes are pushed from local development environments to a central staging area. Once deployments are completed you need to execute automated end to end tests. Once all tests are cleared you can initiate an auto deploy to your live website by tagging and pushing branches to it.

Related Articles: How to Update WooCommerce

Managing changes or to Update WooCommerce is one of the highlighted shortcomings of WooCommerce as a platform. But if you are owning a store where you’re generating millions of dollars in revenue per year, then managing your WooCommerce updates is of high priority to you.

One Reply to “How to Update WooCommerce in Right Way Without Breaking Online Store”

Leave a Reply