Clearing the Divi Static CSS Files Cache is an effective way to fix various design issues. I’ve written about hidden ways to clear the Divi CSS Cache before. In this post, I’ll show you how to schedule the Divi Cache to be cleared weekly, daily, hourly or at any interval you like – automatically.
Join +3 054 subscribers!
Surprise! The Divi CSS Cache Is Already Cleared Automatically – On A Monthly Basis
Not many, if any, Divi users are aware of that the Divi Static CSS Files Cache is cleared automatically once a month by default. This is triggered by a so called Cron job with the hook et_core_page_resource_auto_clear (et is short for Elegant Themes, the developers of Divi).
Does it sound complicated? Well, this is the same system that is used to preform most scheduled events in WordPress, like checking for recent plugin updates or scheduling a post to be published at a certain date and time. Although the WP-Cron system is far from perfect, it’s the best method we have for scheduling events in WordPress.
Finding The Cron Job That Clears The Divi Static CSS Cache Automatically
The easiest way to se which Cron jobs that are running on your website is to install a free plugin like WP Crontrol (pun intended, I guess). It lets you see all Cron events in your WordPress installation and their recurrence and the time for the next run. Here’s the information about the et_core_page_resource_auto_clear Cron job on my Divi test site:
In the last column, you can see that the Divi CSS cache is scheduled to be cleared automatically “Once Monthly” by default.
The good news is that you can use WP Crontrol to change the interval that the Divi Cache is automatically cleared. Here’s how:
Scheduling Divi To Clear The Static CSS Files Cache, step by step
- From your WordPress dashboard, go to Plugins » Add New and search for WP Crontrol from John Blackbourn & crontributors
- Install and Activate the plugin (this will not change any of your site settings)
- Go to Tools » Cron Events to see all Cron jobs on your WordPress installation
- Scroll down to et_core_page_resource_auto_clear or search for the Hook Name et_core in the top right.
- Hover the row and click the Edit link
- Tick the checkbox Now (or the time of the day that you want the purge to happen) next to Next Run
- Click the dropdown to the right of Recurrence to change the automatic Divi CSS Cache clearing from Once Monthly to Once Weekly, Once Daily, Twice Daily or Once Hourly.
- Click the blue Update Event button to save your changes.
That’s it! Go back to Tools » Cron Events and refresh the page so see the result.
If you want to to add your own custom periods, just head over to Settings » Cron Schedules and add your custom intervals. You can be very granular since the intervals are set in seconds.
That’s all for today!
I hope that you enjoyed this post. Subscribe to DiviMundo on YouTube and join our Facebook group for more crisp content on WordPress and web design.
👉 Related post: Hidden Ways To Clear The Divi Static CSS Cache Faster
👉 Related post: How To Disable Divi Static CSS Cache On Single Pages & Posts
👉 Free course: Create a website from scratch with Divi
0 Comments