this guide, we will show you exactly how to restore a website backup using “FileZilla” and “phpMyAdmin.”
- Creating an FTP Account
To create an FTP account, log in to cPanel and find the “Files” -> “FTP Accounts” section.
Next, create a new account by entering the username, domain, and password for the account.
Important! Make sure to delete the current path in the “Directory” field and leave it empty. This way, the default path upon logging into the account will be /home/ds.
After creating the account, find it on the list and click “Configure FTP Client.” After clicking, “Manual Settings” will be displayed, which will be needed later to establish the connection.
2. FTP Connection with FileZilla
FileZilla is a program that allows for easy transfer of files between your computer and a server on the internet, and vice versa. It is primarily used for uploading websites to a server or downloading files, such as a website, from a server. This application is free and can be safely downloaded from (https://filezilla-project.org/).
After downloading, you need to connect to the previously created FTP account.
All data should be taken from the “Manual Settings” mentioned earlier. After entering the correct password and clicking “Quickconnect,” you should be connected to the server. You might see a certificate warning, but simply accept the connection with the current settings.
Once connected, all directories on the account located at /home/ds should be displayed.
3. Restoring the website backup.
On the local computer, we placed the WordPress website backup in the “website backup” directory. To upload this backup, first ensure that the domain directory (document root) on the hosting server is empty. This can be done in cPanel -> “Domains“
The document root specifies which directory the files for a given domain are loaded from. This is the directory where you need to upload your website. After clicking on the path indicated in the screenshot, you will be redirected directly to the website’s directory in the “File Manager“.
As you can see, the directory in the File Manager is empty, so you can now start uploading your website from the local computer. To do this, navigate to your domain’s directory on the FileZilla side.
On the left side is your local computer, and on the right side is the directory of your domain on the hosting server. To transfer all the directories and files of your website, select all of them, then right-click and choose “Upload”.
Once the file upload to the server starts, wait for the process to complete. You can also monitor the upload status. Files are added to the transfer queue, from which they are sent to the server. After the upload is complete, files will be marked as successful or failed transfers.
After the files are uploaded, a “Transfers Complete” prompt should appear. You can now navigate to your domain’s directory through the “File Manager,” and all directories and files of your website should be visible.
4. Uploading the database backup for our website
For WordPress, to ensure the website functions correctly, you also need to upload the database.
First, create a database in cPanel -> “Manage My Databases.“
The detailed process for creating a database is described in our separate guide (click here).
After creating the database, go to cPanel -> “phpMyAdmin.”
Select the desired database by clicking on its name, in this case, “ds_wordpress“. Then click “Import“.
Select the .sql file from your local computer, and then click “Import.”
After the import is complete, you should receive the above message.
Now, after importing the website, you need to change the database information in the configuration file. For WordPress, this is the wp-config.php file. To do this, navigate to your domain’s directory, for example, through the File Manager. Then locate the file, right-click on it, and select “Edit“.
After opening the file, you need to edit the following three lines:
- In the DB_NAME field, enter the name of your database that you provided when creating it. In our case, ‘ds_wordpress’.
- In the DB_USER field, enter the database user’s name, which you also created. In our case, ‘ds_client’.
- In the DB_PASSWORD field, enter the password assigned to your user. In our case, ‘#@!examplepassword’.
After making the changes, save the file.
In summary, after completing these steps, the website backup will be uploaded to the server, and the website should function correctly.
Also, check out our guide on creating such a backup.
- RoundCube – Webmail in Your Browser - September 4, 2024
- PrestaShop 8 – Configuring Email Sending with SMTP Authentication - September 4, 2024
- Joomla 3 – Configuring Email Sending with SMTP Authentication - September 2, 2024