Note: This article is just a basic guide. If you have any issues with the configuration of the plugin, you will need to contact WP Rocket support directly.
This guide will assist in setting up the WP Rocket plugin for your sites using Shoptimizer. After completing these steps you should be able to achieve an excellent PageSpeed score.
If you don’t use WP Rocket we have an alternative Shoptimizer speed guide available which uses only free plugins.
Once you’ve installed and activated WP Rocket follow these steps. Your setup should resemble exactly the instructions and screenshots below.
Step 1: Cache
Go to Settings > WP Rocket
and from the left menu click Cache:
Ensure that only Enable caching for mobile devices is active.
Step 2: File optimization
Click on File Optimization tab.
Under the CSS Files heading:
a) Enable Minify CSS files
b) Enable Optimize CSS delivery
Under Excluded CSS files:
commercekit-order-bump-wrap
Under CSS safelist:
When Optimized CSS delivery is enabled you will need to exclude the following, in order for the product gallery to work correctly:
(.*).swiper-wrapper(.*)
Under JavaScript Files:
a) Enable Load JavaScript deferred and exclude:
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js
b) Enable Delay JavaScript execution and leave the rest as is.
Step 3: Media
Click on the Media tab. Ensure that these settings are both enabled:
a) Enable for images
b) Add missing image dimensions
Inside Excluded images or iframes add: custom-logo
Step 4: Advanced Rules
The final configuration step will be whitelisting pages which should be excluded from being cached – such as the cart, checkout and wishlist. Go to Advanced Rules tab and add those urls.
Note that these URLs may differ on your own site (e.g. if your store language isn’t English) so double-check them.
/wishlist
/cart
/checkout/(./)/
Step 5: Test with PageSpeed
When you have completed these steps – open your site in an incognito browser to first flush the cache. And then test it in Google PageSpeed.
Our scores after the above configuration setup was applied on a “basic” web host were as follows.