Tips & Tricks

How to Restore Your Website from a cPanel Backup

by dotCanada Team
How to Restore Your Website from a cPanel Backup

Most people think about backups when something goes wrong. At that point, the learning curve is happening at exactly the wrong time. Understanding how cPanel's backup and restore system works before you need it means that if something does go wrong - a botched update, a hacked site, an accidental deletion - you can recover quickly and calmly.

Types of cPanel Backups

cPanel produces two categories of backup.

Full backups contain everything: your home directory (all files, including your website files), your databases, your email accounts and filters, and your cPanel configuration. A full backup is a complete snapshot of your hosting account at a point in time.

Partial backups let you back up or restore individual components: just your home directory, just a specific database, or just your email. These are useful when you want to restore one thing without touching everything else.

Finding Backups in cPanel

Log into cPanel and look for the Backup or Backup Wizard section. The Wizard guides you through both creating and restoring backups with a step-by-step interface - it is the easier starting point if you have not done this before.

Under Backup Wizard > Restore, you will see options to restore a home directory, a MySQL database, or email forwarders and filters. Each option prompts you to upload the corresponding backup file from your computer.

Note that full cPanel backups can only be restored by your hosting provider - you cannot restore a full backup file through the cPanel interface yourself. You can download a full backup for safekeeping, but restoration requires opening a support ticket. Partial backups (home directory, databases, email) are fully self-serviceable through the Backup Wizard.

Restoring Your Home Directory

If you need to restore your website files - perhaps because you deleted something, overwrote files during an update, or need to roll back a theme change - restore the home directory backup.

In Backup Wizard, choose Restore > Home Directory, then upload your .tar.gz backup file. cPanel will extract it and overwrite the current files with the backup contents. If you are restoring a WordPress site, this restores all your WordPress files including themes, plugins, and the wp-config.php file - but not the database.

Restoring a Database

WordPress (and most modern web applications) stores its content - posts, pages, settings, user accounts - in a MySQL database, not in files. Restoring files without also restoring the database brings back an empty or mismatched installation.

To restore a database through cPanel, go to Backup Wizard > Restore > MySQL Database and upload your .sql.gz or .sql file. cPanel will import it into the database you specify.

If you only have a raw .sql file (a common situation when you exported a backup manually), you can import it through phpMyAdmin instead. In cPanel, open phpMyAdmin, select the target database from the left sidebar, click the Import tab, upload the file, and run the import.

After restoring both files and database, confirm that wp-config.php has the correct database name, username, and password for your current hosting environment. If you are restoring to a different hosting account, these values may have changed.

Restoring a WordPress Site After a Hack

A hacked WordPress site requires a more careful approach than a simple file restore. Malicious code can be injected into database entries, not just files - so restoring only the files may leave the site still compromised.

The recommended process: restore from a clean backup that predates the compromise, then immediately update WordPress core, all plugins, and all themes to their current versions. Change your WordPress admin password, cPanel password, and database password. Review which plugins were installed at the time of the compromise - an outdated or abandoned plugin is often the entry point.

If you cannot identify a clean pre-hack backup, start with a clean WordPress installation, import only your database after scanning it for suspicious content (look for <script> injections and eval(base64_decode strings), and reinstall your theme and plugins fresh.

Restoring Email

Email can be restored through Backup Wizard > Restore > Email Forwarders or Email Filters. Note that this restores forwarding rules and filters, not the email messages themselves. Individual email messages are stored in your mail directory and are included in a home directory backup.

When to Contact Hosting Support

If your backups are missing, corrupted, or the restore process is returning errors, contact your hosting provider's support team before making further changes. Many hosts, including dotCanada, retain server-level snapshots that may be accessible even when cPanel-level backups are unavailable. Providing as much detail as possible - when the problem occurred, what you were doing, what error messages appeared - helps support locate the right backup quickly.

The most important habit is testing your restore process at least once before you need it. Doing a trial restore to a staging environment confirms your backups are valid and that you know the steps. It is time well spent.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today