Regenerate WP-Rocket .htaccess From Command Line
To regenerate the .htaccess file with WP-Rocket rules from the command line do the following: Install wp-rocket extension for wp-cli:
|
1 |
wp package install geekpress/wp-rocket-cli |
Regenerate the .htaccess file:
|
1 |
wp rocket regenerate --file=htaccess |
There are additional useful commands on the rocket extension. See https://github.com/GeekPress/wp-rocket-cli for details.