How to fix Autoptimize & Critical CSS cron issue

Critical CSS (either through Autoptimize with your own Critical CSS account or through Autoptimize Pro which includes Critical CSS) requires WordPress’ scheduling system to function to be able to communicate with criticalcss.com on a regular basis. In some cases this does not work and you might see this notification in your WordPress dashboard;

It looks like there might be a problem with WordPress cron (task scheduling)

If this is the case, go through these steps to troubleshoot:

  • install the “WP Crontrol“-plugin and go to Tools -> Cron Events
  • WP Crontrol will warn if “cron” (another name for job scheduling) is disabled
  • Look for “ao_ccss_queue” and check the “next run” time/ date.
  • If the has a “next run” date is in the past, there is an issue with your site/ host’s WordPress cron.  Some hosts’ info on the topic can be found for WP Engine here , here for BlueHost, here for HostGator and lastly here for SiteGround.
  • Alternatively you can click on “manually process job queue” in the jobs pane in Settings -> Autoptimize -> Critical CSS

Autoptimize 2.7; final stretch, testers needed!

Autoptimize 2.7 is in the final stages and the beta version can as of now be downloaded from https://downloads.wordpress.org/plugin/autoptimize.zip
Main new features:

So who want to test? Feedback in the comments please! 🙂

New: Autoptimize CriticalCSS.com Power-Up released!

The Autoptimize criticalcss.com Power-up has just been released to the wordpress.org plugin repository!
This plugin integrates with and extends Autoptimize. It integrates with criticalcss.com, a premium service which uses a “headless” browser to extract real critical CSS. That way it  fully automates the extraction of high-quality critical CSS and the creation of rules for that critical CSS. It can work 100% automated, but also allows semi-automated jobs (where you enter a URL for which you want a specific rule, the power-up will do the rest) and manual rules (where you create the rule and add critical CSS yourself).

Want to test automated Critical CSS creation?

Over 3 years ago Autoptimize added support for critical CSS and one and a half year ago the first “power-up” was released for Critical CSS rules creation.
But time flies and it’s time for a new evolution; automated creation of critical CSS, using a deep integration with https://criticalcss.com using their powerful API! A first version of the plugin is ready and the admin-page looks like this (look to the right of this paragraph);
The plan:

  1. beta-test (asap)
  2. release as separate plugin on wordpress.org (shooting for April)
  3. release as part of Autoptimize 2.5 (target mid 2018)

This new “criticalcss.com” power-up has been tested on a couple of sites already (including this little blog of mine) and we are now looking for a small group of to help beta-test for that first target.  Beta-testers will be able to use criticalcss.com for free during the test (i.e. for one month). If you’re interested; head on up to the contact form and tell me what kind or site you would test this on (main plugins + theme; I’m very interesting in advanced plugins like WooCommerce, BuddyPress and some of the major themes such as Avada, Divi, Astra, GeneratePress, … ) and I’ll get back to you with further instructions.
 

Autoptimize Power-Up sneak peek; Critical CSS

So although I am taking things rather slowly, I am in fact still working on Power-Ups for Autoptimize, focusing on the one most people were asking for; critical CSS. The Critical CSS Power-Up will allow one to add “above the fold”-CSS for specific pages or types of pages.
The first screenshot shows the main screen (as a tab in Autoptimize), listing the pages for which Critical CSS is to be applied:

The second screenshot shows the “edit”-modal (which is almost the same when adding new rules) where you can choose what rule to create (based on URL or on WordPress Conditional Tag), the actual string from the URL or Conditional Tag and a textarea to copy/ paste the critical CSS:
ao_critcss_edit
The next step will be to contact people who already expressed interest in beta-testing Power-Ups, getting feedback from them to improve and hopefully make “Autoptimize Critical Css” available somewhere in Q3 2016 (but no promises, off course).