How to Back Up a WordPress Website Locally: Files + Database

To back up a WordPress website locally, you need to save two separate things — the WordPress files on your server and the database that stores your content, users, and settings — then verify both parts and store them in one dated folder. A restorable WordPress backup needs both the site files and the database; an archive missing either half cannot bring your site back. This guide walks through a repeatable nine-step workflow: copy the site files, export the database, package them consistently, verify the archive, store it locally, and optionally keep an additional synced copy. The result is a complete local WordPress backup — files + database — that gives you a working recovery point if an update, migration, plugin change, or theme change fails.

What You’ll Need Before You Start

A WordPress site is two separate things: the files on the server and the database that stores content, settings, users, and plugin data. Backing up only one of them produces an archive that cannot restore the site. Gather these items before you begin so the workflow runs without interruption:

  • WordPress admin access — to record your version numbers
  • Hosting control panel access — cPanel, Plesk, or an equivalent panel
  • SFTP/FTP credentials or the host’s file manager — for copying files
  • Database credentials — found in wp-config.php (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST) plus the table prefix ($table_prefix, often wp_ but frequently customized)
  • Free local disk space — plan for at least 2–3× your site’s total size
  • Optional but recommended: a local WordPress environment (LocalWP, XAMPP, MAMP) or a staging site for the restore test in Step 9
  • Optional: the Nutstore desktop client for Windows, macOS, or Linux — used only for the additional synced copy in Step 8 (Nutstore is a file sync and collaboration platform, not a WordPress backup tool)

How to Back Up a WordPress Website Locally: The Nine-Step Workflow

The steps below are self-contained: each one explains why it matters, how to do it, and how to confirm it worked. Read them in order the first time, then reuse the same sequence for every future backup.

Step 1 — Reduce Writes During the Export (Optional)

Maintenance mode is optional, not a required step. Its only purpose here is to reduce the chance that new content is written to the database while you export it.

Be clear about its limits: a maintenance page or a generic server-level rule may not stop background requests, REST API calls, scheduled cron jobs, or transactions already in flight. If your site takes orders, bookings, or form submissions, do not assume a maintenance page halts all writes.

If you want to reduce writes, use a tested method that suits your site and hosting setup, and follow that method’s own documentation. Do not apply an untested .htaccess rule or drop-in file to a production site. For stores and other sites receiving transactions, check with your host or the plugin vendor, and consider exporting during a documented low-traffic window. Skipping this step entirely is a valid choice.

Check it worked: verify the behavior of whatever method you choose yourself, in both a logged-out browser and an admin session, because the result depends on the method, the plugin, and the host. Do not assume a specific outcome.

Step 2 — Record Your Site’s Environment Details

You need to know what you are restoring to if the update fails. Capture the following into a plain text file named manifest.txt (you will use it again in Steps 5 and 6):

Item Example
WordPress version 6.x
PHP version 8.x
Active theme + version Twenty Twenty-Four 1.x
Active plugins + versions (list every active plugin)
Table prefix wp_ or your custom prefix
Site URL https://example.com
Host and plan name Your host’s recorded plan
Date, time, time zone Timestamp of the backup

Check it worked: the manifest lists every active plugin — compare it against the Plugins screen to confirm nothing is missing.

Step 3 — Copy the WordPress Files

Not every folder matters equally. Here is what to prioritize:

  • Essential: wp-content/ (themes, plugins, mu-plugins, and especially uploads), wp-config.php, .htaccess, and any custom files in the web root
  • Optional: wp-admin/ and wp-includes/ can be replaced by downloading a fresh copy of the matching WordPress version. That said, include them if you want a true full backup

Three methods, in order of preference:

  1. SFTP client — download the entire site directory
  2. Host file manager — compress the site folder to a zip, then download it
  3. Host-side one-click backup — note this creates a server-side copy, not a local one, so it does not satisfy this tutorial on its own

Check it worked: the uploads folder is present and non-empty, and the file count roughly matches what you see on the server.

Step 4 — Export the WordPress Database

The database holds posts, pages, users, options, plugin settings, WooCommerce orders, and form entries. Without it, your files are just code with no content.

Method A (most portable): In phpMyAdmin, select your database → Export → choose SQL format → include both structure and data → enable DROP TABLE / CREATE TABLE → save as a file. Confirm the database you select matches DB_NAME in wp-config.php.

Method B (if WP-CLI is available): Run wp db export backup.sql. This exports the database configured for the WordPress installation. Confirm that the exported tables belong to the correct site and use the expected prefix.

