Even if WP Rocket doesn’t offer a free version of the cache plugin, we recommend buying it as it’s one of the best cache plugins on the market.
- The WP Rocket has all the features you need to optimize the WordPress site speed to 100%.
- Because WP Rocket is focused on website speed optimization rather than security, it works well with the WP Ghost plugin.
- WP Rocket plugin has the option to Combine all CSS and JS files and also the inline styles.
With a bit of setup, WP Rocket + Hide My WP Ghost will help you secure your website & hide the plugin and theme CSS and JS files from Themes Detectors.
Setup WP Rocket
To hide all CSS and JS you need to follow the steps to Combine the JS and CSS files into one file. Let’s see how you can do this with the WP-Rocket plugin.
Combine the JS Files
The plugin offers the option to Minify and combine the JS Files into one file. As we tested it, this worked well with WP Ghost.
- Go to WP Rocket > File Optimization section.
- Click to activate the Minify JavaScript files option to optimize and reduce the JS size.
- Click to activate the Combine JavaScript Files option to combine all JS files in one random JS file.

The Combine JavaScript Files option will combine all of your JavaScript files into a single undetected by theme detectors file.
Combining CSS and JS files will still result in a speed bump for specific WordPress sites, so we recommend testing your page speed with this option enabled and disabled.
Combine the CSS Files
The plugin offers the option to Minify and combine the CSS Files into one file. We tested it, and it worked well with WP Ghost.
- Go to WP Rocket > File Optimization section.
- Click to activate the Minify CSS files option to optimize and reduce the CSS size.
- Click to activate the Combine CSS Files option to combine all CSS files in one random CSS file.

WP-Rocket “Combine CSS files” option will combine all of your CSS files into a single undetected by theme detectors file.
Hide WP Rocket Cache Path with WP Ghost
Now that all the CSS and JS are combined, these files are present in the cache directory.
By default, the cache path is /cache/min/ but the URLs inside the cache are /cache/min/1/wp-content/ and /cache/min/1/wp-includes/ where 1 is the site ID.
WP Ghost automatically detects WP Rocket and hides the WP-Rocket cache URL in Hide My WP > Mapping > URL Mapping.

Change Paths in Cache Files
To activate WP Ghost and change the paths in the cache file, go to WP Ghost > Change Paths and activate the option Change Paths in Cache Files from the sidebar. The plugin will automatically change the paths in the background using WP Cron.

Note! If WordPress Cron is deactivated on your website, you can manually click to change the paths once the files are cached.