I know how important page speed is. When I could use WP Rocket for Divi with my Kinsta hosting I jumped right in.
Getting a fast loading page with Divi and WordPress is made significantly easier by using WP Rocket.
WP Rocket is a premium cache tool and is one of my only choices for cache.
This is due to me using Kinsta as a host provider. They limit what I can and cant use for my cache.
Kinsta have a good cache tool already built in so that has never been a problem.
Recently Kinsta and WP Rocket worked together to bring the magic of using these two amazing services together for my Divi powered WordPress site.
It took me a while to configure the plugin so in this article I thought I would go over what I did and why I did it so you too can get some amazing results with your WP Rocket for Divi configuration.
The Installation of WP Rocket for Divi
To get start simply upload the plugin as you would any other. Once installed you active it and are taken to a configuration page.
Once you are on the dash board all I turned on was the sharing of analytics. I only turn this on for my personal sites that I own and am director for. If it is a client site I would suggest you get your clients permission before sharing this data.
On the left side of the WP Rocket panel is a menu and I simply worked my way down this menu from top to bottom.
In the cache area I have a very simple interface, which I like.
I’m not sure if this is more simple because of the integration with Kinsta Cache so if you get something else, it may be because you aren’t on Kinsta.
The first question is around having a separate cache for mobile devices. This is for those users who have a mobile specific theme. I don’t as I am using Divi which is responsive out of the box , so all I did was select that I want a mobile cache.
I then enable the cache for logged in users. We have a membership on this site so slowing down our logged in experience is a bad idea. If you don’t have a membership site you don’t need to turn this on.
The Cache lifespan is set to 10 hours, I left mine as that default. I may increase it in the future but we do updates regularly on our site and that means most days someone from the team edits content or code. If you are doing the same its probably a good idea to stick to the default.
This is also a good idea if you are doing daily plugin updates.
On any item you can go to the help section to get more information.
In the basic settings I turned everything on. I Minify my HTML, Combine my Google Fonts and remove query strings from resources. I would recommend to anyone that is using this to use the same settings.
When you minify your HTML to are basically reducing white space and not having all that space downloaded as file size. Yes, empty space in a file is not empty space.
Combine of Google fonts is another handy option as quite often you downloading a google font takes multiple requests and can be one of the biggest issues to slow down your site.
In the CSS files area I only select to minify the files. When using Kinsta hosting you have HTTP2. HTTP2 has all my files download at the same time so combining files is actually slower than having them separate. It wont help your page speed score but it will help your download speed.
I then turn on the option to optimise my CSS Delivery. At this point my site was running pretty fast. I have minified 2 big reasons for a slow site after your images. That is the HTML size and the CSS file size.
I turned everything on at first an my site broke. all my forms disappeared and my blog stopped working. That was a BIG problem.
What was the issue?
Basically the defer flag on loading was the problem as that was the last setting I had used.
I added the Salvatore script to my ignore section and I was still stuck with no forms. You can learn more about this here – https://docs.wp-rocket.me/article/657-divi-theme
All my gravity forms had CSS that was hiding them. DOH.
Making my own plugin
No Matter what I did in Gravity Forms or WP Rocket I could not get it to work so I had to write my own little plugin.
You can find it here : https://github.com/DiviFramework/wp-rocket-static-exclude-defer-js
This makes the code for gravity forms and jQuery load as normal and not be in the defer cycle.
This solved the problem and I was able to get the site loading very fast at this point. (under 1 second).
Most days my site loads in less that 1 second. That is fantastic.
Suggested reading: When to use Gravity forms on your Divi Website
In this page I turned on lazy loading for images only. I have a VR tool that often has issues with cache tools and since it uses an iframe / embed method I decided to leave this one unchecked.
I disabled the Emoji using this and removed some code from the child theme I added a year ago to do this – which is a nice saving.
Finally I disable WordPress embeds – I don’t use them so it was OK for me to turn this off. Keep in mind that if you use an embed, you may want to either reconsider why or not turn this on.
I do want to point out here that I use WP Smush for my image optimisation. If you want image optimisation on your site you wont get it from WP Rocket. You will need another tool. More than half of the page speed issues I help clients with is due to image optimisation so make sure you have that sorted to get the best results.
The preload interface for WP Rocket is really very technical. I was very interested in what it can do and how it could work.
After looking over it, i realised it was not really going to help me that much but it did have DNS Prefetch. DNS Prefetch is a really important way to get your pages loading faster.
I added my Google Tag Manager domain, and Google Font Domains. You can see the items in the below GIST.
At this point I was completed in my setup. I currently use WP Rocket for Divi and its giving us consistent load times under 1.4 seconds for the first page load.
The Advanced rules section was not required and the Database and CDN tools were also not required. I use WP CLI for my database management and cleaning out duties. These are managed by Cron Jobs so these are simply not needed on my site.
We are thinking of reviewing the CDN in the future but we have other areas of concern on the site right now that are more important than a CDN.
you may also be interested in 7 ways to make your woo-commerce website faster
Why did I choose WP Rocket for Divi?
I have used a lot of the cache plugins. Our decision was based on 3 things,
- Server Support – your server has a lot to do with your page speed success so using WP Rocket for Divi on Kinsta was a good step forward.
- Our Plugins – I found Hummingbird to be excellent but it had no way of working with my VR Toolkit with its CDN cache. It also turned the cache on by itself and broke the page so that was removed.
- Plugin Support – I have used free options before but wanted a premium solution. w3 total cache and Auto Optimise were good but didnt really hit the spot for our requirements.
WP Rocket for Divi is a great combination. With this plugin we also have a great way to support gravity forms so for me its a good solution that gives fantastic results.
What Cache plugins do you use for your WordPress site?
If you want help with other options for Divi Cache let me know in the comments. We have used a heap of them and Im happy to comment or even share an article on other options.
I’ve used Hummingbird from WPMU Dev, Auto optimise and the w3 total cache with site ground.