If your cache plugin is not minifying CSS and JS files when WP Ghost is active, it may be due to the way WP Ghost modifies paths for security reasons. While WP Ghost has built-in compatibility with most popular cache plugins, some may require additional tuning to function correctly.

Follow these solutions one by one to resolve the issue:

Whitelist Your Website’s IP Address

Whitelisting your website’s IP address allows cache plugins to access the original paths of CSS and JS files, enabling them to minify these resources correctly.

Steps:

  1. Go to WP Ghost > Firewall > Whitelists.
  2. Add your website’s IP address to the whitelist.
  3. Save the changes and test if the cache plugin is now minifying the CSS and JS files.

Disable Path Changes for Logged-in Users

Some cache plugins process CSS and JS files using cron jobs or AJAX calls while logged in. If WP Ghost modifies paths for logged-in users, the cache plugin may not recognize the correct file locations.

Steps:

  1. Navigate to WP Ghost > Tweaks > Change Options.
  2. Switch off the Change Paths for Logged Users option.
  3. Save the changes and test your cache plugin’s minification process.

Enable Late Loading for WP Ghost

Late loading ensures WP Ghost loads after all cache plugins, allowing them to process paths before WP Ghost modifies them in the frontend.

Steps:

  1. Go to WP Ghost > Advanced > Compatibility.
  2. Enable the Late Loading option.
  3. Save the changes and check if the cache plugin is now minifying the files correctly.

Conclusion

WP Ghost is designed to work with most cache plugins, but in some cases, minor adjustments are needed. By following these solutions, you should be able to resolve minification issues. If one solution does not work, try the next until you find the one that works best with your specific cache plugin setup.