Skip to content

v1.0

Choose a tag to compare

@austinginder austinginder released this 10 Jun 18:47
· 128 commits to main since this release

🎉 CaptainCore Do v1.0 Release Notes

This marks the initial public release of CaptainCore Do, a powerful and lightweight command-line toolkit designed to streamline common tasks for WordPress developers and server administrators.

✨ New Features & Commands

This first version is packed with a suite of commands to handle everything from backups to performance tuning.

  • backup: Creates a full backup of a WordPress site, including the database and all files, into a single .zip archive. The backup is placed in the site's root and includes the URL for easy download.
  • backup-db: Performs a database-only backup, storing the .sql file in a secure, private directory (_wpeprivate, ../private, or ../tmp).
  • convert-to-webp: Finds and converts images larger than 1MB in the wp-content/uploads directory to the modern WebP format.
  • db-check-autoload: Checks the total size of all autoloaded options in the database and lists the top 25 largest options to help diagnose performance issues.
  • dump: Dumps the contents of files matching a specific pattern into a single .txt file for easy review and analysis.
  • migrate: Automates site migrations from a backup URL or local file, including file migration, database import, and URL replacement. It intelligently handles special BackupBuddy and Dropbox URLs.
  • monitor: Provides real-time server access log monitoring, displaying top IP addresses and status codes in a clean, readable table format.
  • reset-permissions: Resets file and folder permissions to standard web server defaults (755 for directories, 644 for files).
  • slow-plugins: Helps identify plugins that may be slowing down WP-CLI by measuring command execution time with and without each active plugin.
  • suspend: Activates or deactivates a "Website Suspended" page for site visitors by adding or removing a must-use plugin.
  • version: Displays the current script version, which is v1.0.

🛠️ Dependencies & Setup

  • Automatic Dependency Installation: The script includes helper functions to automatically download and install gum (for glamorous shell scripts) and cwebp to a ~/private directory if they are not already installed.
  • Prerequisites: For full functionality, the script relies on several common command-line utilities: wp-cli, wget, zip/unzip, tar, rsync, identify (from ImageMagick), and mysqldump or mariadb-dump.

🚀 Development & Installation

  • A compile.sh script is included to combine the main script and all command functions into a single distributable file (captaincore-do.sh).
  • For easier development, a watch.sh script uses fswatch to automatically recompile the script when source files are changed.
  • Users can run the script without a permanent installation by using a temporary alias, making it easy to use on any server.