Skip to content
Maintenance

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.

By WP24×7 engineers4 min readPublished November 29, 2026Updated November 29, 2026

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

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:

PartWhat it holds
The databasePosts, pages, settings, users, comments, WooCommerce orders, and the configuration of most plugins
The filesThe 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
Database and files, taken close together in time

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 typeSuggested frequency
Brochure site that changes monthlyDaily or weekly is usually enough
Blog or news siteDaily
Store, membership site or forumFrequent 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.

  1. Pick a backup

    , and note which date and files it contains.

  2. Create a safe destination

    a staging site from your host, a local environment, or a spare subdomain that is blocked from search engines.

  3. 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.php for the new database.

  4. 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.

  5. 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.

  6. 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.

  7. Check that the data is complete

    the latest post, the latest order, the media library.

  8. 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.

  9. 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?

ProblemNote
Backups silently failingLow disk space, a time-out or an expired storage key; check the job's report
Partial backupsLarge uploads folders skipped because of a size limit
Database too bigBeyond the restore tool's limits; use command-line imports
Plugin data missingA plugin stores files outside wp-content
Restoring over a newer siteLoses work done since the backup
Backup includes the infectionSee 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.

Not sure your backups would restore?

A person can test one with you.

FAQ

Questions people ask

13 answers. Can't find yours? Ask an engineer.

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 answer
Is 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 answer
How 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 answer
Why 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 answer
Where 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 answer
How 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 answer
Why 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 answer
Why 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 answer
How 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 answer
What 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 answer
What 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 answer
Can 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 answer
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.

Link to this answer

Keep reading

Want an engineer on it?

Tell us what is wrong in plain words. A person reads it, today.