How to back up a WordPress site (and which plugins to use)

How to back up a WordPress site (and which plugins to use)

To back up a WordPress site, you need two things saved together: the site’s files (themes, plugins, uploads and wp-config.php) and its database (posts, pages, comments and settings). The easiest way is a backup plugin that runs on a schedule and sends copies off your server, alongside your host’s own backups, and then a test restore so you know the backups actually work.

This guide covers what to back up, how many copies to keep and where, host backups versus plugins, six backup plugins we checked on WordPress.org, and how to restore and test a backup before you need one.

What do you need to back up on a WordPress site?

A WordPress site lives in two places, and a usable backup has both. The official WordPress backup documentation says it plainly: there are two parts to backing up a site, the database and the files, and you need both to fully restore a typical WordPress site.

The files

These sit in your WordPress folder on the web server:

  • wp-content: your themes, plugins and the uploads folder with every image and file you have added. This is the part you cannot download again from anywhere else.
  • wp-config.php: holds your database connection details and other settings.
  • .htaccess (on Apache servers): rewrite rules for permalinks, plus anything your host or a plugin added.
  • WordPress core files: wp-admin, wp-includes and the files in the root. You can replace these from a fresh WordPress download, so they matter less, but most plugins include them anyway.

The database

The database stores the content you typed: posts, pages, comments, users, menus, widget settings and plugin settings. It lives in a separate system (usually MySQL or MariaDB), not in your WordPress folder.

This trips up a lot of people. The WordPress docs point out that downloading your WordPress folder does not back up the database, because the database lives outside it. If you copy your files by FTP and stop there, you have your images and theme but none of your posts.

Does a backup need both at the same time?

Yes, ideally. A database from Monday and uploads from Friday can leave posts pointing at images that do not exist, or images with no post. Take the files and database in the same run, and keep them together as one backup set. Every plugin in this guide does that for a full backup.

What is the 3-2-1 backup rule?

The 3-2-1 rule is a simple way to decide how many copies to keep and where. A US-CERT paper on data backup options, published through CISA, describes it like this:

  • 3 copies of any important file: the original and two backups.
  • 2 different types of storage, so one kind of failure cannot destroy everything.
  • 1 copy offsite, away from where the original lives.

What does 3-2-1 look like for a WordPress blog?

Your live site is copy number one. For the other two, a realistic setup for a small blog is:

  1. Your host’s backups, kept on the host’s systems.
  2. A plugin backup sent to cloud storage you control, such as Google Drive, Dropbox or Amazon S3.
  3. Optional extra: download a full backup to your own computer once a month.

The official WordPress docs give similar advice: keep at least 3 to 5 recent backups, with copies in different locations, for example one on the hosting server, one in cloud storage and one on your local computer.

Diagram of the 3-2-1 backup rule for WordPress: the site's files and database go through a backup plugin and the host's backups into three copies (the live site, the host backup and an off-site copy in Google Drive, Dropbox or S3, plus an optional download to your computer), followed by a test restore on staging, a subdomain or a local install
Back up files and database together, keep three copies with one off-site, then prove it works with a test restore.

Why is a backup on the same server not enough?

Because the things that destroy a site often destroy everything on the same server too. A failed disk, a hacked hosting account, a cancelled plan or a billing problem can take your site and any backups stored next to it. Several plugins can keep backups in a folder on your own server (BackWPup and Duplicator both list local storage as an option). That copy is handy for quick rollbacks after a bad update, but it does not count as your offsite copy.

How often should you back up WordPress?

Back up as often as you would hate to redo the work in between. The WordPress docs suggest weekly backups for smaller sites with fewer posts and daily backups for busy sites with a lot of posts, and they say to back up the database before every upgrade.

A sensible schedule for most blogs:

  • Database: daily. It is small, and it holds your newest posts and comments.
  • Files: weekly, or daily if you upload images most days.
  • Before any big change: a manual backup before updating WordPress, switching themes, or installing a plugin that changes a lot of settings.
  • Retention: keep at least a few weeks of backups, not just the latest one. If malware got in ten days ago, last night’s backup has the malware too.

For example, a food blogger who publishes twice a week and gets a steady stream of comments could run a daily database backup and a weekly full backup, keep 14 of each in Google Drive, and take a manual backup before each WordPress update.

Are host backups enough, or do you need a plugin?

Use both. Host backups and plugin backups protect against different problems.

The WordPress docs note that most hosts provide software to back up your site, and that even though most hosts back up the whole server, it is better to back up your own files too. Host backups are usually automatic and cost you no effort. Their weak spot is that they live with the host. If your account is suspended, the host has a serious outage, or you want to move to a different host, those backups may not help you.

Questions to ask your host about backups

  • How often are backups taken, and how many days are kept?
  • Do they include both files and the database?
  • Can I restore a backup myself from the control panel, or do I need to open a support ticket?
  • Can I download a backup to keep my own copy?
  • Where are backups stored: on the same server, or somewhere separate?

