=== Stalza Backup ===
Contributors: fuadkm
Tags: backup, restore, recovery, verification, schedule
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight, resource-aware, verifiable WordPress backup and recovery.

== Description ==

Stalza Backup protects your WordPress site with chunked, resumable backups, integrity verification, and safe restore — without unnecessarily overloading your server.

**Free includes**

* Manual backups: full, database, files, or media
* Daily / weekly schedules with retention and exclusions
* Local protected storage + download
* Verification and backup manifests
* Restore with pre-restore safety snapshot
* WP-CLI for backup, restore, schedule, and jobs

**Core principles**

* A backup is not successful until verified
* Restore is as important as backup
* Local backup works without an external account
* Free version is genuinely useful

== Installation ==

1. Upload the `stalza-backup` folder to `/wp-content/plugins/`
2. Activate the plugin through the Plugins menu
3. Open **Stalza Backup** in the admin menu

== Frequently Asked Questions ==

= Does Free require a cloud account? =

No. Local storage and download work without any external account.

= Is verification Free? =

Yes. Verification and backup manifests are core Free features.

= How do scheduled backups run? =

Through WordPress cron (`stalza_backup_cron_run`). On hosts where WP-Cron is unreliable, trigger it with a real system cron calling `wp cron event run`.

== Screenshots ==

1. Overview — protection status, stats, Backup Now, and recent backups
2. Backup history — download, verify, restore, and delete
3. Restore — restore from a verified backup with safety snapshot
4. Schedules — daily/weekly schedule, retention, and exclusions
5. Storage — local storage path and disk usage

== Changelog ==

= 1.0.6 =
Bug Fixes:

* Stop writing `$wpdb->prepare()` `%` placeholder hashes into SQL dumps (Elementor `settings="%7B%7D"` / site-logo fatals).
* Exclusive job lock so admin ticks and WP-Cron cannot double-append `filelist.txt`.
* Heal prepare-placeholder corruption on restore and rewrite absolute URLs in uploads CSS (Elementor google-fonts CORS).
* Remap option/usermeta keys and unknown collations when restoring custom table prefixes.
* Stream large zip downloads with Range support; clear Plugin Check ERROR/WARNING findings.

Features:

* Stronger site-to-site restore: prefix rewrite, serialize-safe URL remap, JSON-escaped URL pairs, and uploads text-file remaps.

= 1.0.5 =
Bug Fixes:

* Set WordPress.org Contributors to valid username `fuadkm`.

= 1.0.4 =
Features:

* Site-to-site restore: automatic table-prefix rewrite and serialize-safe URL remapping when source and destination differ.
* Restore-completed modal with Go to login (sessions are usually reset after DB restore).

Bug Fixes:

* Dump pagination uses `ORDER BY` primary/unique key so large tables do not emit duplicate PKs.
* Persist SQL restore offset mid-tick and rewrite `INSERT` to `REPLACE` so resume cannot fail on Duplicate entry.
* Restore ticks survive session wipe via tick token (omit stale REST nonce; clear cookie check when token present).
* Harden staging cleanup and prune missing `active_plugins` after restore so incomplete plugin copies cannot fatal the site.

= 1.0.3 =
Features:

* Import a Stalza backup zip from cloud or another site (Restore → Upload backup modal); verified before restore is offered.
* Richer backup progress UI: live scan activity, elapsed time, rotating hints, and clearer phase titles.

= 1.0.2 =
Performance:

* Scan phase uses a DFS stack cursor and prunes excluded directories (no O(N²) path re-walk). Mid-upgrade jobs still mid-scan with legacy `resume` restart that scan cleanly.
* Admin REST ticks process up to 500 items / 20s (was 100 / 15s); cron job ticks match. Scan phase ignores the item cap and runs under time/memory only so listing finishes in one tick on typical sites.
* Zip STORE for already-compressed media; light DEFLATE for text — less CPU, same zip format.
* Archive seeks `filelist.txt` by byte offset (no full reload each tick); scan batch-appends the list.
* Admin UI re-ticks ~every 50ms while a job runs (was 1.2s idle gap).

Bug Fixes:

* Scan progress no longer shows a fake ~99% (`N/(N+1)`); UI shows files found with an indeterminate bar until archive/dump has a real total.

Full history: https://stalza.com/docs/stalza-backup/changelog
