Skip to content

How to back up a WordPress site

By Ash, Founder, HosteazePublished 2 min read

A complete WordPress backup has two parts, your files and your database, and you need both to restore the site. The easiest method is a backup plugin such as UpdraftPlus that saves both on a schedule to cloud storage. Keep at least three recent copies in different places, and test a restore before you need one.

A slim external hard drive plugged into a laptop by its cable, the kind of separate copy every website backup needs.
Credit: Janvanbizar via Pixabay

A backup you've never tested is a hope, not a backup. The good news is that WordPress backups are cheap and easy to automate. The bad news is that a very common setup, copies stored on the same server as the site, fails at exactly the moment you need it.

What does a WordPress backup need to include?

Two things, and you need both to restore a site:

PartWhat's in itWhere it lives
FilesWordPress itself, themes, plugins, uploaded images, wp-config.php, .htaccessYour hosting account's web folder
DatabasePosts, pages, settings, users, comments, orders, form entriesA separate MySQL or MariaDB database

WordPress's handbook recommends backing up the database first and then the files, so the two match. When restoring, it's the other way round: files first, then import the database.

How do I back up WordPress with a plugin?

This is the method we recommend for most small business sites. UpdraftPlus is a long-standing free option, and the steps are similar in other backup plugins.

How do I back up WordPress manually?

Useful before a big change, or if you'd rather not add a plugin.

Where should I keep my backups?

Off the server, in more than one place. WordPress suggests keeping at least three to five recent backups, for example one with your host, one in cloud storage and one on your own computer. The UK's National Cyber Security Centre adds a useful rule for external drives: don't leave them plugged in, because some malware spreads to connected drives.

If you host with Hosteaze, backups are included, but we'd still encourage you to keep a copy of your own. On the question of frequency, see how often you should back up your website.

How do I check my backup actually works?

Restore it somewhere safe. A staging site is ideal: restore the latest backup there and click around. If the pages, images and recent posts all appear, your backup works. Do this every few months, and always before relying on one for updating WordPress safely or moving to a new host.

Related guides: What is web hosting?.

Step by step

  1. 1.Choose a backup plugin

    Install a backup plugin such as UpdraftPlus from Plugins > Add Plugin.

  2. 2.Connect off-site storage

    Link the plugin to cloud storage such as Google Drive or Dropbox so backups aren't kept only on your server.

  3. 3.Set a schedule

    Back up weekly for a small site that rarely changes, or daily for a shop or busy blog.

  4. 4.Run the first backup

    Start a manual backup that includes the database, plugins, themes and uploads.

  5. 5.Test a restore

    Restore a backup to a staging copy to prove it works.

Frequently asked questions

How often should I back up my WordPress site?

WordPress's own guidance suggests weekly for smaller sites with few posts and daily for busy ones. Base it on how much you'd lose. A shop taking orders every day needs daily backups at least, while a brochure site you edit monthly can manage with weekly ones and a backup before every change.

Are my hosting company's backups enough?

They're a useful safety net, but don't make them your only copy. If your hosting account is compromised or closed, those backups can go with it. Keep your own copies off the server as well.

Does backing up my files also back up my database?

No. Your posts, pages, settings and orders live in a separate MySQL or MariaDB database, not in your WordPress folder. Downloading your files by FTP misses all of that, which is why a plugin or a separate database export is needed.

Sources

  1. WordPress Advanced Administration Handbook, WordPress Backups
  2. NCSC, Small organisations guide to cyber security, Backing up your data
  3. WordPress.org Plugins, UpdraftPlus

Hosting made for WordPress

See how our WordPress hosting is set up.

See WordPress hosting