bluehost / endurance-page-cache

Other
24 stars 11 forks source link

Force got_rewrite to true for WP CLI requests #62

Closed earnjam closed 5 years ago

earnjam commented 5 years ago

When making an option update via WP CLI, mod_rewrite is technically not available. This causes got_mod_rewrite() to return false, preventing save_mod_rewrite_rules() from completing.

Because of this, .htaccess isn't getting updated when the cache level setting is changed via WP CLI.

This fixes this issue by adding a filter which forces got_mod_rewrite() to true for WP CLI commands.