Reputation: 1
I'm using WP-Rocket to optimize my site speed with using Remove Unused Css functionality in Wp-Rocket. but somehow it's not generating critical CSS and not removing Unused CSS
First it's showing wait for 80 seconds After that it's showing The Used CSS of your homepage has been processed. WP Rocket will continue to generate Used CSS for up to 100 URLs per 60 second(s).
I also checked with WP cron Event
plug-in but it's showing WP Rocket Remove Unused CSS pending jobs
I'm using cloudflare and Wordfence for security can it impact WP-Rocket?
I also tried with Disable Cloudflare and learning mode in Wordfence.
I tried with clear and preload cache
and clear used css
multiple times but it's not working.
Upvotes: 0
Views: 1600
Reputation: 65
Use your server's cron to erase the used-css
folder and your webserver's user to clean the cache using WP CLI, this way the used-css
is cleaned.
example commands:
$ sudo rm -rf /[website dir root]/wp-content/cache/used-css
$ sudo -u www-data /[website dir-root]/wp --path=/[website dir-root]/wp rocket clean --confirm
Upvotes: 0
Reputation: 351
Cron should be running properly. This helps the action scheduler to properly process queued jobs for Remove Unused CSS.
User a server-side cron usually helps.
For Cloudflare and Wordfence, they might be blocking requests coming from the Remove Unused CSS crawler.
You will need to allow IPs related to the service. They can be found here - https://docs.wp-rocket.me/article/1628-which-ip-do-i-need-to-allow-for-wp-rocket
Upvotes: 0