cpanel backup, restore files in cpanel, create and restore files in cpanel, How to create and restore website backups in Cpanel

How to create and restore website backups in Cpanel

Having a website that is up and running on a live server is one thing, also securing your files is another thing that you should keep your mind open about it.

Despite trusting the best and known companies for website hosting, you should have in mind anything can happen at any given time and note that your website files are not available

For this article, we shall cover the different ways or methods by which you can back up your website files in Cpanel and also how you can restore the website files back to the website server.

Mostly, all web hosting service providers do conduct backups at certain times which may not be enough for you since they might have a backup that is outdated and you had files that were added recently meaning you will lose the files that were not captured in the backup

A backup in the website server simply means having another copy of the same data in a different place other than the one provided in the web server such that you can refer back to the other data in case you lose the current data

How to back up website data

We are going to show you two methods of how you can back up your website data in the Cpanel

Compressing the website and database files

In this method, you will need to compress the website files and the database files then download and store them in your local computer storage or google drive

The advantage of this method ensures that you have a copy of your data even if the server collapses you will have a restore point

The disadvantage of this method is that if you want to have the updated files, you will need to keep repeating this method so that you can have the latest data in your separate storage

To compress the website and database files so that you can create a backup, follow these steps outlined below

To compress website files and create a backup

  • Login to your Cpanel

How to create and restore website backups in Cpanel

  • In the files, section click file manager
  • Once in the file manager section, to create a copy of the whole website data, right-click public_html and click compress

How to create and restore website backups in Cpanel

  • Leave the other screen as it is such that it will create a zipped folder called public_html.zip. you can also change the name of the compressed file and also the type of compression
  • Click compress files and let the process happen until it is done
  • Once the compression is done, click close on the modal that is on the screen

At this point, a compressed file will be created at the same level as the public_html folder

To download the compressed or zipped folder,

  • Right-click on the compressed folder and click download

How to create and restore website backups in Cpanel

  • Select the location you want to save the compressed file. Also, you can change the name of the file such that you name it in a way you can remember easily
  • Wait for the download to complete

So far we have created a backup for the website files from the Cpanel

Next step we shall now create a backup of the database files from the Cpanel and store it in a local storage

  • Visit the homepage of the cpanel (the screen immediately after logging in)
  • Navigate to the databases section
  • Click to open PHPMyAdmin

How to create and restore website backups in Cpanel

  • In the PHPMyAdmin section, navigate to the databases list in the left sidebar
  • Click the database you want to backup so that you can open it
  • In the selected database section, click Export at the top navigation

How to create and restore website backups in Cpanel

  • In the next screen leave the options as default and click go
  • Select the location you want to save the file on the computer and also you can change the name if need be and click save
  • Wait for the download to complete

At this point, we have created a backup for both the website files and also the database files which are now stored in the local storage in your computer. You can decide either to now save them in another location including google drive or not

How to restore backup files from local storage

To restore website files from your computer storage to Cpanel,

  • Login to the Cpanel and navigate to the files section
  • Click on file manager to open it
  • Once you have opened the file manager, you are going to perform the restore at this location
  • Click on upload

How to create and restore website backups in Cpanel

  • On the screen that opens, you can either click the select file and browse the file from your computer or drag and drop the file from your computer
  • Once you use any of the above methods above, wait for the progress of the upload to move up to 100% and the progress bar to turn green

How to create and restore website backups in Cpanel

  • Click go back home
  • On the uploaded compressed file, right-click on it and click unzip (note that for this step you must not have other files existing on the server else it will overwrite the current ones)
  • Click extract and then wait for the process to complete

To restore database files back to the Cpanel,

  • Navigate to the database section and click PHPMyAdmin
  • Select the database you want to restore data to and click to open it. If you do not have a database, follow this article and learn  how to create a database in Cpanel
  • Once in the selected database section, click import

How to create and restore website backups in Cpanel

In the screen that opens up, you can either use two ways to restore the database file,

First, you can click the select files button and you will be provided with an option to select the database file that you want to restore back from your local storage. Navigate to where the file is and click open

Next, you have an option to drag and drop the file from your local storage to the screen provided

  • Wait for the upload to finish.
  • Once it is done, your database file with the data will be restored back as it was.

With that, you will have achieved how to restore website files and database files from local storage in your computer to the Cpanel

We have covered the first method of how to create and restore website backups in Cpanel by compressing and exporting the files from the Cpanel and storing them in your computer location.

In the next article, we shall cover the other method of creating and restoring backups using the options and tools provided by the hosting service providers in the Cpanel