How to Back Up a WordPress Site Locally: Files & Database

To back up a WordPress site locally, copy the entire WordPress installation directory—including wp-config.php from its configured location—and export every database table that uses the site’s configured table prefix, then store that backup copy somewhere other than the live server. This guide gives you a repeatable process for creating a complete backup copy before an update, migration, or client handoff. The backup folder contains wp-config.php and a full database export, which include database credentials, authentication keys, and site user records, so treat the folder as sensitive wherever it is stored.

Sync is not a backup on its own—only files that were actually saved and uploaded are available through sync, and a synced copy does not replace a verified, restorable backup. The sections below cover prerequisites, seven steps, verification, naming, storage, access control, troubleshooting, and FAQ.

What You’ll Need for a Local WordPress Backup

Before you create a local WordPress backup, confirm that you have the following access and tools:

  • Access to the site’s hosting control panel, including the database export tool such as phpMyAdmin or the host’s backup/export utility.
  • SFTP or SSH credentials, or the host’s File Manager, so you can download the full WordPress installation directory.
  • A local folder on your computer with enough free space for the whole installation—core files, wp-content, and everything else. The wp-content/uploads folder is usually the largest single item.
  • A text editor or SQL viewer to open and sanity-check the exported database file.
  • Access to wp-config.php, or a record of where it is configured to live, so you can confirm the database table prefix and the file’s location.
  • A file archiving tool such as 7-Zip or WinZip for packaging site files.
  • Optional but recommended: WP-CLI if you are comfortable with a terminal.
  • The Nutstore desktop client installed on the machine that holds the backup folder—Windows, macOS, or Linux. The desktop client is required for Arbitrary Folder Sync.
  • A decision about who may access the backup folder if it will be stored in a team location. Decide before you upload, not after.

Step-by-Step: How to Back Up a WordPress Site Locally

The seven steps below can be followed in order, and each step is written to stand on its own if you need to jump directly to it.

Step 1 — Decide What to Include in a Complete Backup

When a search result says WordPress backup files and database, it means two separate captures: the full WordPress installation directory and every database table belonging to the site. A complete backup contains both.

Site files—the whole installation, not a subset:

  • WordPress core: wp-admin/, wp-includes/, and root PHP files such as index.php, wp-load.php, wp-settings.php, wp-login.php, and wp-cron.php.
  • wp-content/: themes, plugins, mu-plugins, uploads, and any custom directories.
  • Configuration and server files: wp-config.php, which WordPress can place inside the installation root or one directory above it, plus .htaccess, robots.txt, and any other files that sit in the installation root.
  • Any custom or hand-edited files added to the installation.

Database—every WordPress table under the configured prefix:

  • Capture every table in the site’s database, using the table prefix configured in wp-config.php.
  • The common wp_ prefix is only a default. Many hosts and setups change it for security, so the options, posts, and users tables may be named wp_options, site1_options, xyz_options, or anything else.
  • What matters is capturing all tables belonging to the site, not matching a fixed list of table names.

Copying only wp-content leaves core files, configuration, and root-level customizations behind. Exporting only the database leaves the code, design, and media behind. Both parts are required, and the file side means the full installation directory plus wp-config.php from wherever it actually lives.

wp-config.php holds database credentials and authentication keys, and the database export holds all site content and user records. The completed backup is a sensitive artifact, and everything that follows—naming, storing, syncing—should assume that.

A synced copy of your files is not a complete backup—the database is not inside your site folder.

Step 2 — Export the Database First

The first action when you back up a WordPress site locally is to export the database. Exporting the database before moving files gives you a content snapshot before any file changes.

  1. Log in to the hosting control panel and open phpMyAdmin or the host’s database tool.
  2. Select the WordPress database for the site.
  3. Choose Export, then Quick or Custom, and select SQL format.
  4. Download the .sql file to a local downloads folder. You will move it into the dated backup folder in Step 5.

Before exporting, open wp-config.php and read the $table_prefix value. The tables you need will use that prefix.

Alternative routes include the host’s backup/export tool, WP-CLI with wp db export, or a WordPress backup plugin’s export function.

If the database is large and the export times out or produces a truncated file, use the Custom export with table batching, run the export through WP-CLI over SSH, or split the export by table group. A partial export is not a complete database backup.

Step 3 — Download the Full WordPress Installation Directory

The second action when you back up a WordPress site locally is to download the full site files. This is the file half of the WordPress backup files and database requirement.

