Repository navigation
Releases
4.0.0
Version 4 introduces stricter failure handling for sync operations and project hooks. Review the README’s Migration from 3.x section before upgrading existing projects.
Breaking changes
- The main runner enables
set -eandpipefail. - All shell hooks run with
bash -eo pipefail, including existing before-import, custom search-replace, and post-sync hooks. - Unhandled command failures, failed pipelines, and nonzero hook exits can stop the sync before later operations run. Existing hooks must explicitly handle expected nonzero statuses.
- The remote export shell stops on export failure so compression cannot mask a failed export.
Completed operations are not automatically rolled back; a failed import can leave an incomplete destination database.
Added
after-db-import.sh, invoked after a successful import and before URL/path search-replace or post-sync extensions. It is skipped on failed imports and with--no-db-sync.- Exported lifecycle flags:
WP_ENV_SYNC_DB_SYNCandWP_ENV_SYNC_DB_IMPORTED. - Failure reporting and nonzero exit handling for interrupted or failed runs.
- Lifecycle tests using fake commands without connecting to WordPress, a database, or a remote server.
Maintenance behavior
Uses WordPress’s native maintenance marker and normal ten-minute expiry. Successful runs explicitly deactivate maintenance. Failed or interrupted runs leave that standard marker to expire normally.
Documentation and verification
The README documents the new hook in the hooks list, explains the v3-to-v4 migration, and corrects the existing post-sync hook filenames.
Validated with Bash syntax checks, ShellCheck, and all ten database lifecycle cases: successful sync, file-only sync, and failures during export, before-import hook, reset, import, after-import hook, hook pipeline, custom search-replace, and post-sync extension.
3.5.1
3.5.0
- adds support for a
WP_DB_EXPORT_ARGSenv variable to allow adding additional options to thewp db exportcommand run on the remote server
3.4.2
3.4.1
- ignore
.maintenancefile during file sync
3.4.0
- added support for a
before-db-import.shfile which will be run just before the local db is cleared and the production db imported
3.3.3
- flush object cache immediately after clearing database
- update to object cache flushing method after database search/replace
3.3.2
- exclude
local-xdebuginfo.phpfile (Local WP)
3.3.1
- re-enable maintenance mode after importing remote database
3.3.0
- activate wp maintenance mode after SSH check, deactivate it at the very end of the script
Note: custom maintenance page can be created by adding a /wp-content/maintenance.php file