How to Back Up a WordPress Site (4 Ways, Step by Step)
A WordPress backup has two halves: the database, which holds your posts, pages and settings, and the files, which hold your themes, plugins and uploads. You need both to get a site back. Here are four ways to make one, how often, where to keep it, and how to check it will actually restore.
In this article
Key takeaways
- A full backup is the database plus the files: wp-content, wp-config.php and .htaccess.
- Back up weekly for small sites, daily for busy ones, and always before an update.
- Keep 3 to 5 copies in different places, with at least one off the server.
- A plugin such as UpdraftPlus schedules it; your host's backups are one copy, not the whole plan.
- By hand: export the database in phpMyAdmin or with wp db export, then download the files.
- Test a restore every few months. A backup you've never restored is a guess.
The short answer
Install a backup plugin such as UpdraftPlus, schedule a full backup of the database and files, and send it to cloud storage rather than leaving it on your server. Back up weekly for a small site and daily for a busy one, always before an update, and keep 3 to 5 copies in different places. The four ways:
- A plugin: the easiest way to schedule backups and send them off the server.
- Your host: most hosts back up for you. Treat it as one copy, not the whole plan.
- By hand: export the database in phpMyAdmin, then download the files over SFTP.
- WP-CLI:
wp db exportplus an archive of the files, easy to schedule.
The advice on how often and how many comes from WordPress’s own backup handbook; the plugin details were checked in the WordPress.org plugin directory on 11 November 2026.
What a full backup includes
Backing up the files does not back up the database. The database lives on a separate MySQL or MariaDB server, outside the WordPress folder, so a full backup needs both:
| Part | What’s in it | How to back it up |
|---|---|---|
| Database | Posts, pages, comments, users, settings, menus, and store orders on WooCommerce | Export it to an .sql file: plugin, phpMyAdmin or WP-CLI |
wp-content folder | Themes, plugins and uploads (your images and files) | Plugin, or download over SFTP |
wp-config.php | Database details, security keys and settings | Download it with the files |
.htaccess | Permalink and redirect rules on Apache servers | Download it with the files |
| WordPress core files | wp-admin, wp-includes and the rest | Not needed: download them again from wordpress.org |
WordPress’s handbook suggests treating the two as one backup set made at about the same time: back up the database first, then the files, and keep the .sql file in the same folder or zip as the files that go with it.
How often, and how many to keep
- Weekly for a smaller site that rarely changes, and daily for a busy one, as WordPress’s handbook suggests.
- Before every update or big change, such as a new theme or a plugin that changes the database. Our guide to maintenance mode covers the rest of an update routine.
- Keep 3 to 5 recent backups in different places: one with your host, one in cloud storage such as Google Drive or Dropbox, and one on your own computer.
- Stores need more. Restoring a database puts it back to the moment of the backup, so orders placed since then are lost unless you export them first. Back up a store at least daily.
Way 1: with a plugin
A plugin is the easiest way to get scheduled backups that land somewhere other than your server. These are the most-installed backup plugins in the WordPress.org directory:
| Plugin | Active installs | Last updated | From its listing |
|---|---|---|---|
| All-in-One WP Migration and Backup | 5,000,000+ | 27 Oct 2026 | Backs up and exports a whole site in one file. Free restores mean importing that file, so your host’s upload limit applies; one-click restore is paid |
| UpdraftPlus | 4,000,000+ | 26 Oct 2026 | Scheduled backups, from every 2 hours to monthly, to Dropbox, Google Drive, Amazon S3, FTP or email; restore part or all of a site |
| Duplicator | 1,000,000+ | 3 Nov 2026 | Packs the files and database into one archive, with restore and cloud storage in the free version; scheduled backups are in Pro |
| WPvivid | 900,000+ | 9 Nov 2026 | Backs up the whole site, the files or only the database; also migrates and makes staging copies |
| Backuply | 600,000+ | 22 Oct 2026 | Local and cloud backups (FTP, SFTP, Google Drive, OneDrive, Dropbox, Amazon S3) with one-click restore |
| BackWPup | 400,000+ | 14 Oct 2026 | Automatic database and file backups, stored on the server or in the cloud, with restore |
All six were tested with WordPress 7.1.4, according to their listings on 11 November 2026. Setting one up takes a few minutes:
- Install and activate it from Plugins → Add New.
- Choose what to back up: the database and all the files, not one or the other.
- Connect remote storage, such as Google Drive, Dropbox or Amazon S3. Backups kept only on your server go down with it if the server fails or the site is hacked.
- Set a schedule and how many backups to keep: daily or weekly, 3 to 5 copies.
- Run the first backup now, then check it finished and the files arrived in your storage.
Way 2: your host's backups
Most hosts back up every site on their servers. That’s a useful safety net, but check the details in your hosting dashboard:
- How often it runs, and how many days it keeps.
- Whether you can download a backup, or only ask the host to restore one. WordPress’s handbook notes that requesting a copy from your host can take time.
- Whether a restore brings back both the files and the database.
- Whether you can make an on-demand backup right before an update.
Keep at least one copy elsewhere too. If the hosting account is suspended, hacked or closed, backups stored inside it can go with it.
Way 3: by hand
The database. Most hosts include phpMyAdmin. WordPress’s own steps:
- Open phpMyAdmin from your hosting panel and click your WordPress database on the left.
- Click the Export tab.
- Choose Quick and the SQL format, then click Go. For a large database, choose Custom and a gzipped output instead.
- Save the .sql file to your computer.
In cPanel, Download a MySQL Database Backup does the same. Don’t use cPanel’s full account backup for this: the handbook notes those are for archiving and can’t be restored from cPanel.
The files. Connect with SFTP or your host’s file manager and download the wp-content folder, wp-config.php and .htaccess. Put them in one dated folder with the .sql file, and zip it.
Way 4: with WP-CLI
If you can run WP-CLI on the server, two commands make a full backup:
# The database, using the details in wp-config.php
wp db export db-2026-11-11.sql
# The files that matter
tar -czf files-2026-11-11.tar.gz wp-content wp-config.php .htaccesswp db exportrunsmysqldumpwith the database details fromwp-config.php, so there’s nothing to type in.- Copy both files off the server, then delete them there. A .sql file left in a public folder can be downloaded by anyone who guesses its name.
- To restore the database, upload the files first, then run
wp db import db-2026-11-11.sql. - A server cron job can run the same commands every night.
How to restore a backup
- Restore the files first, then import the database, the order WordPress’s handbook recommends. A plugin’s restore screen does both and lets you choose parts.
- If the database details changed, for example on a new host, update
wp-config.phpto match. - Log in, check the key pages, and clear your page cache and CDN.
- On a store, export the orders placed since the backup before you restore, and add them back afterwards.
If the site shows “Error establishing a database connection” or the white screen of death after a restore, the backup was made while something was already broken; try an older one.
Test your backups
A backup you’ve never restored is a guess. WordPress’s handbook recommends backing up your automatic backups with a manual one now and then, to make sure the process works. Every few months:
- Check the plugin’s log: did every scheduled backup finish?
- Open the latest archive: are the uploads in it, and is the .sql file more than a few kilobytes?
- Restore it onto a test copy or a staging site, not the live site, and click through it.
Running backups for many client sites? Our guide to backup and rollback for agencies covers schedules, storage and rollback across a fleet.
Where WPOS fits
WPOS isn’t a backup tool, so keep a real backup with one of the tools above. Its migration key copies a site’s pages, posts, themes, plugins, media, menus and settings onto another WordPress install, which is handy for a test copy, but it doesn’t run on a schedule and isn’t a backup. What WPOS adds is a safer way to make the changes you back up for: an AI agent inside wp-admin on the sites you already run, on any host, that checks its own render with a browser screenshot before it reports a change as done, and a staging sandbox in the free trial for trying updates first. An update becomes one request:
“Update the plugins on the sandbox one at a time, take a screenshot of the home, shop and contact pages after each, and stop at the first update that changes anything.”
WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.
Frequently Asked Questions
Use a free backup plugin such as UpdraftPlus, which can save scheduled backups to Google Drive, Dropbox or Amazon S3, or do it by hand: export the database in phpMyAdmin and download wp-content, wp-config.php and .htaccess over SFTP. Your hosting plan may include backups too.
WordPress's own handbook suggests weekly for smaller sites and daily for busy ones, and always before an update. A store, or any site that changes every day, needs at least a daily database backup.
As one copy. Check how often it runs, how long it's kept, and whether you can download and restore it yourself. Keep at least one more copy somewhere else, so a problem with the hosting account doesn't take your backups with it.
Off the server, in at least two places: cloud storage such as Google Drive, Dropbox or Amazon S3, plus a copy on your own computer or with your host. WordPress's handbook suggests keeping 3 to 5 recent backups in different locations.
No. You can download them again from wordpress.org. What you can't download again is your database, your wp-content folder with themes, plugins and uploads, wp-config.php and .htaccess.
With a plugin, use its restore screen and choose what to restore. By hand, upload the files first, then import the database with phpMyAdmin or wp db import, and update wp-config.php if the database details changed. Clear the cache afterwards and check the key pages.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
Try every update on a copy first.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.