This article explains how to backup WooCommerce databases and why it is essential to do so. We will explain the three main methods of doing this – manually, using plugins, or through your hosting provider. We will even suggest some of the best plugins for you to try. So let’s get started.
Why Backing Up Your Woocommerce Database is Important
Most of us at some time have spent hours working on the computer, only for the system to freeze or the power to fail. We know how infuriating it is to lose all of that work, which according to Murphy’s Law, usually includes our best ideas. Well, think how it would feel if you were to have a problem with your e-commerce site, where you lose customer data, orders, etc. That wouldn’t be a disaster; it’d be a major and expensive catastrophe, right? By regular backup WooCommerce database, should the unthinkable ever happen, you will be able to restore a stable version with minimal data loss.
Another reason why it is essential to backup your database is WooCommerce regularly updates the plugin. You will often see an alert from them in your site’s plugins section advising you to do an immediate backup. This is to ensure that if the updated plugin has issues (e.g., conflicts with other plugins), you should be able to recover from the situation.
Backups should not be ad-hoc, just happening when you remember to do them. Make a habit of sticking to a regular backup schedule. You can even do it automatically using plugins. Consider the following also:
Frequency of backups
This depends on how much traffic your store gets and the number of transactions it handles. The heavier the traffic, the more frequent the backups should be. The critical thing to remember here is that all data in the time between your last backup and a catastrophe occurring will be lost data. As such, the more frequent the backups, the lower the chance of significant data loss.
Backup retention periods
It’s not a good idea to just keep one backup that you write over each time. The reason for this is, if you discover an issue with your system that did not cause an immediate failure, there’s a possibility that you could have saved that problem in your last backup. In that case, if you were to restore the previous backup, you will just be restoring the problem too! Therefore, it’s always wise to keep several sequential backups, overwriting only the oldest one.
Wherever possible, store your backups offsite, either on another computer somewhere else or in a cloud. The reason is simple – what happens if the catastrophe is not because of a hardware or software failure, but instead, you lose your computer in a fire or flood?.
After you’ve thought about your backup plan, you need to know how to do the backups. So, let’s now examine the three main methods of doing that.
How to Backup WooCommerce Database Manually
As you know, WooCommerce is a plugin to a WordPress website, and as such, uses WordPress databases to store data. The good news is, the process to backup WooCommerce database is identical to backing up any other WordPress database. The bad news is we do not recommend doing manual backups unless you know what you are doing. As with anything that involves fiddling with your site’s backend, manual backups carry a high risk of creating an awful mess. However, we will show the process anyway for the control freaks among you.
Your website’s files live on the server of your web host. To access them, you will need to use either cPanel or an FTP. Access to the database is generally through phpMyAdmin.
Article Continues Below
Step 1 – Create a local folder where you will store the website’s files and database
On your computer, create a folder for your backup. We suggest something readily identifiable like ‘WooCommerce Store Backup April 2021’. Within that folder, create two subfolders, one titled ‘Database’ and the other ‘Files.’ When you have finished backing up, you can shift these folders to a safer location such as a cloud or a remote computer.
Step 2 – Backing up the website’s files
There are two methods of manually backing up your database files: cPanel or FTP. The option available to you depends on whether your web host provides cPanel or not. If not, you will need to use FTP. Here is the process for each:
Step 2a Backing up the files using cPanel
Generally, the process is as per the following, although the actual steps can vary slightly depending on your web host:
1. Log into your hosting account and then go into the cPanel for your website.
2. Once you’re in cPanel, locate the File Manager:
3. Click on ‘File Manager’ to go into it. There you will see the entire file structure for your site. In that, find the folder titled ‘public_html.’ Click the ‘+’ next to it to see the subfolders it contains. If you have several websites, you will need to select the one which corresponds to the site you wish to backup. In the example below, the red box shows the location of our ‘public_html’ folder, and the blue boxes show the subfolders for our example website (bestcampstove). The three crucial subfolders related to the backup are ‘wp-admin,’ ‘wp-content,’ and ‘wp-includes,’ but we will back up the entire site folder for simplicity.
4. If you only have one site, you can compress the entire ‘public_html’ folder. If you have several websites, you will need to compress the subfolder for the website you want to back up. How you do this depends on your computer or the cPanel you have – either you will be able to call up the ‘compress’ option by right-clicking on the mouse while hovering over the folder, or – as in our case – there is a button in the menu bar. In this screenshot, the blue box shows the subfolder for the site we wish to compress, and the compress button in the toolbar is in the red box:
5. Hit ‘Compress,’ and a popup containing several compression options will appear. You will need to choose ‘Zip archive’ and hit ‘Compress File(s).’ The process will take a few seconds, but when it is complete, you will see a new Zip file appear in the file list:
6. Select the newly created Zip file and hit ‘Download’ in the menu bar. This will save a copy of the Zip file to your local downloads folder on your computer. You should now move that downloaded Zip file to the ‘Files’ backup folder you created in Step 1.
Step 2b – Backing up the files using FTP
If you do not have cPanel, then FTP is an alternative way of accessing and backing up your site’s database. To do this, you will need to install FTP software (e.g., FileZilla) on your computer, plus you will need your FTP login details. The steps to follow are:
a) Open your FTP client and enter your login details to connect to the server.
b) When the server is connected, the file structure will appear in the ‘Remote site’ on the right-hand side of the screen:
c) As with backing up with cPanel, you now need to locate either the ‘public_html’ folder or that of the site you wish to backup if you have more than one.
d) Right-click the folder and select ‘Download.’ This will copy the folder to your computer. We recommend that this folder is compressed into a Zip file, plus encrypting it is also a good idea. You should then relocate the compressed (and encrypted if you choose to do that too) folder to the ‘Files’ backup folder you created in Step 1.
Step 3 – Backing up the website’s database
Your website’s database also lives on the server of your web host. The database is generally accessible through the phpMyAdmin section of your cPanel, but if you don’t have that, you can download it here.
a) Log into your hosting account and then go into the cPanel for your website.
b) Once you’re in cPanel, head over to ‘phpMyAdmin’ under the ‘Databases’ section:
c) Click on ‘phpMyAdmin’ to gain access to the WordPress databases and then click on the ‘Databases’ tab:
d) If you have several sites, and therefore multiple databases (as in the screenshot above), to know which one to select, go back to the File Manager in cPanel (or FTP where no cPanel is available) and download the ‘wp_config.php’ file for the site we are backing up. Opening this file will give us the name of the database we need to choose in phpMyAdmin:
e) Once you’ve identified which is the correct database, select it in the phpMyAdmin panel. This will open the list of all the tables in the database in the righthand pane. Select all of these and hit ‘Export’:
f) You will be asked which export method and format you wish to use. We recommend using the ‘Quick’ export method, and the format should be ‘SQL.’
g) Once you hit ‘Go,’ the database will be downloaded to your computer as a .sql file which you can relocate to the ‘Database’ folder you created in Step 1.
So that is how you manually back up your WooCommerce (or any other WordPress site for that matter) database and files.
How to Backup your WooCommerce Database Using Plugins
Plugins are your best friend when it comes to backing up your WooCommerce database, particularly if you are not sure about what you’re doing. You won’t need to mess around with cPanel, FTPs, or phpMyAdmin, and you will be able to set the plugin to do the backups at your chosen intervals automatically.
As WooCommerce is a plugin for WordPress, you don’t necessarily need any special WooCommerce plugins to automate your backups – pretty much any WordPress backup plugin will do the trick. That means you have quite a few to choose from, each offering slightly different features and operating methods than the others.
If you are on a limited budget, UpdraftPlus WordPress Backup Plugin has a free version that will enable you to backup your database to a cloud (for example, Dropbox, Google Drtive, DreamObjects, etc.)
Installing and setting up UpdraftPlus
Step 1 – Install and activate the plugin
Firstly, you need to install and activate the UpdraftPlus WordPress Backup Plugin. You do this in the same way you add any other plugin, i.e., through the ‘Plugins’ section of your website’s admin panel.
Step 2 – Go to the ‘Settings’ menu
Once installed and activated, go to ‘Settings’ in the lefthand menu of your WordPress admin panel. A new option titled “UpdraftPlus Backups” should now be present. It is from here that you will configure the plugin. Click on that.
The panel on the right will now show you all the configuration and status options for the plugin. Click on the ‘Settings’ tab.
Step 2a – Configure the plugin’s settings
From the ’Settings’ tab, you will be able to configure the following:
- File Backup Schedule: You can choose the frequency for the backup of your files – this can be every two hours, all the way up to every month.
- Database Backup Schedule: As with the File Backup Schedule, you can set the backup frequency for your database. We strongly suggest setting the frequency for both the files and the database backups to the same interval.
- Choose Remote Storage: Here, you can choose where your backups get stored. Choose the one you prefer or already use and follow the instructions. If you do not already have an account with the chosen cloud, you will need to sign up for one first.
- Include in Files Backup: This option allows you to select which files should and shouldn’t get backed up. We strongly suggest you keep the default settings for this.
- Email: Checking this box will allow you to receive a status update whenever a backup of your website occurs.
Step 3 – Let the plugin do the rest!
That’s it; you’ve configured your plugin, and it will back up whatever you have told it to at the intervals you selected.
You will be able to see what backups exist using the “Backup / Restore” tab, where you can also do a manual backup if necessary.
UpdraftCentral has a premium upgrade option. This costs from $55 for the first year and $33 per year after that for up to two sites. Premium adds considerably more functionality to the plugin, such as incremental backups and automatic backups before updates, multiple storage destinations, enhanced reporting, no adverts, fixed backup time, additional add-ons, etc. It also includes a one-year 1GB subscription to UpdraftVault.
Alternatives to UpdraftPlus
As already mentioned, there are many plugins available to backup your WooCommerce database and files. Here we suggest a few of the more popular ones:
WooCommerce recommends Jetpack as not only does it back up your site, it also runs daily security scans, alerting you to threats such as suspicious plugins. While it is available as a free plugin, that does not include backups – for those, you will need to upgrade to a premium version which will cost you from $54 per year. Jetpack is in operation on over five million websites, according to the WordPress plugin directory.
BlogVault boasts special backup implementation for WooCommerce sites. It can instigate backups immediately changes are detected (e.g., when an order is placed), plus it offers 365 days of the archive. It also includes one-click staging to allow you to test updates and changes to your website safely. Premium plans start from $89 per year. A free slimmed-down version is available also.
BackupBuddy is a premium plugin that adds automatic backups to your site. Each subscription comes with 1GB of cloud storage (the top plan comes with 5GB). The plugin scans and repairs your databases, plus it scans your website for malware.
Annual subscriptions for BackupBuddy start from $80 per year.
WP Time Capsule offers automatic real-time backups. That means whenever your WooCommerce site changes – for example, when an order is placed – a backup is made. This means the risk of losing any data is very low indeed. It also claims to do backups up to 10x faster.
Subscriptions for WP Time Capsule start from $49 per year for up to two sites.
How to Backup WooCommerce Database Through Your Hosting Provider
Many web hosting providers offer some kind of backup facility with their hosting packages. Some will do automatic backups, and others will only have the facility to do easy manual backups. What is offered varies between providers, but generally, you can find it in the cPanel. Here are typical steps for creating a (manual) backup of your database. In this example, the hosting provider is GreenGeeks:
Step 1 – Log in to cPanel
Log into your host, choose your site, and go to the cPanel. Under ‘Files,’ locate the ‘Backup’ icon:
Step 2 – Go to the Backup panel
Clicking the ‘Backup’ icon will take you to the Backup panel, which should look something like this:
Step 2 – Create your backup
If you select ‘Full Backup,’ the cPanel will backup the entire file structure to your home directory. If you have multiple sites, all sites will be backed up. However, most web hosting providers will:
- automatically delete these backups after 48 hours, so you will need to download it to your local drive as soon as the backup has completed, and
- cPanel backups may be disabled for accounts greater than 10 GB in size, in which case it will be necessary to use another method of backing up. That said, some hosts offer to create full cPanel backups for a fee.
If you have multiple sites, it is better to choose only the one you wish to back up as it will involve processing less data and therefore be quicker.
To do this, you will first need to follow the instructions in Step 3 d) of ‘How to Backup Your WooCommerce Database Manually’ above to identify the name of the database.
Once you have that, locate it in the list which shows under ‘Download a MySQL Database Backup’ (you will probably need to scroll down the page in cPanel to see that list):
Clicking on the appropriate database will start the download process. The backup is stored as a .sql file in the downloads folder of your computer.
Step 3 – Move the backup to a secure location
We recommend moving the downloaded .sql file to a safe place for storage, for example, a dedicated backup folder as discussed earlier in this article or to the cloud.
Wrapping It Up
Backing up your WooCommerce – or any other WordPress site for that matter – should become second nature to you. Data can easily get lost or damaged for several reasons, and not having a backup can cost you dearly.
Of the three options we have presented in this article, we strongly recommend you use a plugin to help with your backups because:
- You will save time by having them done automatically.
- You won’t forget to do them.
- There is no chance of you screwing up files in the process.
There are free plugins available, but given your site is a source of income, it would be wise to invest in the additional functionality that premium plugins provide.
We’d love to know what kind of backup strategy you have. Do you use plugs, or do you do manual backups? How often do you backup? And have you ever had to restore your WooCommerce database? Please do drop us an update in the comments section!