One detail from the WordPress database docs is worth knowing if your host uses cPanel: the docs say not to use cPanel’s “full backup” for this, because those are strictly for archival purposes and cannot be restored through cPanel. Use the database backup download instead, or a plugin.

What a plugin adds

  • Copies you control, sent to your own cloud storage account.
  • Your own schedule and retention, not whatever the host decided.
  • Restores from the WordPress dashboard, often one component at a time (just the database, just the plugins).
  • Portability. Most backup plugins double as migration tools, so the same backup can move your site to a new host.

Which WordPress backup plugins are worth using?

We looked up each of these on the WordPress.org plugin directory API. Active install counts are WordPress.org’s rounded figures and change over time; each listing also shows the WordPress version it was tested up to. Features below come from each plugin’s own description on WordPress.org; free versions change, so read the current listing before you choose.

Plugin Active installs Scheduled backups in free version
All-in-One WP Migration and Backup 5,000,000+ No (paid extension)
UpdraftPlus 4,000,000+ Yes
Duplicator 1,000,000+ No (Pro feature)
WPvivid Backup, Migration and Staging 900,000+ Yes
BackWPup 400,000+ Yes
Jetpack VaultPress Backup 20,000+ Paid plan required

UpdraftPlus

UpdraftPlus is the plugin most new blogs should try first. The free version can back up manually or on a schedule (every 2, 4, 8 or 12 hours, daily, weekly, fortnightly or monthly) and send backups to Dropbox, Google Drive, Amazon S3 or compatible storage, Rackspace Cloud, FTP, DreamObjects, OpenStack Swift or email. Restoring lets you pick which parts to restore, such as plugins, themes or the database.

The paid version adds automatic backups before updates, incremental backups, more storage destinations (including OneDrive, SFTP and Backblaze B2) and sending to more than one destination at once. It is the plugin our WordPress blog setup guide uses, so if you followed that guide you may already have it.

BackWPup

BackWPup backs up the full database and all files, or just one of the two. Schedules can run hourly, daily, weekly or monthly. Its useful free feature is that one backup job can store the same backup in several destinations at once: the free version supports your own server, Dropbox, FTP, Microsoft Azure, Amazon S3 and compatible storage, SugarSync and Rackspace Cloud Files. That makes a 3-2-1 setup easy to build from a single job. It also keeps logs and a backup history, so you can see whether each run succeeded.

Duplicator

Duplicator started as a migration tool and is still strongest at that. It packages your files and database into a single archive that you can install on a new server, and its description says the free version includes backups of any size, encrypted archives, one-click restore and its own Duplicator Cloud storage. Scheduled backups and storage such as Dropbox, Google Drive and Amazon S3 are listed as Pro features. Use it when you are moving hosts or cloning a site; pair it with a scheduled plugin or host backups for day-to-day protection.

All-in-One WP Migration and Backup

All-in-One WP Migration has the most installs on this list, mostly because it makes moving a site simple: export to a single .wpress file, then import it on the new site. Its WordPress.org page is unusually clear about the limits of the free version. You can back up and export sites of any size, but to restore for free you import the backup file on the Import screen, and your host’s upload limit decides how large that file can be. One-click restore from the Backups page, scheduled backups and cloud destinations are paid extensions.

WPvivid Backup, Migration and Staging

WPvivid offers a lot in its free version: full, files-only or database-only backups, schedules (every 12 hours, daily, weekly, fortnightly or monthly), remote storage to Dropbox, Google Drive, Microsoft OneDrive, Amazon S3, DigitalOcean Spaces, FTP and SFTP, one-click restore, and migration to a new domain. It can also create a staging site in a subdirectory of your live site, which is handy for testing a restore or an update without touching the real thing.

Jetpack VaultPress Backup

Jetpack VaultPress Backup comes from the team behind Jetpack and WordPress.com. It stores backups in the cloud rather than on your server, saves changes in real time, and offers one-click restores, including when your site is offline. The catch is cost: its WordPress.org page says you need a paid Jetpack plan that includes Backup. It suits sites where losing even a day of changes would hurt, such as an online store.

Which one should you pick?

  • A new blog that wants free scheduled backups to the cloud: UpdraftPlus, or WPvivid if you also want a staging site.
  • You want one job saving to several places: BackWPup.
  • You are moving to a new host: Duplicator or All-in-One WP Migration.
  • You run a store or a busy site and can pay: a real-time service such as Jetpack VaultPress Backup.

Install one scheduled backup plugin, not three. Two backup plugins running at the same time double the load on your server and can fill your disk. If you are new to adding plugins, our guide on how to install a WordPress plugin covers the three ways to do it, and our list of essential WordPress plugins shows where a backup plugin fits with the rest.

How do you set up automatic WordPress backups with a plugin?

