Release version 0.1.3.1#499
Conversation
- Handle task error status in site creation and restore polling loops - Use current site WP and PHP versions instead of hardcoded values - Create reserved site for local push for better reliability - Sanitize error messages in WP_Error responses Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: improve local push error handling and site creation
… connected Prevents the InstaWP Connect plugin from being removed post-migration when the site has an active connect_id, ensuring managed sites retain their connection to InstaWP. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: skip connect plugin deletion if site is connected
The existing pre-filter only skipped auto-appending the plugin slug when connect_id was set. It did not cover entries added via post_uninstalls (e.g. from white-label payloads). Add an array_search-based guard right before the delete loop that removes instawp-connect from $plugins_to_delete whenever the site has an active connect_id, instawp_is_staging flag, or instawp_sync_connect_id parent reference — regardless of how the slug got into the list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: hard-guard instawp-connect from deletion in post-migration cleanup
Keeps the method on the migration REST class (no move to InstaWP_Tools)
but exposes it for external callers. Returns {success, modified, message}
at every exit point so HestiaCP scripts can log a human-readable status
after invoking it via 'wp eval' on pure pull migrations, which do not go
through handle_post_migration_cleanup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
refactor: make sanitize_wp_config public and return status array
handle_post_migration_cleanup was calling instawp_reset_running_migration('hard', true)
unconditionally when clear_connect was set. The hard reset deletes instawp_api_options,
instawp_is_staging, and other critical options — leaving connected staging sites unable
to authenticate or heartbeat to the dashboard.
Now check instawp_get_connect_id() first: if a valid connect_id exists the site is
actively connected, so only run a soft reset (cleans migration temp data). Disconnected
sites still get the full hard reset + server-side disconnect as before.
Also moves $connect_id declaration above its first use (the reset block) so all
downstream references (plugin-delete guard, hard guard) share a single call.
Adds Variable Declaration Before Use and Self-Review principles to CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: use soft reset for connected sites in post-migration cleanup
The `handle_migration_through_wp()` handler still referenced the old `serve.php` path after it was moved to `iwp-serve/index.php` in Feb 2025, causing the WP-routed migration fallback to always 404 with "File not found" and breaking pulls on sites where the direct serve URL is blocked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix: route /serve-instawp/ to iwp-serve/index.php after rename
|
Claude finished @randhirinsta's task —— View job PR Review for InstaWP Connect v0.1.3.1 ✅Context loaded:
Review Checklist:
SummaryThis PR introduces improvements to local push migration handling, site creation reliability, and migration cleanup logic. The changes are generally well-implemented but there are several architectural and security concerns that should be addressed. 🏗️ Architectural Review✅ Positive Aspects
|
/serve-instawp/WordPress-routed migration fallback.