How to Backup a WordPress Site (4 Methods Compared)

How to backup WordPress site data comes down to two things: a copy of the database and a copy of the files, stored somewhere other than your server. This guide shows how to backup WordPress site data four ways (your host’s backups, a backup plugin, a manual copy and WP-CLI) and how to test that a backup restores.

Quick answer: How to backup WordPress site data: save both the database (posts, pages, users, settings) and the files (themes, plugins, uploads, wp-config.php), and keep a copy off the server. The four methods are your host’s backups, a backup plugin, a manual copy using a file manager and phpMyAdmin, and WP-CLI. Whichever you choose, test a restore on a staging copy so you know the backup works.

How to backup WordPress site data: what a backup must include

WordPress’s own documentation splits a backup into two parts:

  • The database: your posts, pages, comments, users and settings. It lives outside your WordPress folder, so copying the folder alone doesn’t back it up.
  • The files: WordPress core, themes, plugins, uploads, wp-config.php and .htaccess. The wp-content folder and wp-config.php hold everything specific to your site; core files can be downloaded again from WordPress.org.

The same documentation recommends backing up the database first, then the files, and restoring the files first, then the database. Keep each database export with the matching file backup as one set.

How to backup WordPress site data: 4 methods compared

Here’s how to backup WordPress site data four ways, side by side:

MethodBest forBacks upAutomationWhere copies goMain limit
1. Your host’s backupsAnyone whose host offers themUsually files and databaseAutomatic, on the host’s scheduleThe host’s storageRetention and restore options depend on the host
2. A backup pluginMost site ownersFiles and database, as you chooseScheduled from the dashboardYour server by default, or remote storage you connectRuns on your server, so large sites can hit limits
3. Manual copyOccasional backups and small sitesWhatever you copyNoneYour computer or wherever you upload itEasy to miss a folder or forget to repeat
4. WP-CLIDevelopers with SSH accessThe database (files copied separately)ScriptableWherever you save the exportNeeds SSH and WP-CLI; doesn’t copy files by itself

Method 1: How to backup WordPress site with your host’s backups

Who it suits: anyone whose hosting plan includes backups, especially owners who want nothing to set up.

Steps:

  1. Open your hosting dashboard and find the backups area.
  2. Check how often backups run and how long they’re kept.
  3. Before any big change, create an on-demand backup if your host offers one.
  4. Download a copy now and then, so one backup exists away from your host.

Limits: retention, restore options and downloads depend on the host, and backups stored with the host can be affected by the same problem as your site. Treat them as one layer, not your only copy.

Method 2: How to backup WordPress site with a backup plugin

Who it suits: most site owners who want scheduled backups to cloud storage from the WordPress dashboard. The steps below use UpdraftPlus as the example, following its own documentation.

Steps:

  1. Install and activate the plugin, then go to Settings > UpdraftPlus Backups.
  2. Open the Settings tab and set schedules for files and for the database.
  3. Under Choose your remote storage, connect a destination such as Google Drive, Dropbox or Amazon S3, and save your changes.
  4. On the Backup / Restore tab, click Backup Now, include both the database and files, and confirm.
  5. Check that the backup appears under Existing Backups and in your remote storage.

Limits: a plugin runs on your own server, so very large sites can run into server time or space limits. Without remote storage, UpdraftPlus keeps backups in wp-content/updraft on the same server, which doesn’t protect you if the server fails.

Method 3: How to backup WordPress site manually

Who it suits: small sites, one-off backups before a big change, and owners who want a copy on their own computer.

Steps to back up the database:

  1. Open phpMyAdmin from your hosting control panel.
  2. Select your WordPress database in the left-hand panel. Its name matches DB_NAME in wp-config.php.
  3. Use Export to save the database as a .sql file.

Steps to back up the files:

  1. Connect with your host’s file manager or an SFTP client.
  2. Download your WordPress folder, making sure wp-content and wp-config.php are included.
  3. Store the .sql file and the files together, labeled with the date.

Limits: it’s slow, it’s easy to miss a folder, and it only happens when someone remembers.