Method C (plugin export): Acceptable, but you must verify the resulting file contains the full database, not a partial or plugin-specific subset.

Common pitfalls to watch for: selecting the wrong database, using the wrong table prefix, or an export that times out on large databases (see Troubleshooting below).

Check it worked: the .sql file opens in a text editor and contains both CREATE TABLE and INSERT INTO statements.

Step 5 — Package and Name the Backup Consistently

Consistent naming is what makes a WordPress full backup locally step by step repeatable. Use a fixed structure:

Backups/wordpress/example.com/2026-11-12/
├── example.com_files_2026-11-12.zip
├── example.com_db_2026-11-12.sql
└── manifest.txt

Why naming matters: once you maintain multiple sites across multiple dates, an unlabeled archive becomes unmanageable. A dated folder is what makes a clean rollback possible.

Check it worked: all three items sit inside the same dated folder.

Step 6 — Verify Both Halves of the Backup

This is the step most people skip — and it is the step that decides whether your backup is real. Run these checks:

  • The zip opens without errors
  • wp-config.php is inside the archive
  • wp-content/uploads is present
  • The .sql file is not 0 KB and is not truncated
  • The number of CREATE TABLE statements roughly matches the number of tables in phpMyAdmin
  • File sizes are plausible against your site’s total size

Check it worked: write the verification result into manifest.txt — date, file sizes, table count, and who verified it.

Step 7 — Store the Backup in a Dedicated Local Folder

Choose a location deliberately:

  • An internal drive folder outside any synced working directory you use for live projects
  • An external drive as a second local copy is fine
  • Keep the dated folder structure intact — do not rename or reorganize archives after the fact
  • Retention: keep at least the last 2–3 pre-change backups so you can roll back further than a single step

Check it worked: the folder opens locally with the site fully offline or disconnected.

Step 8 — Sync a Second Copy of the Folder with Nutstore

Nutstore is a file sync and collaboration platform, not a WordPress backup tool. It does not schedule, run, or restore WordPress backups. What it does here is keep an additional copy of the backup folder you already created and verified.

Why a second copy matters: a local-only archive on one machine is lost if that drive fails. A synced copy is reachable from another supported device or from the web interface. If you want to back up a WordPress site to your computer and survive a drive failure, this is the layer that helps.

Detailed steps for the Windows, macOS, and Linux desktop client:

  1. Go to the Nutstore website, create an account, and download the client for your platform. All three desktop platforms are supported.
  2. Sign in and confirm the client is running and connected.
  3. Right-click the entire backup folder — for example Backups/wordpress/example.com/ — and choose the sync option. Nutstore’s arbitrary folder sync works on any folder on the computer: no command-line mklink and no need to move files into a designated sync directory.
  4. Keep the whole folder synced as a unit rather than picking individual files, so the archive stays internally consistent.
  5. Wait until the client reports the folder fully uploaded, and confirm the sync status indicator shows complete.
  6. Verify from a second device or the web interface that the dated folder and all three items (files.zip, db.sql, manifest.txt) are present and the sizes match.

Accuracy notes worth knowing:

  • Compressed archives (zip/rar) do not support delta sync — each new dated archive uploads in full. Plan folder growth and clean old archives deliberately instead of assuming incremental uploads.
  • Delta sync is PC-client only and applies to files over 64 KB where the change is small. Do not expect it for archives.
  • Transport is encrypted with SSL/TLS; stored files use AES-256 encryption.
  • Sync is not a backup. Keep the local archive as the primary copy and treat the synced copy as redundancy. Syncing does not replace an independent, verified backup. Do not rely on sync as your only copy, and do not assume how any particular change or removal on one device will be reflected elsewhere — verify the state of the synced copy yourself before you depend on it.
  • Unsaved or unuploaded changes are not available through sync — the backup is protected only once the client reports upload complete.
  • Version history retention depends on your plan.
  • Do not use Nutstore to sync a live WordPress installation’s wp-content as a code-sync workflow. Nutstore is not recommended for code sync; the folder here is a backup archive only.

Check it worked: the dated folder appears in the web interface with matching file sizes.

Step 9 — Test a Restore Before You Need It

An untested backup is a hypothesis, not a recovery point. Test it while nothing is broken.

Choose a destination: restore into a local environment (LocalWP or XAMPP) or a staging subdomain. Then follow this sequence:

  1. Create an empty database
  2. Import the .sql file
  3. Upload the files
  4. Update wp-config.php if credentials differ
  5. Check permalinks and .htaccess
  6. Spot-check the homepage, a recent post, a form, and a plugin settings page

