Skip to content

Commit

Permalink
Improve compatibility w/ Kinsta + WP-Rocket.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanclevenger91 committed Nov 30, 2023
1 parent 528ecd3 commit 565f6e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/Commands/Deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ public function __invoke()
WP_CLI::runcommand('redirection database upgrade');
}

// Maybe flush Kinsta.
if(class_exists('Kinsta\KMP')) {
WP_CLI::runcommand('kinsta cache purge', ['exit_error' => false]);
}

// Maybe flush WP-Rocket.
// Note this will not impact the page cache if Kinsta is active, as Kinsta disables WP-Rocket's page cache.
// Maybe flush WP-Rocket, which will clear the Kinsta cache if both are installed.
if(is_plugin_active('wp-rocket/wp-rocket.php')) {
WP_CLI::runcommand('rocket clean --confirm');
}
// Otherwise, directly flush Kinsta if the plugin is active.
else if(class_exists('Kinsta\KMP')) {
WP_CLI::runcommand('kinsta cache purge --all', ['exit_error' => false]);
}

// Maybe flush Cloudflare
if(is_plugin_active('cloudflare/cloudflare.php')) {
Expand Down
2 changes: 1 addition & 1 deletion sterner-stuff-wordpress-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Made of Sterner Stuff
Plugin URI: https://sternerstuff.dev
Description: Core functionality for built-to-last Sterner Stuff WordPress sites.
Version: 11.4.1
Version: 11.4.2
Author: Ethan Clevenger
Author URI: https://sternerstuff.dev
*/
Expand Down

0 comments on commit 565f6e7

Please sign in to comment.