Download the entire WordPress installation directory—the folder that contains wp-admin/, wp-includes/, wp-content/, and the root PHP files. Anything less than the full directory is not a complete file backup.

Then locate wp-config.php. WordPress permits this file to sit inside the installation root or one directory above it. Check the site’s configured location through the host panel, an existing configuration note, or the file structure itself, and include the file in the backup even when it sits outside the WordPress root. Downloading only the installation root will silently omit it in that case.

Method A—SFTP:

  1. Connect with a client such as FileZilla.
  2. Navigate to the WordPress root, the directory containing wp-admin/ and wp-includes/.
  3. Download that whole directory.
  4. Navigate to wp-config.php’s location and download it separately if it is outside the root.

Method B—host File Manager:

  1. Select the WordPress root folder.
  2. Compress it to a zip archive.
  3. Download the archive.
  4. Download wp-config.php separately if it is outside the root.

Compressing on the server first is usually faster and more reliable than transferring thousands of individual files. The wp-content/uploads folder will dominate the download size.

If you create a temporary archive on the server to speed the download, place it outside the publicly served web root, or remove it from the server once the download completes. Whether a server-side file is reachable over the web depends on the hosting setup and where it is placed, so do not assume every server-side archive is publicly accessible, and do not assume it is private either.

If you deliberately download a reduced scope—for example, only wp-content/, or only wp-content/uploads—label it clearly as an incomplete file backup. A reduced-scope copy is only a supplement to a complete backup; it is not a reliable restore source on its own, and it is not the file half of a complete backup. The missing pieces cannot be recreated reliably from the reduced-scope copy or from the WordPress package: wp-config.php may contain site-specific settings and secrets that cannot be regenerated, and theme, plugin, and custom files may not match their original versions or hand edits even if reinstalled from their original sources. If you ever need to restore, obtain the missing files from another complete backup, or from the site owner or host, rather than attempting to rebuild them. Treat a reduced-scope copy as a partial supplement only.

Step 4 — Verify Both Parts Before You Trust the Backup

Verification is what separates a local WordPress backup from a folder of files. These are basic sanity checks. They catch common failure modes—a truncated export, a download that started in the wrong folder, a missing configuration file—but they do not prove that the export is complete or that the site can be restored from it.

Sanity check What to confirm
Database file opens The .sql file opens without error and contains a plausible number of CREATE TABLE statements.
Options table exists The options table for the site’s configured prefix is present—wp_options for a wp_ install, or site1_options for a site1_ install.
Posts and users tables exist The posts and users tables for the same prefix are present, along with any custom plugin tables.
Core directories exist The site file archive contains wp-admin/ and wp-includes/, plus the root PHP files.
Content directories exist The archive contains wp-content/themes/, wp-content/plugins/, and wp-content/uploads/.
wp-config.php exists The file is present from the installation root or from its configured location one level above, whichever applies to this site.
.htaccess exists The file is present in the archive.
Archive extracts A test extraction of a few files completes without errors.
Size looks plausible File count and total size look reasonable against the live site.

For stronger verification, compare the exported table list against the site’s actual database. Open the database in phpMyAdmin or run wp db tables via WP-CLI, then check that every table present on the live site appears in the export and that row counts are in the same range. A table that exists on the site but not in the export is a concrete gap that the checklist above would not necessarily catch.

If you have a staging environment or a spare local WordPress install, import the database export and restore the file archive there, then load the site and confirm that content, media, plugins, and settings appear as expected. A restore test is the only check that comes close to demonstrating that the backup is actually restorable. If no staging environment is available, record that the backup has passed sanity checks only and has not been restore-tested—do not describe it as verified-restorable.

A backup you haven’t opened is a backup you haven’t verified, and a backup you haven’t restored is a backup you haven’t proven. Sync makes files reachable on other devices; it does not verify that a backup is restorable.

Step 5 — Name the Backup Folder for the Client and the Event

Use a naming pattern that identifies both the client and the maintenance event. A practical example is clientname_2026-11-12_pre-plugin-update.

Rules that make the pattern work:

  • Client name first.
  • ISO date second.
  • Trigger or event last.
  • Avoid spaces and ambiguous words such as “final” or “new.”

For agencies, the folder name is a useful, consistent identifier of which backup belongs to which site and which maintenance event during handoffs and multi-site weeks. The README.txt and the tracking table below complement it, so identifying a backup does not depend on the folder name alone.

Treat the backup folder as sensitive from the moment it is named. It contains wp-config.php and a full database export, which include database credentials, authentication keys, and all site content and user records.