The screens differ between plugins, but the steps are the same. Here is the general order, using a plugin with free scheduling such as UpdraftPlus:

  1. Install and activate the plugin from Plugins, Add New Plugin.
  2. Connect remote storage. Pick Google Drive, Dropbox, S3 or similar and authorise the connection. Use a storage account that is separate from your hosting login.
  3. Set the schedule. For example, database daily and files weekly.
  4. Set retention. Choose how many backups to keep of each, for example 14 database backups and 4 file backups.
  5. Check what is included. Make sure uploads, themes, plugins and the database are all ticked. Leave out cache folders and old backup folders, which only make archives bigger.
  6. Run your first backup manually and watch it finish.
  7. Open your cloud storage and confirm the backup files are actually there.
  8. Turn on email reports if the plugin offers them, so you hear about failed backups. Check the backup history every couple of weeks too.

Can you back up WordPress without a plugin?

Yes. Download your WordPress folder by FTP or SFTP, then export the database from phpMyAdmin (Export, Quick, SQL format). The WordPress guide to backing up your database walks through phpMyAdmin, MySQL commands and cPanel step by step. If your host gives you SSH access with WP-CLI, the command wp db export exports the database to a file in one line. Manual backups are worth knowing for emergencies, but they rely on you remembering, so use a plugin or host backups for the routine.

How do you restore a WordPress backup?

How you restore depends on whether you can still log in to WordPress.

If you can log in to the dashboard

  1. Open your backup plugin’s page and find the list of existing backups.
  2. Pick a backup from before the problem started.
  3. Choose what to restore. If a plugin update broke the site, restoring just the plugins may be enough. If content was deleted, restore the database.
  4. Start the restore and do not close the tab until it finishes.
  5. Log in again if asked, then check the home page, a few posts and the admin area.

If the site is down or you are locked out

  • Ask your host first. A host restore from their control panel is often the fastest fix.
  • Reinstall and restore. Install a fresh copy of WordPress (our WordPress installation guide covers every method), install the same backup plugin, connect it to your cloud storage or upload the backup files, then restore from there.
  • Restore manually. Upload your files by SFTP and import the database file through phpMyAdmin. The WordPress database docs include a section on restoring from backup.

What to check after a restore

  • Your newest posts and pages are there.
  • Images load on older and newer posts.
  • Permalinks work (if posts show a 404, go to Settings, Permalinks and click Save Changes).
  • You can log in, and user accounts are correct.
  • Contact forms and other plugins work.
  • Your backup schedule is still turned on.

How do you test a WordPress backup?

Restore it somewhere that is not your live site. A backup you have never restored is only a hope. The WordPress docs recommend that if you rely on automatic backups, you also take a manual backup now and then to make sure the process is working. A test restore goes one step further and proves the backup is complete.

A simple test restore, step by step

  1. Pick a place to restore to: a staging site (many hosts offer one, and WPvivid can create one), a spare subdomain with a fresh WordPress install, or a local WordPress install on your computer.
  2. Install the same backup plugin there.
  3. Load your latest backup from cloud storage or upload the files.
  4. Restore everything: database, plugins, themes, uploads and other files.
  5. Click through the test copy using the checklist above.
  6. Write down what happened: how long it took, and any step that confused you. That note is your recovery plan for a real emergency.
  7. Delete the test copy or block it from search engines, so it does not show up as a duplicate of your real site.

Do this once after you set up backups, and again every few months or after any big change to your site or hosting.

What are the most common WordPress backup mistakes?

  1. Backing up files but not the database. Your posts live in the database.
  2. Keeping every backup on the same server. If the server goes, the backups go with it.
  3. Keeping only one backup. If that one is broken or already infected, you have nothing.
  4. Never testing a restore. You find out the archive is incomplete at the worst possible moment.
  5. Running two backup plugins. Double the server load, double the disk space, no extra safety.
  6. Using the hosting account email for cloud storage. If that account is compromised, both go together. Use a separate login with two-factor authentication.

Frequently asked questions

What is the best free WordPress backup plugin?

For most blogs, UpdraftPlus or WPvivid, because both offer scheduled backups to cloud storage in their free versions. When we checked, UpdraftPlus had 4,000,000+ active installs and WPvivid had 900,000+.

Does backing up WordPress files also back up the database?

No. The database is stored separately (usually in MySQL or MariaDB), so you need to back it up as well. Backup plugins do both in one full backup.

Where should I store WordPress backups?

At least one copy off your hosting server, such as Google Drive, Dropbox or Amazon S3, plus your host’s own backups. That follows the 3-2-1 idea of three copies, two types of storage and one offsite.

How often should I back up my blog?

The WordPress docs suggest weekly for smaller sites and daily for busy ones, and always before an upgrade. Many bloggers back up the database daily and files weekly.

Are my host’s backups enough?

They are a good first layer, but they live with your host. Keep your own copies in storage you control so you can still recover if your hosting account has a problem or you move hosts.

Similar Posts