Restoring website files and a database manually

Put back individual files, folders or a database from a backup without overwriting your whole account.

Guide2 min readLast updated
On this page
  1. Restoring files
  2. Restoring a database
  3. Matching files and database
  4. After restoring
  5. If it doesn’t work

Often you only need part of a backup: one deleted folder, or yesterday’s database.

Restoring files

  1. On your computer, open the backup archive and find the files you need. - In a DirectAdmin backup, website files are under a domains/yourdomain.co.uk/public_html path inside the archive.
  2. Compress just those files or folders into a zip.
  3. Upload the zip to the right folder and extract it, allowing it to overwrite. How to upload and extract a zip file
  4. Delete the zip.

Restoring a database

  1. Find the database file in the backup (a .sql or compressed .sql.gz file, named after the database).
  2. Export the current database first, in case you need anything from it. How to export a database (backup with phpMyAdmin)
  3. In phpMyAdmin, select the database, select all tables and drop them — or import into a new empty database and switch the application’s configuration to it, which is safer.
  4. Import the backup file. How to import a database with phpMyAdmin

Matching files and database

For applications like WordPress, restore files and database from the same backup. Mixing a new database with old plugin files, or the reverse, can break the site.

After restoring

  • Clear any page cache
  • Reset permalinks in WordPress (Settings → Permalinks → Save)
  • Test logins and forms

Prefer to follow along?

If it doesn’t work

These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going