=== Naqil Backup & Migrate ===
Contributors: devameer
Tags: backup, migration, restore, database, clone
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight backups and site migration using standard ZIP archives. Export your database and files, then restore or move your site.

== Description ==

Naqil Backup & Migrate creates a single, standard **.zip** archive of your WordPress site — the database plus the `wp-content` folder — that you can keep as a backup or move to another site.

No proprietary formats, no external services, no obfuscated code. Everything is processed on your own server in small chunks so it works on large sites without timing out.

**Features**

* One‑click backup of database + `wp-content` to a standard ZIP.
* Chunked, resumable engine (AJAX) — handles large sites.
* Restore from the backup list, or upload a ZIP from another site.
* Migrate over a link: issue a secret, expiring link on the source site and the destination pulls the backup directly — no manual download, no upload limits.
* Migration-safe URL replacement that understands PHP-serialized data — moving to a new domain won't corrupt widget, theme, or plugin settings.
* Download backups securely from the admin (capability + nonce protected).
* Backups stored in a protected `naqil-backup` folder inside your uploads directory.
* Fully translatable — ships with Arabic, RTL-ready admin screens.
* Built-in Help screen documenting every feature and how to use it.

== Installation ==

1. Upload the `naqil-backup` folder to `/wp-content/plugins/`, or install the ZIP from Plugins → Add New.
2. Activate the plugin.
3. Open **Naqil Backup** in the admin menu.

== Frequently Asked Questions ==

= Where are backups stored? =
In a protected `naqil-backup` folder inside your WordPress uploads directory, protected by an `.htaccess` deny rule and an `index.php` stub. Download them from the admin screen.

= Does it work on large sites? =
Yes. The database and files are processed in small batches across multiple requests, so it avoids PHP timeouts.

= What format are the backups? =
Standard ZIP. Inside you'll find `naqil-manifest.json`, `database.sql`, and a `content/` copy of `wp-content`.

= How does "migrate over a link" work? =
On the source site, click **Migration link** next to a backup — a secret link is copied to your clipboard. On the destination site, open **Naqil Backup → Migrate & Import**, paste the link, and click **Pull backup**. The destination downloads the archive directly from the source in small chunks, verifies it, and offers to restore it. Links expire after 3 days; only the SHA-256 hash of the token is stored, issuing a new link invalidates the old one, and deleting the backup revokes its link.

= Can I move a site to a different domain? =
Yes. When you restore a backup made on another URL, all occurrences of the old URL are replaced with the new one — including inside PHP-serialized and JSON-encoded settings, where a naive search/replace would break the data. The rewrite never calls `unserialize()`, so database content can't trigger object injection.

== Screenshots ==

1. The Backups screen: create a backup, then restore, download, share, or delete it.
2. Advanced options: serialization-safe find & replace, plus database and file excludes.
3. Migrate & Import: pull a backup straight from another site over a link, or drop in a .zip.
4. The built-in Help screen documents every feature and how to use it.

== Changelog ==

= 0.1.0 =
* Initial release: chunked ZIP backup, restore, upload, download, delete.
* Serialization-safe URL replacement for cross-domain migration.
* Site-to-site migration over a secret, expiring link (chunked pull).

== Upgrade Notice ==

= 0.1.0 =
First release.
