How to back up a WordPress site
Files and database, together — a backup missing either one is not a backup. Three ways to take one, and how to prove it works.
A WordPress site is two things stored in two different places, and a backup of only one of them is not a backup at all.
| Half | What it holds | Where it lives |
|---|---|---|
| Files | WordPress itself, your theme, your plugins, and every image you have ever uploaded | The web root on your hosting account |
| Database | Every post and page, all settings, users, comments, and for a shop, every order | MySQL, separately from the files |
Restore only the files and you get a site with no content. Restore only the database and you get content with no images and no theme. They have to be taken together, and ideally at the same moment.
Method 1: your hosting control panel
The quickest route, and the one to use before any risky change. Your control panel can take a snapshot of the account — files and databases together — and restore from it later. Because it runs on the server, it is not limited by your own connection speed and handles large sites without complaint.
Two habits make this genuinely useful:
- Take one manually before you change anything. Automatic nightly snapshots are for disasters; a manual one taken sixty seconds before you update a plugin is for the far more common case.
- Download one occasionally. A backup that lives only on the account it is protecting is vulnerable to whatever happens to that account.
Method 2: a backup plugin
A plugin can run to a schedule and push the result to storage you control — cloud storage, or your own machine. That off-site copy is the real reason to use one.
Whatever you choose, configure it properly:
- Back up files and database, not database only. The default in several plugins is database only, because it is smaller.
- Send backups off-site. A backup written to
wp-content/backupsis on the same disk as the site. - Set retention. Keeping every backup forever fills your disk quota and is the usual reason a site suddenly runs out of space.
- Check the completion emails. A schedule that has been silently failing for three months is worse than no schedule, because you believed you were covered.
On a large site a plugin backup can hit the PHP execution time limit and stop halfway, leaving an archive that looks finished and is not. If your site is more than a few gigabytes, prefer the control panel or the command line.
Method 3: by hand
Worth doing once so you understand what the other methods are doing, and the method you fall back on when a site is too broken for a plugin to run.
The files
Connect over FTP or SFTP and download everything in your web root. Turn on hidden files first so you get .htaccess. If you are short of time or space, the essential folder is wp-content — core files can be re-downloaded, your uploads cannot.
The database
In phpMyAdmin, select your site's database, choose Export, and take a Quick export in SQL format. That produces a single .sql file containing everything.
Over SSH, one command does the same job and copes with far larger databases:
mysqldump -u username -p database_name > backup.sql
If you are not sure which database belongs to the site, the answer is in wp-config.php under DB_NAME.
The step everyone skips: check it restores
An untested backup is a belief, not a safeguard. The failure modes are quiet — an archive that stopped halfway, a database export truncated by a timeout, a schedule that broke months ago — and every one of them looks fine until the day you need it.
Once, restore a backup to a subdomain or a local environment and load the site. It takes twenty minutes and converts a belief into a fact. Testing that a backup works covers how.
A backup routine that actually holds
- Automatic, scheduled backups matched to how often the site changes.
- One manual backup before every risky change — updates, migrations, editing theme files.
- At least one copy off the server, so a problem with the account cannot take the backups with it.
- A restore test when you set it up, and again if you change hosts or plugins.
Every hosting plan here includes a 30-day money-back guarantee and free migration, and our support team can help you restore if you get stuck — but the copy you keep somewhere else is the one that is always yours.
Frequently asked questions
How often should I back up?
Ask how much work you are willing to redo. A brochure site that changes monthly needs a monthly backup plus one before every change. A blog publishing weekly wants weekly. A shop taking orders needs daily at minimum, because every missed backup is lost orders.
Is the host's backup enough on its own?
Treat it as a safety net rather than your only copy. A backup stored on the same account as the site shares that account's fate — if the account is suspended or compromised, you may not be able to reach it. Keep at least one copy somewhere else.
Do I need the whole wp-content folder?
Yes. It holds your uploads, themes and plugins — everything that is specific to your site. WordPress core can be re-downloaded from wordpress.org, but nothing can regenerate your uploads folder.
Related reading
Restoring files and database together, whichever way you took the backup, and the checks to run once the site is back.
How to back up your websiteFiles and database, taken together, kept somewhere other than the account they protect — here are three ways to manage both.
How to test that your backup actually worksAn untested backup is a belief rather than a safeguard — here is how to turn it into a fact you can rely on.
How to update WordPress without breaking your siteBack up, update one thing at a time, and check the site immediately — the order that keeps an update from becoming an outage.