1. Home
  2. Blog
  3. Backup and Restore

Exclude Cache Folders and Logs From WordPress Backups So Archives Stay Small

Backup and Restore

October 5, 2026

Exclude Cache Folders and Logs From WordPress Backups So Archives Stay Small

Your backup job runs for forty minutes, uploads a multi-gigabyte ZIP, then fills Google Drive. Inside that archive: wp-content/cache, plugin cache directories, debug.log files, and temporary folders you could rebuild in seconds after a restore. The database and real media were a fraction of the size. You paid the transfer and storage cost anyway.

Same-server copies of that fat archive are not a backup strategy either. Offsite matters. Size matters too, because oversized snapshots fail mid-upload, blow retention budgets, and make restores slower when you can least afford delay.

Snapshotify is the DaftPlug backup plugin. This post is about smart file exclusions: exclude files by your own criteria, so cache folders and logs stop riding along. A full snapshot is still database SQL + site files as ZIP (standard, readable without the plugin). Large sites use batched processing. Retention only prunes automatic scheduled backups; manual and uploaded archives stay. Cloud destinations (Google Drive, Dropbox, OneDrive) are the offsite context. For why “backup next to wp-content on the same disk” fails you, read A WordPress backup on the same server is not a backup.

What Snapshotify actually ships for exclusions and snapshot size

Stay inside the real feature set:

  • Smart file exclusions: exclude files by your own criteria (cache, logs, and anything else you define)
  • Full snapshot = database SQL + site files as ZIP (standard formats, readable without Snapshotify)
  • Batched processing for large sites
  • Retention prunes automatic scheduled backups only; manual / uploaded backups are not auto-pruned
  • Cloud destinations for context: Google Drive, Dropbox, OneDrive

The contract is simple. Back up what you need to restore the site. Skip rebuildable junk. Keep archives portable. Keep manual copies safe from retention cleanup.

Why cache and logs inflate backups without buying safety

Cache plugins rewrite files constantly. Object cache drop-ins, page cache folders, minified asset caches, and image optimization scratch directories are disposable. After restore you regenerate them. Backing them up every night duplicates noise.

Logs grow without bound when WP_DEBUG_LOG is on or a plugin chatters into wp-content/uploads scratch logs. They help debugging on the live site. They rarely belong in every scheduled archive.

What you actually need in a restore:

  1. Database SQL (content, settings, WooCommerce orders, users)
  2. Themes, plugins, and uploads that are not disposable cache
  3. Any custom directories you truly cannot rebuild

What you usually do not need nightly:

  • Page cache and asset cache folders
  • Transients already represented in the database (and regenerable)
  • Huge logs and old backup-in-backup folders someone left under wp-content

Exclusions are how you stop paying for the second list. Smart file exclusions in Snapshotify let you set criteria that match your stack, not a one-size ignore list that misses your cache plugin’s odd path.

How to exclude cache and logs in wp-admin

Assume Snapshotify is installed and you can already run a snapshot. If you have never completed a successful full snapshot, fix that path first, then slim it.

1. Open Snapshotify exclusion settings

In wp-admin, open Snapshotify and find smart file exclusions. You should be able to exclude files by your own criteria: paths, patterns, or rules that match how your site stores cache and logs.

List the noisy directories you already know: common cache plugin folders, /wp-content/cache/, host-specific cache paths, and debug.log locations. Add the oddballs your stack uses (some optimizers keep cache beside uploads; some builders keep temp HTML).

2. Run a sized “before” snapshot (or note the last one)

Note the last full archive size and duration. You need a baseline. On large sites, batched processing keeps the job from timing out while you measure. Do not disable batching just to make a vanity single-request run.

3. Add exclusions for cache folders and logs

Add criteria that skip:

  • Cache directories you can rebuild after restore
  • Log files and log directories
  • Other disposable temp folders you recognize

Do not exclude uploads wholesale unless you enjoy restoring a site without images. Be precise. Exclude cache inside or beside uploads if that is where a plugin stuffed it, not the media library itself.

