Server Rules: Site Booster Module
The Ocean Site Booster's Server Rules module allows you to apply powerful performance optimizations directly at the server level. By modifying your server configuration file, this module speeds up file delivery, reduces data usage, and instructs visitors' browsers to store static files locally, all before WordPress even finishes loading.
The Server Rules feature is available as of Site Booster 1.5.0 version.
To enable Server Rules features, toggle to enable the module.
Enable (or disable) any option you would like to use, then save changes at the bottom of the module page.
Available Server Rules options include:
- Enable GZIP Compression,
- Leverage Browser Caching,
- Remove ETag and control Cache-Control headers,
- Best Practices & General Recommendation.
Enable GZIP Compression
The Enable GZIP Compression option allows you to enable GZIP compression for text, HTML, JavaScript, CSS, and XML files.
When active, your server compresses these assets into smaller, lightweight packages before sending them over to the visitor's browser. The browser then decompresses them instantly. This drastically reduces the amount of data transferred and slashes your page loading times.
Rules will be written to your .htaccess file automatically.
Leverage Browser Caching
The Leverage Browser Caching option allows you to enable browser caching with expires headers.
Instead of making a returning visitor download your logo, stylesheets, and recurring scripts over and over again, this option specifies an expiration date for those files. The visitor's browser will save these static elements locally, making subsequent page views load almost instantly.
Rules will be written to your .htaccess file automatically.
Remove ETag and control Cache-Control headers
The Remove ETag and control Cache-Control headers option allows you to remove ETag and set Cache-Control headers for your assets.
Entity Tags (ETags) are used by servers to validate cached components, but they can sometimes lead to redundant validation requests or introduce performance bottlenecks on certain hosting environments.
Turning this on replaces ETags with clean, modern Cache-Control headers to streamline how browsers validate file updates.
Rules will be written to your .htaccess file automatically.
Best Practices & General Recommendation
Because Server Rules write directly to your site's root configuration files, it is helpful to keep a few technical pointers in mind:
1. Web Server Compatibility (Apache vs. Nginx)
- The
.htaccessRequirement: The automatic rules generated by this module are designed explicitly for Apache or LiteSpeed web servers, which read configuration commands from an.htaccessfile. - If you are on Nginx: Nginx servers do not use
.htaccessfiles. If your website is hosted on a pure Nginx server, toggling these options won't break your site, but the rules will not execute automatically. You will need to ask your hosting provider to implement GZIP and Browser Caching directly inside your server'snginx.conffile.
2. File Write Permissions
- Check Your Access: For Site Booster to inject these lines cleanly, your WordPress installation must have permission to write to the root
.htaccessfile. - Troubleshooting: If you save changes and notice no difference in speed or if a performance testing tool (like GTmetrix or PageSpeed Insights) still states browser caching isn't active, ensure your
.htaccessfile permissions aren't strictly locked down to444(read-only). Temporarily changing them to644will allow the plugin to save your choices securely.
3. Deactivation and Cleanup
- Clean Reversals: If you ever choose to disable the Server Rules module or click
Reset To Default, Site Booster will systematically scrub its custom optimization blocks out of your.htaccessfile, returning your server behavior back to its baseline smoothly without leaving messy code behind.
Enjoy speeding up your website's performance with Site Booster.
Found an error in this doc or believe it needs improvement?
Send us a prepurchase ticket, include the URL of the page, and add suggestions and more details about how we can make things better for you.
That's it!
Boost your WordPress website on all levels with OceanWP and Ocean Site Booster.