Skip to content

Questions

How to back up an entire WordPress site

A WordPress site comes in two parts: a database and files. A backup that only takes one of them won't bring your site back. Here is what it should contain, and how to make one.

What a full backup contains

  • The database. Your pages and posts, your settings, accounts, comments, a shop's orders. This is the part that changes every day.
  • Media. The images, documents and videos added to the site. This is often the heaviest part.
  • Plugins and theme, in the versions you use today.
  • WordPress itself, in its current version.

Without the database, you get an empty site. Without the media, pages without images.

What it can leave out

  • The WordPress configuration file (wp-config.php). It contains the access details for that server's database: on another server, they would be wrong.
  • Caches. They rebuild themselves.
  • Old backups, yours as well as those of other plugins. Otherwise, each backup contains the previous ones, and grows endlessly.

Three ways to make one

With your host. Many hosts back up the sites they look after. Ask how many days they keep these backups, whether you can restore one yourself, and where they are stored: on the same server as your site, they disappear with it.

By hand. You download the files by FTP, and you export the database. It's possible, but slow, and easy to get wrong: a forgotten folder, a half-exported database.

With a backup plugin. It takes everything at once. Before trusting it, check three things: that it really takes everything, that it has no size limit, and that it reads back what it has written.

When to make one

Before a major update, before changing theme, before a move. And at a regular rhythm, which depends on what you can afford to lose.

English