You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checkpoint Management (checkpoint): A comprehensive suite of commands has been added to create, list, show, and revert WordPress installation checkpoints. This feature allows users to capture the state of their site's core, themes, and plugins and revert to a previous state if needed.
checkpoint create: Creates a new checkpoint.
checkpoint list: Interactively lists all available checkpoints for inspection.
checkpoint list-generate: Generates a detailed, cached list of checkpoints for faster access.
checkpoint revert [<hash>]: Reverts the site's files to a specified checkpoint.
checkpoint show <hash>: Shows the changes within a specific checkpoint, including file and manifest diffs.
checkpoint latest: Displays the hash of the most recent checkpoint.
Update Management (update): This new command set streamlines the WordPress update process by integrating with the checkpoint system.
update all: Automatically creates a 'before' checkpoint, runs all core, plugin, and theme updates, creates an 'after' checkpoint, and logs the changes.
update list: Shows a list of past update events, allowing users to inspect the changes between the 'before' and 'after' states.
update list-generate: Generates a detailed, cached list of all update events.
Cron Job Management (cron): Enables the scheduling of _do commands.
cron enable: Configures a system cron job to run scheduled _do tasks.
cron list: Lists all scheduled commands.
cron add: Adds a new command to the schedule with a specified start time and frequency.
cron delete: Removes a scheduled command by its ID.
cron run: Executes any due commands.
WP-CLI Health Checker (wpcli): A new utility to diagnose issues with WP-CLI itself.
wpcli check: Helps identify themes or plugins that are causing warnings or errors in WP-CLI.
Site Reset (reset-wp): A command to reset a WordPress installation to its default state. It reinstalls the latest WordPress core, removes all plugins and themes, and installs the latest default theme.
PHP Tag Checker (php-tags): Scans a directory for outdated PHP short tags (<?) that can cause issues on modern servers.
Inactive Theme Cleaner (clean themes): Deletes all inactive themes, but intelligently preserves the latest default WordPress theme as a fallback.
Interactive Disk Cleaner (clean disk): Launches an interactive disk usage analyzer to help find and manage large files and directories.
Database Optimization (db optimize): A new command to optimize the WordPress database by converting tables to InnoDB, cleaning transients, and reporting the largest tables.
Improvements
Command Structure & Aliases: The script has been refactored for better organization. Commands like backup-db and db-check-autoload are now subcommands under the db command (db backup, db check-autoload).
Dependency Management:
The script now automatically checks for, downloads, and installs missing dependencies like gum, cwebp, and rclone into a ~/private directory to avoid system-wide installations.
git is now a required dependency for the new checkpoint and update features.
Compilation and Development:
compile.sh: A new compilation script is introduced to combine the main script and individual command files from the commands directory into a single distributable file (_do.sh).
watch.sh: A watcher script has been added to automatically re-compile the script when changes are detected in the source files, streamlining development.
Monitor Command: The monitor command is now a subcommand with more specific targets: traffic, errors, access.log, and error.log.
Suspend Command: The suspend command now uses a more specific filename (do-suspend.php) for the mu-plugin to avoid conflicts.
Migration (migrate):
The migrate command now has a --update-urls flag to control whether the site's URL should be updated after import.
It now intelligently finds a private directory for storing temporary files.
File Dumper (dump): The dump command has been enhanced with an -x flag to allow for the exclusion of specific files or directories from the dump.
Fixes
Migration File Handling: The migrate_site function was updated to handle cases where wp-content exists in the backup but contains no plugins or themes to move, preventing potential errors.
Dump Command Self-Exclusion: The run_dump function now explicitly excludes its own output file from the list of files to be dumped, preventing it from including itself in the generated text file.