How to restore a website from a backup?
Restoring a website is a fairly common process, and this can be triggered by certain issues, such as accidental deletion of an important file, incorrectly made modifications, critical errors, or cyberattacks.
Restoring the website from cPanel
- Connect to cPanel and access Backup from the Files section.
- In the Restore a Home Directory Backup section, click Choose File and select the website's file backup. Finally, click Upload and wait for the file upload process to complete.
- In the Restore a Database Backup section, click Choose File and select the database file (usually in .sql format). Confirm by clicking the Upload button to replace the current database with the selected backup.
Manual restoration of files and database
If, due to lack of access to the previous method, or for reasons of principle or convenience, it is also possible to manually restore the website using FTP and phpMyAdmin.
- Connect to the server via an FTP client, such as FileZilla, and delete corrupted or unnecessary files from the website's root directory, public_html.
- Upload the backup files (from your personal computer) to the same directory.
- Access cPanel and open phpMyAdmin.
- Select the existing database and delete all tables from it using the Drop button.
- Import the database from backup in .sql format using the Import button.
- Confirm the backup upload by clicking the Go button.
Restoring via a WordPress backup plugin
If a CMS like WordPress is used and a backup has been performed using a plugin (e.g., UpdraftPlus, BackupBuddy), it is possible to restore the website directly from its interface.
- Connect to the WordPress administration panel (https://example.com/wp-admin).
- Navigate to Settings and then to UpdraftPlus Backups.
- In the Backup/Restore section, the desired backup copy can be found.
- Click on Restore and select the files, database to be restored.
- Complete the restoration process by following the steps indicated by the plugin.