DrivenHost

Knowledgebase / cPanel & hosting

How do I restore files from a backup?

Put your website files, a single folder or a database back in place from a cPanel backup using Backup Wizard, File Manager and phpMyAdmin.

A bad plugin update, an overwritten theme file or a folder deleted by mistake can all be fixed from a backup. This guide shows you how to restore your files, a single folder or a database yourself from cPanel, using a backup archive you downloaded earlier.

You need your cPanel login and the backup file. If you do not have a backup saved locally, see how to download a full backup first, and note that it has to be generated before the problem happens to be any use afterwards.

One thing to know before you start: restoring an entire account at once (every file, mailbox and database together) is done from the server side rather than from cPanel, so if that is what you need, contact support instead of working through the steps below.

Restore your files from a backup archive

  1. Log in to cPanel and open Backup Wizard in the Files section. The plain Backup tool has the same options if you prefer it.
  2. Choose Restore, then choose Home Directory.
  3. Click Choose File and select the home directory backup you downloaded. It is usually named something like backup-example.com-date_user.tar.gz.
  4. Click Upload. Larger archives take a while, so leave the tab open until it finishes.

The restore writes the files from the archive back into your account, replacing current files that have the same name and path. It does not delete files that were created after the backup was taken, so anything added since then stays where it is.

Restore one file or folder instead

If only one file or folder is broken, putting back the whole home directory is more disruption than you need.

  1. On your own computer, open the backup archive and find the file or folder you want. Website files sit under homedir/public_html.
  2. In cPanel, open File Manager and navigate to the folder the file belongs in.
  3. Click Upload, select the file, then go back to the folder to confirm it is there.
  4. If you would rather upload a zipped folder, upload the .zip, then select it and use the Extract option in File Manager.

Check file permissions afterwards if the page still misbehaves, since an uploaded file does not always match the permissions of the one it replaced.

Restore a database

Database content (posts, orders, settings) is stored separately from your files, so a site rolled back halfway can look stranger than one left alone.

  1. Open Backup Wizard, choose Restore, then choose MySQL Databases, and upload the database backup file.
  2. As an alternative, open phpMyAdmin, select the database in the left panel, click Import, choose your .sql file and click Import at the bottom.
  3. If the database does not exist yet, create it first (see creating a MySQL database) and check that your site's configuration file points at the right database name, user and password.

If it didn't work

  • The upload failed or timed out. Large archives can hit upload limits in the browser. Extract what you need on your computer and put it back with File Manager, or ask support to restore the archive from the server side.
  • The restore box rejected your file. The home directory restore expects a home directory backup, not a full account archive or a loose .zip of your site. Pick the matching file type for the option you are using.
  • The site looks unchanged. Clear your browser cache and any caching plugin or page cache, then reload. If you restored a database over a different one, confirm the login details in your site's configuration file still match.

If you are not sure which backup to use, or the restore did not take, open a ticket with support and we can take a look from the server side.

More in cPanel & hosting

Stuck partway through? Support is answered by the engineers who run the servers, around the clock.

← All guides

No sales team. No scripts.

Tell us what you're running.
We'll tell you what it needs.

Migrations are free, quotes are written, and the engineer who replies is on the team that will run your server.