Create a README.txt inside each backup folder with only non-sensitive metadata: site URL, WordPress version, the table prefix read from wp-config.php, where wp-config.php is located relative to the installation root, backup date, what change the backup precedes, who made it, and whether the backup has been restore-tested.

Do not put credentials, authentication keys, database passwords, salts, API tokens, or any other secrets in the README—or in the folder name, the file name, or any note stored alongside the backup. The README is an index of the backup, not a place to keep the secrets the backup already contains.

Step 6 — Store the Backup Somewhere Other Than the Live Server

Keep the dated folder, containing the full installation copy, wp-config.php from its configured location, and the database export, on your own computer or an external drive. Do not store the finished backup on the hosting server. If the machine is shared, protect the folder at the operating-system level as well.

When you back up a WordPress site locally for a client, the finished folder may also need to be reachable from another device or by another authorized maintainer. Nutstore is a file sync and collaboration platform for teams, and its Arbitrary Folder Sync feature lets you right-click any folder on your computer to sync it—no mklink command line needed, and no need to move backups into a fixed sync directory.

To make saved backup folders reachable with Nutstore:

  1. Install the Nutstore desktop client and sign in on Windows, macOS, or Linux.
  2. Keep your backup folders where they already live—for example, D:\Backups\clientname_2026-11-12_pre-plugin-update. There is no need to relocate them into a designated sync folder.
  3. Right-click the client’s backup folder and select the sync option to add it to Nutstore.
  4. Repeat per client so each client’s backups remain a separate, clearly named folder rather than one undifferentiated pile.
  5. Set access before sharing. If the folder will live in a shared team location, restrict it to the maintainers who are authorized to hold that client’s credentials and data. Use the narrowest permission level that lets those people do their work.
  6. Do not create a public or broadly shared link to a backup folder. Backup folders contain wp-config.php and full database exports; a link that can be forwarded, guessed, or indexed defeats the point of storing them carefully. If a link is genuinely required, scope it to the specific authorized recipient and keep it as tight as the tool allows—but the default should be that backups are reached through the team folder’s permission levels, not through links.
  7. Open the Nutstore web app or a second device to confirm the folder is visible there. This is a reachability check, not a restore test.
  8. If several people maintain the same client sites, use a shared team folder with the appropriate permission level so the right people can reach the backups and others cannot.
  9. When a client relationship ends or a maintainer leaves, revisit who can reach that client’s backup folder and remove access that is no longer needed.

Nutstore’s sync does not create the database export, does not validate the backup, and does not restore a WordPress site. Sync covers files that were actually saved and uploaded; a synced copy does not replace a verified, restorable backup. Keep the local copy and, where possible, a second independent copy.

Step 7 — Repeat the Routine Before Every Change or Handoff

The purpose of this routine is to back up a WordPress site before changes, not to create a one-time archive. Use the same checklist before every update, theme change, plugin install, or client handoff:

  1. Export the database.
  2. Download the full WordPress installation directory and wp-config.php from its configured location.
  3. Run the sanity checks and, where feasible, a restore test. If no restore test was performed, record that the backup is sanity-checked only.
  4. Name and date the folder.
  5. Copy it to a local location and, if needed, a sync location.
  6. Confirm access is limited to authorized maintainers.
  7. Only then run the update.

Keep the pre-change backup until the site has been confirmed stable, then archive it rather than deleting it immediately.

For agency readers, a tracking table can be kept in a shared team folder so the whole team sees the same record. The table is metadata, so it should not carry credentials.

Site Table prefix wp-config.php location Last backup date Backup location Who verified Restore-tested? Who has access
Client A site1_ One level above root 2026-11-12 Local + team folder Maintainer name No—sanity checks only Two maintainers
Client B wp_ Installation root 2026-11-10 Local + external drive Maintainer name Yes—staging restore One maintainer

The routine takes the same steps for every site. Consistency, not speed, is what prevents gaps. Prefixes and wp-config.php locations vary between client sites, so read them each time rather than carrying over assumptions from the last site. Revisit access lists at the same time, because who is authorized to hold a client’s data can change between maintenance events.

Troubleshooting Common Local WordPress Backup Problems

Quick answer: Most failed local backups come from a partial database export, a file download that started in the wrong folder, or treating sync as a backup. Fix the database by comparing the exported table list with the live database, fix the file archive by downloading from the WordPress root and adding wp-config.php from its configured location, and fix the sync misunderstanding by confirming which files were actually saved and uploaded and by keeping a separate database export and file archive.

