WordPress backups: what to back up and test a restore
What a complete WordPress backup contains, where to store it, how often to run it and a step-by-step way to test a restore before you need one.
At a glance
A WordPress backup only counts if you can restore it. Back up the database and the wp-content folder, plus wp-config.php, keep copies off the server and rehearse a restore on a copy before you ever need one. This guide covers what to include, where to store backups, how often to run them, a nine-step restore test and what commonly goes wrong.
Updated November 29, 2026
- For owners and administrators of WordPress sites
- Minimum database, wp-content folder and wp-config.php
- Storage at least one copy off the server, with its own login
- Frequency weekly or daily for brochure sites; frequent database backups for stores
- Test restore on a copy, block email and payments, time it
- Repeat every quarter and after changing host or tool
- Help backup and restore service
On this page
A backup only counts if you can restore it. Back up the database and the `wp-content` folder, keep copies off the server, and rehearse a restore before you ever need one.
What does a WordPress site consist of?
Two things carry your site:
| Part | What it holds |
|---|---|
| The database | Posts, pages, settings, users, comments, WooCommerce orders, and the configuration of most plugins |
| The files | The wp-content folder (themes, plugins, uploads, some plugin data), wp-config.php in the root, any custom .htaccess or server config, and WordPress core, which can be reinstalled |
A "files only" backup misses your content. A "database only" backup misses your media and custom code. You need both, taken close together in time.
What else is worth backing up?
- `wp-config.php`, which holds database credentials and keys. Store it securely, since it contains secrets.
- Server-level settings your host does not manage for you: cron jobs, custom PHP settings, and rewrite rules.
- DNS records, as a text copy.
- Plugin licence keys and your list of installed plugins and versions.
- Anything outside WordPress that the site depends on: a separate mail service, a CRM, or a payment account configuration.
- Staging or development copies only if they hold work not elsewhere.
Where should backups be stored?
Follow a simple rule: keep at least one copy somewhere that an attack or failure on your server cannot reach.
- Not only on the same server. If the server is hacked, deleted or fails, backups stored there go with it.
- In another provider's storage, such as cloud object storage or a separate backup service, with its own login.
- With restricted access. Backup archives contain user data and
wp-config.php. Protect them with strong credentials and, where offered, encryption. - With a retention period that lets you go back before a problem began. A hack found three weeks later is not helped by a three-day history.
A host's built-in backups are useful, but check whether you can download them and how long they are kept, and treat an independent copy as a second line.
How often should I back up?
Match the frequency to how much you could stand to lose.
| Site type | Suggested frequency |
|---|---|
| Brochure site that changes monthly | Daily or weekly is usually enough |
| Blog or news site | Daily |
| Store, membership site or forum | Frequent or real-time database backups; plan to reconcile orders placed since the backup with your payment provider's records |
Take an extra backup immediately before updates, migrations and any big change.
How do I test a restore?
Do this on a copy, never on the live site.
- Pick a backup
, and note which date and files it contains.
- Create a safe destination
a staging site from your host, a local environment, or a spare subdomain that is blocked from search engines.
- Restore the files and the database
with your backup tool's restore option, or by hand: upload the files, import the database, and edit
wp-config.phpfor the new database. - Fix the site address
if the URL differs. A search-and-replace tool that understands serialized data (for example WP-CLI's
search-replace) should be used, not a plain text replace, since that can break settings. - Block the copy from search engines and from sending email or processing payments
A restored store that charges customers or sends order emails is a real hazard.
- Check it works
log in, load the home page, open several posts, check images, test a form, and for a store check products and a test order flow in test mode.
- Check that the data is complete
the latest post, the latest order, the media library.
- Time it
Note how long the restore took and what went wrong. That is your recovery time, and it is better to learn it now.
- Write the steps down
, with who does what, so anyone can follow them under pressure.
Repeat this test every quarter and after changing hosts or backup tools.
What commonly goes wrong?
| Problem | Note |
|---|---|
| Backups silently failing | Low disk space, a time-out or an expired storage key; check the job's report |
| Partial backups | Large uploads folders skipped because of a size limit |
| Database too big | Beyond the restore tool's limits; use command-line imports |
| Plugin data missing | A plugin stores files outside wp-content |
| Restoring over a newer site | Loses work done since the backup |
| Backup includes the infection | See what to do in the first hour after a hack |
What does a good setup look like?
An automatic schedule, an off-site copy with sensible retention, an alert if a backup fails, a pre-update snapshot, and a restore test on the calendar. Our backup and restore service sets this up and proves it, our maintenance service runs it, and if you need a restore now, emergency support can help.
We set it up and prove it.
Read more02Maintenance serviceRuns it for you.
Read more03Emergency supportIf you need a restore now.
Read moreA person can test one with you.
What is the minimum I must back up?
The database and the wp-content folder, plus wp-config.php. Core files can be reinstalled, but keeping the full site makes restores simpler.
Link to this answerIs my host's backup enough?
It may help, but check how long it is kept, whether you can download it, and whether it sits on the same infrastructure as the site. Keep an independent copy as well.
Link to this answerHow often should a WooCommerce store back up?
More often than a brochure site, because orders change the database constantly. Ask about real-time or frequent database backups, and test how restoring would affect new orders.
Link to this answerWhy are both files and database needed?
A files-only backup misses your content, and a database-only backup misses your media and custom code. You need both, taken close together in time.
Link to this answerWhere should backups be stored?
Keep at least one copy somewhere an attack or failure on your server cannot reach, such as another provider's storage with its own login, protected by strong credentials and, where offered, encryption.
Link to this answerHow long should backups be kept?
Long enough to go back before a problem began. A hack found three weeks later is not helped by a three-day history. Check how long your host keeps its own backups and whether you can download them.
Link to this answerWhy is wp-config.php sensitive?
It holds database credentials and keys. Back it up, but store it securely because the archive then contains secrets.
Link to this answerWhy must I block a restored copy from email and payments?
A restored store that charges customers or sends order emails is a real hazard. Block the copy from search engines and from sending email or processing payments before testing.
Link to this answerHow do I fix the site address on a restored copy?
Use a search-and-replace tool that understands serialized data, such as WP-CLI search-replace, not a plain text replace, which can break settings.
Link to this answerWhat commonly goes wrong with backups?
Silent failures from low disk space, time-outs or an expired storage key, partial backups from size limits, databases too big for the restore tool, plugin data stored outside wp-content and restoring over a newer site.
Link to this answerWhat does a restore mean for a busy store?
You may lose orders placed since the backup, so you need a plan to reconcile them with your payment provider's records. Ask about real-time or frequent database backups.
Link to this answerCan a backup contain the infection?
Yes, if the hack happened before the backup. Check when the infection began before restoring, and see the first-hour guide after a hack.
Link to this answerWhat does a good setup look like?
An automatic schedule, an off-site copy with sensible retention, an alert if a backup fails, a pre-update snapshot and a restore test on the calendar.
Link to this answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.