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.
When making an option update via WP CLI,
mod_rewrite
is technically not available. This causesgot_mod_rewrite()
to returnfalse
, preventingsave_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.