Collection of WP-CLI commands and bash scripts for automating WordPress maintenance. Easily run on one or many WordPress websites using CaptainCore or an SSH script from scratch.
Activate ACF Pro License Key
YOUR_PRO_LICENSE_KEY with your Advanced Custom Fields Pro license key.
Apply HTTPS URLs
Changes HTTP references to HTTPS for a certain domain name.
Changing WordPress database prefix
Changes WordPress database prefix by exporting database, updated references and then re-importing database. Be sure to update
db_prefix_new to a new database prefix.
Cleanup bad text encodings within database
In rare case while doing a site migration sometimes characters like
“ are replaced with
â€œ. This will clean up the most common encoding issues.
Convert MyISAM database tables to InnoDB
Finds and converts any database tables using MyISAM storage engine to InnoDB.
Delete Inactive Themes
Removes all inactive themes.
Inserts must-use plugin to disable outgoing emails.
Overall disk usage within home WordPress directory.
Divi Cache Purge
Purge Divi theme static CSS file cache
Download file from Google Drive shared link
Will download from a Google Drive shared link using wget. Swap out
<file-name> with Google's unique file ID shown in shared URL and a file name where you want to download it to.
Fetch PHP memory limit
WordPress' memory limit can be independently set to anything however will not go over PHP's own limit. This will retrieve PHP's memory limit. Will attempt to retrieve from default location for Kinsta sites then fallback to what PHP's loaded ini file. Please note that sometimes there is a difference between CLI's memory limits and web request limits.
Hunt for certain WordPress user
Search for a certain WordPress user. Will only respond if the account was found. Change
user to either the login or email of the person your looking for.
Hunt Unnecessary Files on Kinsta
Returns storage usage of debug.log file and private folder on Kinsta.
Install Events Calendar Pro
Installs The Events Calendar and Event Calendar Pro and activates license.
Kinsta Cache Purge
Purges cache on Kinsta.
MonsterInsights turn off email summaries
Turn off MonsterInsights email summaries if admin user is a certain email address.
Overriding Recovery Emails
RECOVERY_MODE_EMAIL to wp-config.php file.
Search for User by Email Address
Searches for a WordPress user account by email address. Will return the name of the site if found.
Send Test Email
Sends a test email.
Show Kinsta PHP Workers
Lists out current PHP workers on a site hosted with Kinsta.
Updates all plugins, themes, and WordPress core if needed.