WP Rocket is one of the best caching and optimization plugins available or WordPress. It comes only as a premium version and undoubtedly it will improve your site’s speed to next level. However, you have to setup the plugin with proper settings in order to improve the page loading speed. If you have purchased the plugin, here is the optimized settings for WP Rocket to speed up your site.
Learn WordPress: Check out 300+ free WordPress tutorials.
WP Rocket Settings
After installing and activating the plugin, go to “Settings > WP Rocket” section to view all the options available for speed optimization.
1. Dashboard – Get Help, Account Info
The dashboard section contains the license expiry information and links to quick actions for doing different actions. The settings contain three columns:
- Left sidebar containing various tabs to navigate and setup.
- Center section containing detailed options for each tab.
- Right sidebar showing quick actions or tutorials. If you feel the area is congested, go to “Tools” tab and disable the right sidebar section.
However, the right sidebar under “Dashboard” tab has very useful links for clearing cache, start preloading and regenerate critical CSS. If you have disabled the right sidebar then you can access all these options from the top menu bar.
From the settings point of view, you can disable “Rocket Tester” and “Rocket Analytics” options under “My Status” section. This will help to opt out from beta program and stop sending anonymous data from your site to WP Rocket’s developer.
There are FAQ, getting started and tutorial links available for you to quickly get answer to your questions. If you do not find any answer, click on the “Help” button to view more articles or send your query to the support team.
2. Cache – Basic Cache Options
From here, your actual settings start. The changes you make will be applied to your after you hit the “Save Changes” button.
- Mobile Cache – check the box against “Enable caching for mobile devices” option to cache mobile pages of your site. Leave the option “Separate cache files for mobile devices” without enabling. As clearly mentioned there, you do not need separate caching for mobile devices when using responsive themes. However, you have to enable this option when using a dedicated mobile theme using plugins like Jetpack. In addition, popular themes like Newspaper offers separate mobile theme. So, you have to enable separate mobile caching option in WP Rocket if you have enabled this in your theme settings.
Note: Mobile in WP Rocket indicates smartphones. If you want the plugin to treat tablets as mobiles and serve mobile cached pages, you have to install a help plugin from GitHub. Otherwise, WP Rocket will not cache pages for tablets and visitors from tablets will see uncached pages.
- User Cache – user cache allows you to serve cached pages for logged in users. This is useful when you have subscription based websites and many users login and view your content. Otherwise, do not enable this option.
Note: Separate mobile cache and user cache are the first two settings you have to disable whenever you have a conflict with other caching plugins.
- Cache Lifespan – WP Rocket will automatically delete all cached files after the time limit you mention in the cache lifespan. There is a good technical reason behind this automatic cache deletion setup. WordPress uses nonce which is an automatically generated key within HTML code to validate certain actions. This is nonce key is valid for 12 hours and will be regenerated again before 24 hours. In order to avoid viewing the page with expired nonce, you have to clear the cache. WP Rocket by default sets 10 hours as cache lifespan period. However, this will be too short for many sites as the plugin will delete all the cache and start preloading the pages every 10 hours. Therefore, we recommend to increase the time to 24 hours or even days if you are not frequently handling content. If you see any problems, change this setting to less than 10 hours so that there will be problems with nonces.
3. File Optimization – Optimize CSS & JS
Be careful when using setting on “File Optimization” section. This may break your site’s layout especially when you are using jQuery based theme.
- Basic Settings – enable minify HTML and optimize Google fonts options. This will help you to remove unnecessary space and comments from the HTML and reduce the page size. When you have multiple Google font families and weights, the optimization will help you to combine the requests and reduce the network cycle.
- CSS Files – enable all CSS options minify CSS files, combine CSS files and optimize CSS delivery options. Remember, optimize CSS delivery is the option to generate critical CSS path for each post type on your site. This will help you to overcome render blocking CSS issues in Google PageSpeed and other speed measuring tools. You can go back to dashboard or use top admin bar menu to regenerate critical CSS. Disable optimize CSS delivery option to disable critical CSS generation if that creates a problem for you.
- Remove jQuery migrate
- Enable “Safe mode for jQuery (recommended)” option if your theme uses jQuery.
4. Media – Lazy Load, Emojis, Embeds, WebP
Under this media tab, you can optimize settings for images and other media files like YouTube videos.
- LazyLoad – enable lazy load for images, iframe and videos and replace YouTube iframe with preview image options. Lazy load will help you to stop loading of images outside the browser’s visible screen and load them when user scrolls nearer to the images. Make sure to test whether it works properly on your site. If you find any problems with lazy loading with WP Rocket, try other plugins like Jetpack or WP Smush.
- Emoji – check “Disable Emoji” box to stop loading emoji scripts on your site. Note, this will only stop loading the emoji script that WordPress uses for compatibility purposes. Your emoji will work as all browsers natively support Unicode emoji symbols.
- Embeds – you have to enable or disable this option based on your need. We do not use embedding URLs or files on our site; therefore, we have disabled this. However, if you have the habit of pasting image/video URLs on the post editor to convert it into an image/video then you should not disable embeds.
- WebP compatibility – if you have a separate plugin to generate WebP images then enable caching of them in WP Rocket using this option. For example, if you are on SiteGround, the SG Optimizer plugin offers WebP generation option. If you have enabled WebP generation in SG Optimizer, you can also check “Enable WebP caching” option in WP Rocket.
5. Preload – Generate Cache Files, Preload Fonts
Preloading is the function of crawling and caching the pages after clearing the cache. The starting point for preloading content is your XML Sitemap and the plugin will crawl all the links inside each URL.
- Enable “Activate Preloading” option and then “Activate sitemap-based cache preloading”. WP Rocket will automatically detect the XML Sitemap generated with popular SEO plugins like Yoast SEO. Otherwise, enter the XML Sitemap URL for preloading in the text box below.
- Prefetching DNS Requests – prefetching allows the plugin to fetch the third-party domains to reduce the connection time. Enter the URLs of Google fonts or YouTube video URLs in the text box for prefetching.
- Preloading fonts – preload key requests is one of the issues you will see in Google PageSpeed when using own fonts from CSS. You can copy and paste the relative font URLs on your site on the text box to remove the issue and improve the speed.
Note: WP Rocket needs the complete URL for preloading Sitemap and prefetching DNS. However, you have to enter relative URL (ignoring the domain) for preloading fonts from your site.
6. Advanced Rules – Fine-tune Cache Rules
Advanced rules help you to maintain pages, cookies and user agents so that the plugin will never cache them. WP Rocket will automatically never cache WooCommerce cart, checkout and my account pages. Therefore, in most cases, you do not need to enter anything on this page and leave the settings as it is.
- Never Cache URL(s) – type the URLs of the pages you never want the plugin to cache. Good example, is if you have changed the WordPress login URL using security plugins, enter the new login URL in the text box.
- Never Cache Cookies – some users need cookies to dynamically change or validate content. For example, if you have cookie based login system enter the cookie ID for ignoring from caching.
- Never Cache User Agents(s) – WP Rocket will automatically fill all user agents of tablets. As mentioned above, the plugin will not cache pages for tablets using this setting. If you have enabled tablet as mobile using separate helper plugin then you have to remove all the tablet user agents from this list. In addition, you can maintain any other user agent that you want to serve uncached pages.
Related: Review of WP Rocket caching plugin.
7. Database – Optimize, Reduce Bloat
The plugin allows you to cleanup revisions, auto drafts, trashed posts, spam comments, trashed comments, expired transients and all transients. You do have an option to optimize database tables and schedule database cleanup with periodic intervals. We recommend not to setup the schedule and manually cleanup after taking database backup. Since, WP Rocket does not offer an option to backup your database, you have to use other plugins or download the database from you hosting account manually. Also, the cleanup action is irreversible, hence you should not setup automatic schedules without having a backup to restore.
8. CDN – Integrate Your CDN
If you have purchased RocketCDN subscription then enable content delivery network option here. You can add separate CNAMEs for images, scripts and CSS or use single CNAME for all files. The plugin also allows you to exclude files from serving through CDN.
- We do not recommend using RocketCDN, check out other options like StackPath.
- No CNAMEs are required if you use CDNs like Cloudflare or Sucuri. WP Rocket also offers additional add-ons for these two networks.
9. Heartbeat – Control WordPress Heartbeat API
Heartbeat API in WordPress allows you to get real-time updates like sales activities on your dashboard. If you do not need this, disable heartbeat API under this section.
Select “Control Heartbeat” option and then “Disable” for backend, post editor and frontend.
10. Add-ons – Add More Features
WP Rocket offers the following add-ons.
- Google Analytics – enable this if you use Google Analytics on your site and want to host the script locally. This will remove the render blocking and other problems in Google PageSpeed due to Analytics script.
- Facebook Pixels – enable this to host Facebook Pixels script on your site when you are using Facebook sharing plugins.
- Cloudflare – enable this add-on if you are using Cloudflare CDN.
- Sucuri – enable if you are using Sucuri caching on your site.
11. Image Optimization – Compress Your Images
WP Rocket offers another plugin called Imagify for optimizing your images. However, this is a limited features plugin that you need to upgrade for getting complete features. Imagify allows you to compress 25MB size for free account per month and needs premium upgrade for getting additional quota. If you have smaller site, install Imagify plugin and follow the setup under that plugin’s settings page.
As a premium customer of WP Rocket, we feel this is an unnecessary upselling and should not be part of the settings page. You can simply ignore this settings page and use other plugins like WP Smush or SG Optimizer for SiteGround user.
12. Tools – Import, Export, Rollback
Tools section has three useful options:
- Export settings – click on “Download Settings” button to download the complete plugin settings as a JSON file.
- Import settings – use the downloaded JSON file to import the settings with single click.
- Rollback – if anything goes wrong after updating the plugin to newer version, you can rollback to the previous version by clicking the “Reinstall Version x.x.x.x” button.
Import and export are useful if you want to use the plugin on different site and upload the settings quickly. In addition, you can always keep a download of the settings of current working version. In case of any problem when changing the settings, you can simply import the settings instead of rollback the plugin.
Under this section, you can find few useful video tutorials. You can view these videos as a pop-up inside the admin dashboard without leaving the website.
WP Rocket offers so many settings to optimize your WordPress site. You have to be careful in enabling the required settings to get the most out of the plugin. We hope the above explanation is useful for you to setup the plugin.