4. Run a new full snapshot and compare

Start a full snapshot (database SQL + site files ZIP). Compare:

  1. Archive size
  2. Time to finish
  3. Upload success to Google Drive, Dropbox, or OneDrive if you use cloud destinations

A healthy exclusion pass often drops size dramatically on cache-heavy sites. If size barely moved, your biggest folders are probably real media or an unexpected directory. Inspect the archive contents (standard ZIP) and refine criteria.

5. Keep retention and manual copies straight

Retention only prunes automatic scheduled backups. Manual and uploaded archives stay. That matters when you take a “keeper” snapshot before a migration: exclusions keep it small, and retention will not delete it for being old while it cleans scheduled history.

Use scheduled backups for routine history. Use manual snapshots for milestones. Exclusions help both; retention rules treat them differently on purpose.

6. Confirm the archive is still restorable

Smaller is useless if you excluded something critical. On staging (preferred) or a careful test path:

  1. Restore from the new ZIP + SQL pair.
  2. Confirm pages, media, and plugins load.
  3. Warm caches again after restore (expected).
  4. Confirm cloud copies still appear at the destination you chose.

Readable ZIP and SQL without the plugin is the safety net. You can open the archive on any machine and see whether cache folders are gone and uploads still present.

What good looks like

A trimmed backup setup feels sustainable:

  • Scheduled snapshots finish faster and weigh less.
  • ZIP contents show themes, plugins, real uploads, and SQL, not megabytes of cache noise.
  • Google Drive / Dropbox / OneDrive stop hitting quota from disposable files.
  • Large sites still complete via batched processing.
  • Retention cleans old automatic runs; manual keepers remain.
  • A restore test on staging boots clean, then cache rebuilds as designed.
  • Offsite copies exist (same-server only is still not enough, per the related post).

If archives are still huge after excluding cache and logs, inventory wp-content/uploads for giant originals, leftover migration dumps, or backup ZIPs stored inside the site root. Those are separate cleanup jobs. Exclusions can skip known dump paths once you identify them.

Pitfalls (the ones that bite)

Excluding all of wp-content/uploads. That is how you restore a text-only museum.

Never opening the ZIP to verify. Trust, then verify folder lists.

Only shrinking local archives while still keeping the only copy on the same server. Exclusions help size. Offsite still matters.

Assuming retention will delete a manual pre-deploy snapshot. It should not. Still label keepers clearly so humans do not delete them by hand.

Changing exclusions and skipping a restore test. Smaller wrong backups fail louder on incident day.

Stacking old backup ZIPs inside the web root and backing those up too. Backup-in-backup loops. Exclude or move them.

Practical checklist before you call it done

  1. Note current full snapshot size and duration.
  2. Open Snapshotify smart file exclusions.
  3. Add criteria for cache folders and logs (and only those disposable paths).
  4. Run a new full snapshot (SQL + ZIP); use batched processing on large sites.
  5. Compare size and confirm cloud upload to Drive, Dropbox, or OneDrive if used.
  6. Open the ZIP and confirm cache/logs are gone while media remains.
  7. Restore on staging once.
  8. Confirm retention still only targets automatic scheduled backups.
  9. Keep at least one offsite copy (same server is not a backup).

Takeaway

Backups fail quietly when they are too big to finish, too fat to retain, or too noisy to restore quickly. Cache folders and logs are the usual dead weight. Exclude them on purpose.

Snapshotify gives you smart file exclusions by your own criteria, full snapshots as standard SQL plus ZIP, batched processing for large sites, retention that spares manual and uploaded archives, and cloud destinations like Google Drive, Dropbox, and OneDrive. Pair exclusions with a real offsite habit from the related same-server article.

One Pro membership unlocks Snapshotify plus Progressify, Lightify, Generatify, and Rankify. New Pro plugins join existing memberships. Plans differ by site count only. See pricing when you want archives that stay small enough to finish every night.

Exclude cache and logs. Weigh the next ZIP. Restore once on staging. Then let scheduled runs stay lean.