When does WP Rocket write to the .htaccess file?
WP Rocket writes to the .htaccess file in the scenarios listed below.
Enabling or disabling plugin features:
- Mobile Cache
- Separate cache files for mobile devices, for WP Rocket versions before 3.16
- WebP Compatibility
- CDN / RocketCDN
Also, adding values to these features:
- Never Cache URLs
- Never Cache Cookies
- Never Cache User Agents
Enabling or disabling plugins
- Some third party plugins that are using dynamic cookies or mobile-specific templates, and which WP Rocket has automatic compatibility with
WP Rocket and WP Rocket helper plugins
- Activating or deactivating WP Rocket
- Activating or deactivating helper plugins related to the scenarios mentioned above and/or the rules here
- Some WP Rocket updates related to above's situations
This information is useful when you're working in an environment with limited files permissions, and you need to know when you need to adjust the . htaccess permissions accordingly, or if you're trying to troubleshoot any weird behavior of your .htaccess file.