=== Dragon Migrate ===
Contributors: dragoncoreltd
Tags: migration, database, backup, search-replace, export
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.0.5
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Repeatable WordPress database migrations. Export, import, back up and search-replace with serialization-safe accuracy, resumable on any host.

== Description ==

Dragon Migrate moves WordPress databases without breaking them. Every migration runs through a resumable job engine that adapts to your server's time and memory limits, so it finishes on cheap shared hosting instead of timing out halfway through.

The search and replace is serialization-safe: it unserializes values, replaces inside them, and reserializes, so page builder data and plugin settings survive a domain change intact.

= Features =

* **Database Export** - Streamed, gzipped SQL exports with table selection
* **Database Import** - Resumable imports that pick up where they left off
* **Serialization-Safe Search & Replace** - Handles nested serialization, Gutenberg block attributes and Elementor data correctly
* **Full-Site Archive** - Database plus uploads, themes and plugins in a single zip
* **Backup & Restore** - One-click snapshot before a risky change, and a way back
* **Dry Run** - See exactly what will be replaced before anything is written
* **Migration Profiles** - Save a configuration and re-run it as often as you need
* **WP-CLI** - `wp dragon-migrate export` and `wp dragon-migrate find-replace`
* **Resumable Everything** - Row-offset cursors resume mid-table, even on a two-million-row table

= Multisite =

Multisite is not supported. The plugin detects a multisite installation and disables itself rather than partially working.

= Dragon Migrate Pro =

Pro adds site-to-site push and pull migrations, media and file sync, preflight checks, automatic rollback points, scheduled syncs, WP-CLI commands and audit logging. Available at https://dragoncore.ltd/plugins

== Installation ==

1. Upload the `dragon-migrate` folder to `/wp-content/plugins/`
2. Activate the plugin through the Plugins menu in WordPress
3. Go to Tools > Migrate

== Frequently Asked Questions ==

= Will this break my page builder content? =

No. Search and replace unserializes data before replacing, then reserializes it. Elementor data, which stores JSON with escaped slashes, is handled specifically.

= My host has a 30-second timeout. Will migrations finish? =

Yes. Jobs run in small batches that are sized dynamically from how long the previous batch took and how much memory it used. A job resumes from its exact cursor position on the next tick.

= Where are export files stored? =

In a randomly named directory inside your uploads folder, protected from direct access. Downloads are served through an authenticated endpoint, so the raw file path is never exposed.

= Does it support multisite? =

Not in this version.

== Changelog ==

= 1.0.5 =
* Compatibility: tested up to WordPress 7.1.
* Housekeeping: job-history pruning queries now use WordPress's identifier placeholder.

= 1.0.4 =
* Safety: deleting a backup or profile now asks for confirmation naming the exact file.
* Housekeeping: finished job history is pruned after 60 days.
* Polish: the multisite notice only appears where it is relevant.

= 1.0.3 =
* Data safety: uninstalling the plugin no longer deletes its data unless you explicitly opt in first — a reinstall now picks up exactly where you left off.

= 1.0.2 =
* New look: the Dragon design system arrives — a consistent Dragon Core header, cleaner tables, and unified status colours. Purely visual; no behaviour changes.

= 1.0.1 =
* Renamed all option, hook, function and constant prefixes to the unique `dragonmigrate_` / `DRAGONMIGRATE_` prefix. Existing settings, backups and scheduled tasks are migrated automatically on update.

= 1.0.0 =
* Initial release