Issue 1 — The database export is incomplete or times out

Symptom: The export stops partway, the file is only a few KB, or phpMyAdmin returns a timeout error.

Cause: A large database, shared-hosting PHP limits, or a partial Quick export.

Fix: Switch to Custom export with table batching, export via WP-CLI over SSH, or split the export by table group. Then compare the exported table list against the live database—open the database in phpMyAdmin or run wp db tables—and confirm that every live table with the site’s configured prefix appears in the export and that row counts are in the same range. Passing this comparison is a sanity check, not proof of a complete, restorable export.

Issue 2 — The file backup is missing core files, wp-config.php, uploads, themes, or plugins

Symptom: The file archive is far smaller than expected, wp-admin/ or wp-includes/ is absent when it is opened, or the archive contains the installation but no wp-config.php.

Cause: The download started at a subfolder such as wp-content instead of the WordPress root; the transfer was interrupted; or wp-config.php sits one directory above the root and was outside the scope of the download.

Fix: Re-download from the WordPress root so the full installation is included. Locate wp-config.php at its configured path and add it to the backup even if that path is outside the root. Compare the extracted structure against the live site, including core directories, wp-config.php, and .htaccess. Verify that the archive extracts cleanly. If the archive is still incomplete, obtain the missing files from another complete backup, or from the site owner or host, rather than assuming they can be rebuilt from the WordPress package.

Issue 3 — “My files are synced, so I assumed I was covered”

Symptom: An update goes wrong and the synced copy cannot restore the site.

Cause: Sync is not a backup, and the database was never exported.

Fix: Treat sync as a reachability and organization layer only. Check that the files you expected are actually saved and uploaded by opening the sync web app or a second device and confirming the folder contents match. Then create a database export and a verified archive of the full installation plus wp-config.php, and keep at least one independent copy. Only files that were actually saved and uploaded are available through sync.

FAQ About WordPress Backups

What exactly do I need to back up in WordPress?
A complete WordPress backup files and database capture requires the full WordPress installation directory—core files, wp-content, and any other files in the installation—plus wp-config.php from wherever it is configured to live, which may be one directory above the root, and all database tables under the site’s configured prefix.

Can I back up a WordPress site without a plugin?
Yes. You can back up a WordPress site locally without a plugin by using phpMyAdmin or WP-CLI for the database export and SFTP or the host’s File Manager for the full installation directory. The critical requirement is including wp-config.php from its configured location and every table under the site’s actual prefix.

How often should I back up a client site?
Back up a WordPress site before changes rather than on a fixed calendar. Create a complete backup copy before every update, theme change, plugin install, migration, or client handoff. Event-driven backups match the moments when a site is most likely to need a rollback point.

Is syncing my backup folder to the cloud the same as a backup?
No. Sync makes files that were actually saved and uploaded reachable on other supported devices. It does not create a database export, validate that a backup is complete, or restore a WordPress site. A synced copy does not replace a verified, restorable backup kept as a separate artifact.

Who should be able to access a client backup folder?
Only maintainers authorized to hold that client’s credentials and data. Because the folder contains wp-config.php and a full database export, reach it through a restricted team folder with the available permission levels rather than a public or broadly shared link. Revisit access when a client relationship ends or a maintainer leaves.

Summary and Next Actions

To summarize how to back up a WordPress site locally: include two parts—the full WordPress installation directory plus wp-config.php from its configured location, and all database tables under the site’s configured prefix. Run sanity checks and, where feasible, a restore test before trusting the result; if no restore test was performed, describe the backup as sanity-checked only. Name each folder per client and per event, store it somewhere other than the live server, limit access to authorized maintainers, and avoid public links. Treat the folder as sensitive because it holds credentials and client data. If a copy is ever incomplete, obtain the missing files from another complete backup or from the site owner or host rather than trying to rebuild them.

Where Nutstore Fits (Optional)

For teams maintaining several client sites, Nutstore’s Arbitrary Folder Sync makes it easier to keep each client’s backup folder synced from wherever it already lives on your computer, while team-folder permission levels control who can reach it—so you get an additional copy without reorganizing your existing folder structure.

Start the Nutstore Team plan free trial — 20 days free

New to Nutstore? Explore Nutstore here.

Sync organizes and makes backups reachable—it does not create, validate, or restore them, and it does not replace a verified, restorable backup.

Related Posts

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

Back To Top