Method 4: How to backup WordPress site with WP-CLI

Who it suits: developers and anyone comfortable with SSH. It’s fast and can be scripted.

Steps:

  1. Connect to your server over SSH and go to your WordPress folder.
  2. Run wp db export to save the database to a .sql file. You can name the file, for example wp db export backup.sql.
  3. Copy the WordPress files separately, over SFTP or with your server’s own tools.
  4. Move both the export and the files off the server.

To restore the database later, run wp db import backup.sql. Both commands use the database details in wp-config.php.

Limits: you need SSH access and WP-CLI installed, and wp db export covers the database only, so the files still need their own copy.

How to backup WordPress site data: which method to choose

  • No technical help in-house: use your host’s backups plus a backup plugin sending copies to cloud storage.
  • A one-off backup before a big change: a manual copy or an on-demand host backup.
  • A developer on hand: WP-CLI, scripted alongside a file copy.

How to test a WordPress backup restore

The last step in how to backup WordPress site data properly is proving it restores. Never test on your live site; use a staging copy instead. If you don’t have one yet, our staging environment guide explains how to set one up.

  1. Pick a recent backup and note its date.
  2. Restore it to the staging copy.
    1. With a plugin such as UpdraftPlus: open Existing Backups, click Restore and choose the parts to restore.
    1. With a manual or WP-CLI backup: upload the files first, then import the database, using phpMyAdmin’s import or wp db import.
  3. Check the restored site. Load the homepage and key pages, log in to the dashboard, open a few images and submit a form.
  4. Write down the result, including the date, which backup you used and anything that failed.

How often should you back up?

Back up as often as your site changes, and always before updates or other big changes. Our WordPress maintenance checklist sets out a full schedule, including when to test a restore.

Where to keep your backups

Knowing how to backup WordPress site data only helps if one copy lives off the server. A widely used rule of thumb is 3-2-1: three copies of your data, on two different types of storage, with one copy off-site. Host backups plus a plugin sending copies to cloud storage covers most small sites.

Common backup problems and fixes

Even once you know how to backup WordPress site data, a few problems come up often:

  • The backup times out. Large sites can hit server time limits. Exclude cache folders and old backup files, or use your host’s backups or WP-CLI instead.
  • Storage fills up. Set how many backups to keep, and delete old ones from remote storage.
  • The backup is incomplete. Check that both the database and wp-content are included; a database-only or files-only backup can’t restore the whole site.
  • The restore fails. Test on staging, restore files before the database, and check that wp-config.php has the right database details for that server.

Frequently asked questions

How to backup WordPress site data for free?

Use your host’s included backups, a free backup plugin, or a manual copy with phpMyAdmin and your host’s file manager. All three can back up both the database and the files at no extra cost, as long as you keep a copy off the server.

Does WordPress have a built-in backup?

WordPress core doesn’t include a one-click full-site backup, so you still need to choose how to backup WordPress site data: your host, a plugin, a manual copy, or WP-CLI’s wp db export with a copy of the files.

How do I back up only the WordPress database?

Export it in phpMyAdmin, or run wp db export with WP-CLI. Remember that a database backup doesn’t include your themes, plugins or uploads.

Should I rely on my host’s backups alone?

It’s better not to. Host backups are a good first layer, but keep at least one copy somewhere the host doesn’t control, such as cloud storage or your own computer.

How do I restore a WordPress backup?

With a plugin, use its restore option. With a manual or WP-CLI backup, upload the files first, then import the database. Test the restore on a staging copy before you ever need it on the live site.

The bottom line

Knowing how to backup WordPress site data is only half the job; the other half is proving the backup restores. Pick a method you’ll actually keep using, store a copy off the server, and test a restore on staging. If you’d rather have backups handled with your hosting, see how our managed hosting works.

Search

Popular Posts

Small Biz Website Tips Newsletter

Stay up to date with the latest marketing, sales, and service tips and news.

Small Biz Website Tips Newsletter

Stay up to date with the latest marketing, sales, and service tips and news.