Backup and Restore Management Tutorial in WooCommerce

Backing Up Your WooCommerce Website

Backing up your WooCommerce based Online Store is maybe one of the most important activities you would like to perform as it will ensure that you will have a restore point if anything goes wrong with the website at some point in time. Currently, our WooCommerce Hosting package provides our customers with daily backups for their websites so you do not have to think of this importatnt, feature.

 

In the next few lines of this tutorial, we will provide you with detailed step by step guide on how to manually backup your website.


To Backup your WooCommerce Online Store, you need to complete these steps:

Step 1: Backup the Files of your Online Store
Step 2: Backup the Database of your Online Store

 

Step 1 Backup the Files of your Online Store

First and foremost you will need to backup the files of your website. This can be achieved quite easily via the FTP service for your account. If you are unable to find the information you will need about that service please contact your hosting provider or if you are a customer of ours please check your welcome email as there we have provided more information on the matter. Also if you are not familiar with how to use FTP clients please review our FTP Tutorials series as there we have explained in details everything you will need to operate with FTP Clients.


Once you connect to the FTP service for your account and you navigate to the folder where the Wordpress application is installed at you will be able to get a list of all the files your Wordpress application is using. In order to download these please select them all by clicking on a single file and then pressing the key combination of CTRL + A. Now you will need to right-click on the selected files and select the "Download" Option.

The files will be downloaded in a manner of minutes depending of course 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 files of the Wordpress application used as a platform, for the WooCommerce Online Store plugin.

 

Step 2 Backup the Database of your Online Store

Now that you have backed up the files of your website it is time to finalize the backup procedure by simply backing up the database used by the Wordpress application. In order for this to be achieved, you will need to know the database name. If you are not sure where to find it please read the next lines of this tutorial carefully.

The database name is contained in a file called wp-config.php which can be found in the home folder of your website where the Wordpress application is installed at. In order to view the code of that file, you can either download it or you can access it via the File Manager feature of your cPanel.

Once you find the file please right-click on the same and choose the Code Edit option as it will open for you the code of the file.

When you are able to see the code please look for a line containing the following piece 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. With this, you already have the database name and you can move forward with its backing up process.

The backup process for your database begins by accessing the phpMyAdmin feature of the cPanel provided with every WooCommerce Hosting package you purchase from us.

Then you will need to find the database by searching for its name in the vertical tree view located on the left side of the phpMyAdmin application. Once you find the database, please click on the same so you can be moved to the table view of the database and once there simply click on the Export tab from the top navigation menu.

Then the only thing remaining to do is to click on the GO button and thanks to our SSD storage you will receive a .sql backup of your database directly on your local computer for few seconds depending on the size of your database.

With this, you are done with the complete backup of your website!

 

Further reading

How to Configure Accounts Options in WooCommerce

Payment Methods Configuration in WooCommerce

Email configuration in WooCommerce

How to Configure the General Options in WooCommerce

How to Configure Product Options in WooCommerce

Configuring the Display Options in WooCommerce

How to Configure the Inventory Options in WooCommerce

WooCommerce Product Management Tutorial

How to install WooCommerce

Shipping Configuration in WooCommerce

How to Schedule Blog Posts in WordPress

 

Backup Restore Tutorial in WooCommerce

If you maintain a regular backup generation procedure and you reach a point when you need to restore on e of the generated backups then most probably you wonder how to perform the backup restoration. In the next few lines of this tutorial we will provide you with more information on how you should be able to handle the entire restoration process on your own.

Just in case you have no backups generated for your website, our WooCommerce Hosting package provides weekly backups which you can get restored if you simply contact our Technical Support Team.


To restore a backup of your Store, you need to complete these steps:

Step 1: Restore the Files
Step 2: Restore the Database
Step 3: Configure Wordpress with the Database you have restored

 

Step 1 Restore the Files

This step can be skipped if you are sure that the issue you have experienced is related only to the database of your website. In case you would like to restore the files here is what you will need to do.

Considering that you have the files you have backed up previously on your local computer you will need to login into the FTP service for your account using an FTP Client. If you are wondering where to find the login credentials for that service you can check the welcome email you have received after purchasing your hosting package.

 

Assuming that you have connected to the FTP service for your account you should start uploading the files. We recommend to simply select all of the files from your local computer (by clicking on a single file and pressing key combination of CTRL + A) and upload them by right-clicking on the selected files and choosing the Upload option.

This will prompt a warning that you are about to overwrite some existing files and this is normal since you are uploading the backed up files over the currently existing files. Thus you should choose to overwrite the files by selecting the "Overwrite" option and then the "Always use this action". Next you will need to simply click the "Ok" button so the upload can start.

Once the upload is finished the files will be properly overwritten and with that the restore of those can be considered as completed.

 

Step 2 Restore the Database

Now that you have restored the files it is time to restore the database. For this to happen first you will need to have a brand new database, username and password which you can receive following our Create cPanel Database tutorial.

Once you have a database name, username and a password you are ready to proceed with the restoration. Since you most probably have the .sql file you would like to restore prepared on your local computer you will need to access the newly created database via the phpMyAdmin application. It is accessible under the Databases section of your cPanel, thus you should be able to find it easily once you login into the cPanel service for your account.

There you will need to find the database name in the list of databases positioned vertically in the left section of the page you will be presented with. Once you access the database you will see no tables or data in the same and because of that you will need to simply click on the Import button. If you see some tables when you access the database please make sure that you are accessing the correct database as the one you have just created should not have any tables.

The Import button will redirect you to a new page where you will be able to find the Choose File button which you should use in order to point the .sql file you would like to be restored for your database from your local computer. Once this is achieved please click on the Go button so the file can be uploaded and then imported into the new database.

The process should be completed with a message indicating that the import was successful.

 

Step 3 Configure Wordpress with the Database you have restored

You are almost done! Now that you have both the files and the database restored the final thing you will need to do is to simply connect the restored version of your website with the restored database. This is quite easy for achieving and the only thing you will need to do is to edit the code of the wp-config.php file.

In order to edit the code of that file you have quite a lot of options but lets review the most easiest one. In your cPanel you will find a feature called File Manager. Click on the icon for this feature so you can access the folder where Wordpress is installed and whrere the wp-config.php file can be found. Once you see the file please right-click on the same and choose the Code Edit option.

Now that you see the code of the file you will need to search for the following line:



define('DB_NAME', 'example_database');

/** MySQL database username */
define('DB_USER', 'example_username');

/** MySQL database password */
define('DB_PASSWORD', 'someStrongP@SSw0rd!');



Here you should change the code appropriately and put the database name, username and password of the newly created database which you have imported the .sql backup file into. When you are ready simply press the Save Changes button located at the top right corner of the page so you can save the changes and finalize the whole restoration process.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to install WooCommerce

WooCommerce is a Wordpress plugin created and developed by WooThemes. The process of its...

How to Configure the General Options in WooCommerce

Every online Store yours will need some additional configuration before you can start selling...

How to Configure Product Options in WooCommerce

There are few options you will need to configure for your products when you are performing the...

How to Configure Accounts Options in WooCommerce

The customer's account when enabled and configured on your WooCommerce online Store will provide...

Configuring the Display Options in WooCommerce

With the default installation of WooCommerce, you are getting quite a lot of Shipping Methods...