For fast and automatic backup restoration, you can always restore the Pimcore backups (files and database) from Softaculous's Backups and Restore section.

In this tutorial, we shall show you the manual way on how you can restore both files and database.

Section 1: Restore Files and Folders

You can use cPanel File Manager to zip up all the folder containing the Pimcore files and folders.

Here's the instruction on how to compress your files and folders

Once you're done with the compression, you can download the zip file into your computer using Filezilla FTP.

Section 2: Restore the MySQL Database

Now that you have uploaded all the files and folders it is time to also import the database backup you have into a new database and then reconfigure your Pimcore website with the new database.

Let’s begin with the importing process. In order to import the .sql file you have as backup on your local computer you will need to create a new database and add a user to the same. This can be easily achieved by using the MySQL Database Wizard feature of the cPanel service as there you will be able to create a new database and to add a new user to the same with few clicks.

Instructions on how to use MySQL Database Wizard to create new MySQL database and username can be found here.

Assuming that you have the database name and username at hand (based on the tutorial above) it is time to import the .sql file. For this purpose you will need to access the phpMyAdmin application via your cPanel account.

Then you will need to find the newly created database into the database list presented in the left vertical menu. In our case the database name which we will use is joshipro_pim2 . Once you click on the database name you will notice that there are no tables in your new database which is normal and you should not worry about it.

Then you will need to choose the .sql file from your local computer using the Choose File button and once this is done you will need to simply press the Go button on the same page.

Alright! You have successfully imported the database and the only thing left is to configure your Pimcore application to use that new database.

Section 3: Link the Database and Files
You will need to edit the configuration file of the application with the credentials for the new database. You can find this configuration details at /website/var/config. Using FileZilla FTP, click on system.xml file and right click on the file and select Edit.

You will notice the following code as highlighted:

You need to edit all information as highlighted above especially the username, password and dbname.

This detail is the same detail when you create new MySQL username and database using MySQL Wizard.

Once the edit is finished please save that file using the Save Changes button located in the top right corner and refresh your website so you can ensure that the restore is successful.

If you encounter error while importing the MySQL, kindly inform our support team to perform the SQL import via SSH
Was this article helpful?
Thank you!