=== Post & Page Migrator ===
Contributors: codestackify
Tags: migration, posts, pages, transfer, rest-api
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Easily migrate posts and pages from this site to another target WordPress site using the WP REST API.

== Description ==

WordPress Post & Page Migrator is a lightweight, secure utility that allows administrators to push posts, pages, terms (categories & tags), featured images, inline content images, and custom fields directly from one WordPress site to another.

By leveraging the native WordPress REST API and Application Passwords, this plugin eliminates the need for manual XML exports/imports or database dumps.

Key Features:
* **Batch Processing Queue**: Sequentially migrates selected items with server rate-limiting delays to prevent timeouts and PHP memory exhaustion.
* **Smart Duplicate Prevention**: Checks target destinations by post slug and title before creation, cleanly updating existing posts instead of duplicating them.
* **Automatic Media Porting**: Automatically uploads featured images and parses post content to upload inline images to the target server, rewinding URLs inside the content to use the target's media library.
* **Term Synchronization**: Seamlessly replicates associated categories and tags on the target site during migration.
* **Restricted & Secure**: Built using WordPress standard capabilities checks, nonces for CSRF security, and basic authentication with Application Passwords.

== Installation ==

1. Upload the folder `wp-post-page-migrator` to the `/wp-content/plugins/` directory, or upload the ZIP file directly via the WordPress admin panel.
2. Activate the plugin through the **Plugins** dashboard.
3. Navigate to **WP Migrator** in your dashboard side menu.
4. Fill in the target server's URL, administrator username, and WP Application Password, then save settings.
5. Go to the **Migration Center** tab, select the posts and pages you want to push, and click **Migrate Selected Items**.

== Frequently Asked Questions ==

= Where do I get the WP Application Password? =
On the destination site, go to **Users > Profile**, scroll down to **Application Passwords**, type a name for the app (e.g., "Post Migrator"), and click **Add New Application Password**. Copy the generated 24-character password and paste it into the plugin's settings on the source site.

= Does the destination site need this plugin installed? =
No, the plugin only needs to be installed on the source site where you are pushing the content from. The target site only requires the REST API to be enabled (default in WordPress core) and a valid administrator profile.

= What post types are supported? =
Currently, standard WordPress posts and pages are supported.

== Screenshots ==

1. The Server Configuration tab where destination site credentials are set and verified.
2. The Migration Center tab showing the posts/pages list and queue progress bar during execution.

== Changelog ==

= 1.0.0 =
* Initial release.
* Added batch migration queue engine.
* Resolved REST API connection validation constraints.
* Enhanced media directory-traversal security controls.
* Fixed transient term cache isolation across target hosts.
