To restore a WordPress backup, you put back your site’s files first, then import its database, which is the order WordPress’s own guide recommends. It only works if your backup has both parts, a copy is kept away from your host, and you’ve tried a restore at least once.
Key takeaways
- A full WordPress backup is two parts: the files (themes, plugins, uploads,
wp-config.php) and the database (posts, pages, comments, settings). - Keep at least three recent backups in different places, including at least one away from your host.
- Restore in this order: files first, then the database.
- Test a restore before you need one. Trying it is the only way to know it works.
- Your host’s backup is a useful extra, but it shouldn’t be your only copy.
What a WordPress backup actually contains
Get this part clear first, because a backup missing either half can’t fully rebuild your site.
WordPress keeps your site in two separate places:
- The files live in your WordPress folder on the web server: WordPress itself, your theme, your plugins, every image you’ve uploaded, plus two important settings files,
wp-config.phpand.htaccess. - The database lives in a separate database system (usually MySQL or MariaDB). It holds your posts, pages, comments and settings.
WordPress’s documentation is blunt about this: downloading your WordPress folder usually does not back up the database, because the database sits outside that folder. You need both to fully restore a typical site.
When you back up the database, you get an export file, usually ending in .sql, .gz or .bz2. Keep it in the same folder or zip as the matching files backup, so the two always travel together as one “backup set”. WordPress suggests backing up the database first, then the files.
If you only care about one folder, make it wp-content. That’s where your theme, plugins and uploads live. Keep wp-config.php with it, as that file holds your database connection details. The rest is mostly standard WordPress, which you can download again.
How many copies to keep, and where
WordPress’s backup guide recommends keeping at least 3 to 5 recent backups, stored in different places. Its example is one on your hosting server, one in cloud storage such as Google Drive or Dropbox, and one downloaded to your own computer. If one copy is lost or damaged, you still have another.
The UK’s National Cyber Security Centre (NCSC) gives similar advice to small organisations. It suggests keeping two backups, one online and one on a storage device, in case one is lost, stolen or fails. It also says to turn on 2-step verification for your online backup account. If you use a USB stick or external drive, don’t leave it plugged in: the NCSC warns that some viruses also affect devices connected to an infected computer.
How often? WordPress’s guidance is once a week for smaller sites with few posts, and daily for busy sites that change a lot. Always take one just before you update WordPress, a theme or a plugin.
Worked example (invented business): Priya runs a one-woman bookkeeping practice in Leicester. Her site has eight pages and a blog she adds to twice a month. A weekly backup suits her. She keeps the host’s automatic copies, a plugin backup that saves to her business Google Drive, and on the first Monday of each month she downloads the latest set to an external drive kept in a drawer. That gives her three copies in three places, and the drive is unplugged most of the time.
How to restore a WordPress backup
The exact buttons depend on how the backup was made. There are three common routes.
Route 1: your backup plugin’s restore option
If a backup plugin made the copy, use that same plugin to restore it, if it has a restore option. Follow that plugin’s own documentation, because each one works differently, and check whether it restores the files, the database or both.
Route 2: your host’s restore tool
WordPress’s guide notes that most hosts provide backup software. Check what yours offers, and whether a restore puts back the whole site or lets you pick files only or database only.
One cPanel quirk is worth knowing. WordPress’s database guide notes that cPanel’s “full backup” is for archive purposes and cannot be restored through cPanel. For a database copy you can restore yourself, it points to the “Download a MySQL Database Backup” option instead. Menu labels can vary by host and cPanel version.
Route 3: restore by hand (files, then database)
This is the route to understand even if you never use it, because it shows what any plugin or host tool is doing.
- Put the files back. Using an FTP or SFTP program (your host will give you the login details), upload your backed-up WordPress files to the site’s folder. Make sure
wp-contentandwp-config.phpgo back in place. - Import the database. Log in to phpMyAdmin from your hosting control panel. Select your WordPress database, open the Import tab, choose your backup file, make sure SQL is selected as the format, and click Go. WordPress’s guide warns that this replaces your current database with the backup, rolling it back to the moment the backup was taken. Anything newer, such as a recent order or comment, will be gone.
- Check
wp-config.php. If you’re restoring to a new host or a new database, the database name, username and password inwp-config.phpmust match the new ones. - Load the site and log in. Check the home page, a recent post, an image and your contact form.
If phpMyAdmin shows an error during import, WordPress suggests posting on the WordPress support forums with the exact message.
A simple test restore
You don’t need to break your live site to know a backup works. There are two levels.
A quick check you can do today
Open your latest backup set and look inside:
- Is there a database file (
.sql,.gzor similar)? If not, you only have half a backup. - Is there a
wp-contentfolder withuploadsinside, and do your recent images appear there? - Is
wp-config.phpthere? - Is the backup dated recently, and does the date match what your schedule promises?
This isn’t a restore, but it will catch a backup that quietly left something out.
The proper test: restore to a copy, not your live site
A real test means restoring the backup somewhere that isn’t your live site, then checking it works. Options include:
- a staging site, if your host includes one on your plan; or
- a fresh, temporary WordPress install on a subdomain, restored from your backup.
Then click around. Do pages load? Do images show? Can you log in? Is your newest post there?
WordPress’s guide also recommends backing up your automatic backups with a manual one now and then, “to guarantee that the process is working”. A test restore is the surest way to know.
Worked example (invented business): Tom runs a small joinery business near Bristol. His host’s dashboard says “daily backups: on”. When he finally opens a backup set, he finds the database export but no
uploadsfolder, because the plugin had been set to skip media to save space. Every project photo on his site was missing from the backup. He changes the setting, runs a fresh backup, and checks again. Nothing was lost, because he found it on a quiet day.
Is your host’s backup enough?
It’s a good safety net, but it shouldn’t be your only one. WordPress’s own backup guide says most hosts back up the whole server, but it can take time to get a copy back from them, so you should learn to back up and restore your own site.
A host-only backup can also let you down in ways that have nothing to do with the backup itself:
- It lives in the same account. If your hosting account is suspended, closed, or you lose the login, its backups may be out of reach too.
- You may not control how long copies are kept. Retention varies by host and plan. Check your host’s terms and note it down.
- It may never have been tested. Until you’ve restored one, you don’t know what’s in it.
- It may not be the moment you need. If a problem went unnoticed for a while, the copies you can still get may all contain it.
So keep the host’s backups, and add at least one copy you hold yourself, away from your host.
When to get help
Get your host’s support team involved if:
- a restore fails partway, or phpMyAdmin shows an error you don’t understand;
- you can’t find the database, or you aren’t sure which one is your site’s;
- the site loads but shows a “critical error” after a restore (our guide to fixing “There has been a critical error on this website” covers the usual causes);
- you’re restoring because the site was hacked. Restoring an infected copy just brings the problem back, so work out first when the hack started.
Your host can usually tell you what backups they hold for your account and how to request one. If you’ve never touched FTP or phpMyAdmin and the site earns you money, it’s reasonable to ask someone who has to do the first test restore while you watch.
What to do now
- Open your latest backup and check it has the database file,
wp-content(with uploads) andwp-config.php. - Make sure you have at least three copies in different places, including one away from your host.
- Pick a quiet day and test a restore to a staging site or temporary copy.
- Write down where your backups are and how to restore them, and keep that note somewhere other than the website.
For the rest of your regular checks, see our guide on how to look after a WordPress website yourself.
FAQ
Does backing up my WordPress files also back up the database?
Usually not. WordPress’s documentation explains that the database is stored separately from your WordPress folder, so you need to export it on its own and keep the file with your files backup.
Which order do I restore in, files or database?
WordPress recommends restoring the files first, then importing the database. If the database details changed, update wp-config.php to match.
How many WordPress backups should I keep?
WordPress suggests at least three to five recent backups, stored in different places, such as your host, a cloud storage account and your own computer.
Will restoring a backup delete anything?
Restoring the database replaces the current one with the backup. Anything added after that backup, such as new posts, comments or orders, will be lost unless you save it separately first.
Is my web host’s backup enough on its own?
It’s a useful extra, but it’s best not to rely on it alone. It sits in the same account as your site, retention varies by host, and you won’t know it works until you’ve restored it.
Sources
All opened on 22 November 2026 (Europe/London).
- WordPress.org, “Backups”: https://developer.wordpress.org/advanced-administration/security/backup/
- WordPress.org, “Backing Up Your Database”: https://developer.wordpress.org/advanced-administration/security/backup/database/
- WordPress.org, “Backing Up Your WordPress Files”: https://developer.wordpress.org/advanced-administration/security/backup/files/
- NCSC, “Backing up your data”: https://www.ncsc.gov.uk/collection/small-organisations-guide-to-cyber-security/backing-up-your-data
The markdesigns Team
Photo: Jessica Lewis on Pexels






