=== PWS Backup & Migration ===
Contributors: mukhyyar
Tags: backup, migration, export, import, restore
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Export, import, and restore WordPress sites with the PWS .pws format. Chunked uploads and pre-restore validation included.

== Description ==

**PWS Backup & Migration** by [Professional Web Solutions](https://pwsolution.com/) lets you export, import, store, and restore complete WordPress sites using the proprietary `.pws` archive format.

Professional migration and WordPress services are available from the plugin author.

= Features =

* One-click full site export to `.pws`
* Chunked upload for unlimited import size
* Local backups management (download, restore, delete)
* Pre-restore validation (archive, disk, PHP, WP, MySQL)
* URL search & replace during migration
* SHA-256 checksums for archive integrity
* Smart exclusions (cache, logs, dev folders)

= Privacy =

* **Telemetry:** NONE
* **External services:** NONE
* **Remote API calls:** NONE (except loopback AJAX for pipeline continuation)

All backup operations run locally on your server. No data is sent to third parties.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/pws-backup-migration/`
2. Activate through the 'Plugins' menu in WordPress
3. Go to **PWS Backup** in the admin menu

== Frequently Asked Questions ==

= What is a .pws file? =

A `.pws` file is the native archive format used by PWS Backup & Migration. It contains your database, uploads, plugins, themes, and migration metadata.

= Does this plugin send data externally? =

No. Telemetry is NONE, external services are NONE, and remote API calls are NONE.

= Can I migrate large sites? =

Yes. The plugin uses chunked uploads and a multi-step AJAX pipeline to handle sites of any size.

== Developer Notes ==

Filter `pwsbami_archive_chunk_size` to adjust archiver read/write chunk size (default 524288 bytes).
Filter `pwsbami_export_exclude_path` to exclude additional paths from export.

== Changelog ==

= 1.0.10 =
* Auto-remove duplicate plugin folders on activation (fixes multiple “PWS Backup & Migration” rows after zip upload)
* Admin notice with one-click cleanup when duplicate installs are detected

= 1.0.9 =
* Faster file packing: single-pass SHA-256 while writing (no double disk read)
* Stream file list from disk with byte-offset resume (no 39k-path memory load per request)
* Smaller packing steps (150 files / 12s) for strict shared-hosting timeouts
* Export retries use exponential backoff (up to 20 attempts); refresh page to resume after failure

= 1.0.8 =
* Fix large-site export timeouts: chunked resumable file scanning with per-step time budget
* Export pipeline retries transient AJAX failures (up to 10 attempts) and auto-resumes after page refresh
* Safer default step sizes for shared hosting (500 files / 20s per request)

= 1.0.7 =
* Move local backup storage to uploads/pws-backup-migration/backups/ (migrate legacy wp-content/pws-backups/ on activation)
* Replace direct ABSPATH/WP_CONTENT_DIR usage with WordPress path helpers (get_home_path, get_theme_root, wp_upload_dir, plugin_dir_path)
* Harden import extract with archive path allowlisting and traversal checks

= 1.0.6 =
* Prefix template and uninstall variables for Plugin Check / PHPCS compliance

= 1.0.5 =
* WordPress.org review: remove production ini_set('display_errors') from import handler
* Rename all code prefixes from pws/PWS_ to pwsbami/PWSBAMI_ for namespace uniqueness
* Migrate legacy pws_* option keys on plugin activation

= 1.0.4 =
* Store runtime work files in the uploads directory instead of the plugin folder
* Resolve archive paths via WP_CONTENT_DIR for custom content directory layouts
* Portable 64-bit archive size encoding; legacy storage migration on activation

= 1.0.3 =
* Faster export: time-budget batching for file packing and database export
* Improved restore/import UI with loading, progress, and success states
* Smarter export exclusions (installer zips, backup temp folders, archive files)
* Export complete message shows files vs database size breakdown
* WordPress.org Plugin Check compliance (no hidden files in plugin package)
* Import pipeline reliability fixes; removed unstable restore-point option from UI

= 1.0.2 =
* Add contextual author services sidebar on Export, Import, and Backups admin pages (WordPress.org compliant)

= 1.0.1 =
* Export database schema (CREATE TABLE) before row data for reliable restore after drop
* Client-driven import pipeline (no server loopback) for shared hosting and localhost
* Removed development debug instrumentation
* Improved export resume, exclusions, and large-site packing reliability

= 1.0.0 =
* Initial release