Record the result in manifest.txt — the date tested and what worked. Note that restoring to a different domain requires a search-replace of the site URL.

Check it worked: the restored copy renders correctly and admin login works.

Troubleshooting Your Local WordPress Backup

Quick Answer: Three failures account for most unusable backups — an incomplete database export, an incomplete file archive, and a synced copy that does not match the local folder. Each has a distinct cause and a distinct fix. Match the symptom you are seeing to the cause, then apply the fix listed directly beside it. If a cause is not listed, do not assume the backup is fine — re-verify the archive in Step 6 before you rely on it.

Issue 1 — The database export is empty, truncated, or missing tables

Symptom: a 0 KB .sql file, or a file that ends mid-statement.

Cause Fix
The export timed out on a large database Export table-by-table in phpMyAdmin, or use mysqldump over SSH, or raise PHP max_execution_time
The wrong database was selected Re-open phpMyAdmin and confirm the database name matches DB_NAME in wp-config.php
The wrong table prefix was used Confirm the prefix in wp-config.php matches the exported tables; a prefix mismatch is not corrected automatically by any export method
The browser download was interrupted Re-download the file and re-check its size against the expected database size

Issue 2 — The file archive is incomplete

Symptom: the zip errors on extraction, or wp-content/uploads is absent or far smaller than expected.

Cause Fix
The download was interrupted Re-download the archive; use SFTP with resume support instead of a browser
A server file-size or timeout limit was hit during compression Download wp-content in parts, or compress it in sections on the server
Hidden files such as .htaccess were not included by the file manager Enable “show hidden files” in your file manager and re-copy
The archive simply contains fewer files than the server Verify file counts against the server after extraction and re-download anything missing

Issue 3 — The synced copy doesn’t match the local folder

Symptom: a file shows as not uploaded, or a “conflict copy” file appears.

Cause Fix
The client was closed or offline before the upload finished Reopen the client and let it finish; check the sync status indicator
The same file was edited in two places Nutstore’s smart conflict resolution preserves conflict copies rather than overwriting — open both and keep the correct one, since it does not merge content automatically
The folder was moved or renamed mid-sync Restore the folder to its original path and let the client re-scan; then re-verify sizes against the local archive

Note that sync never protects edits that were never saved or uploaded, and sync does not replace an independent, verified backup. If the synced copy looks wrong and the client reports it is complete, re-upload the affected archive from the verified local folder rather than editing in place.

Frequently Asked Questions

Do I really need to back up both the files and the database?
Yes. Files hold themes, plugins, and uploads; the database holds content, users, and settings. A restorable WordPress backup needs both the site files and the database — restoring one without the other produces a broken or outdated site.

Which folders in WordPress actually need backing up?
wp-content (especially uploads), wp-config.php, and .htaccess. wp-admin and wp-includes can be replaced from a fresh copy of the same version, but including them gives you a true full backup.

How often should I take a local backup?
Before every update, plugin or theme change, or migration at minimum. If content changes frequently, add a regular cadence. The goal is a dated rollback point per risky change.

Can I use Nutstore as my WordPress backup tool?
No. Nutstore is a file sync and collaboration platform — it does not schedule, create, or restore WordPress backups. It can keep an additional synced copy of a backup folder you created and verified yourself.

Does syncing a backup folder replace a real backup?
No. The verified local archive is the backup; the synced copy is redundancy. Sync never captures edits that were never saved or uploaded, and syncing does not replace an independent, verified backup — so keep the local archive as your source of truth and check the synced copy before you depend on it.

How do I know my backup will actually restore?
Test it. Import the database into an empty database and load the files in a local or staging environment. Record the test date in your manifest so you know the archive was validated.

Summary and Next Steps

Files + database, packaged into one dated folder, verified, stored locally, tested. Repeat the same folder structure every time so a failed update becomes a short rollback instead of an outage. Maintenance mode is optional and only reduces some writes — the export itself is what makes the backup complete. When you need a local WordPress backup before an update, following the same nine steps every time is what turns a one-off chore into a reliable habit.

Keep the recovery point safe, not just created

A local archive on one machine is one drive failure away from gone. Nutstore can sync your entire backup folder from any location on your computer on Windows, macOS, and Linux, with SSL/TLS transit encryption and AES-256 storage encryption — so your dated backup is reachable from another device or the browser when you need it. Nutstore does not schedule or restore WordPress backups, and syncing is not a substitute for an independent, verified local archive.

Try Nutstore Today

Start a 20-day free trial of Nutstore Team

Explore Nutstore

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top