---
title: CSS Generation Issues
description: "Troubleshoot Critical CSS and Remove Unused CSS in Powered Cache Premium: status labels, errors, license, firewall and background jobs on WordPress."
url: "https://poweredcache.com/docs/css-generation-issues/"
updated: "2026-12-02"
category: Troubleshooting
---

# CSS Generation Issues

Critical CSS and Remove Unused CSS are generated by the Powered Cache CSS service in the background. When generation does not start, never finishes or reports errors, the cause is usually the license, a blocked connection or the background job runner. This guide explains the status panel and how to fix each problem.

**Available in:** Powered Cache Premium
**Where to find it:** Powered Cache → File Optimization, **CSS Optimization Status** panel
**Requires:** An active Premium license and a publicly reachable site for Remove Unused CSS.

## How generation works

Both services use sample pages of your site, such as the home page, a post and an archive, and run as background jobs with Action Scheduler. They work differently, which matters when you troubleshoot:

- **Critical CSS:** your site loads each sample page itself, collects its HTML and the stylesheets from your own domain, and sends them to `css.poweredcache.com`. The service never connects to your site.
- **Remove Unused CSS:** your site sends the page address to `css.poweredcache.com`, and the service loads the page from your site like a visitor. Your site must be reachable from the internet.

Generation starts when you click **Regenerate**, when you use **Purge All Cache**, and when you switch themes. Each request to the service waits up to 45 seconds and is retried once after a network error, an HTTP 429 or a 5xx response.

## Read the status panel

The **CSS Optimization Status** panel shows one card for Critical CSS and one for Used CSS, while the related setting is on. Each card shows **Last run**, **Successful runs**, **Errors**, **Queued**, the last **HTTP** status and the **CSS size**.

| Status | What it means | What to do |
| --- | --- | --- |
| **Waiting for first run** | No generation has run yet. | Click **Regenerate**. |
| **Processing** | Jobs are queued or running. The card shows a line such as *3 queued item(s), 1 currently running.* The button shows **Generating**. | Wait. If the numbers do not change for a long time, see [Generation stays in Processing](#stuck). |
| **Healthy** | The last run completed successfully. | Nothing. |
| **Needs attention** | The last result was an error. The card shows the error message and the page it happened on. | Fix the cause from the [error table](#error-messages), then click **Retry generation**. |
| **Unavailable** | A compatibility rule turned the service off, for example *Disabled to avoid conflicts with …* when another plugin already provides Critical CSS. | Turn off the overlapping feature in the other plugin, or keep using it there. See [Other optimization plugins](/docs/plugin-and-theme-compatibility/#optimization-plugins). |

If a card says *Enable and save the related setting before regenerating.*, turn on **Critical CSS** or **Remove Unused CSS** and click **Save Settings** first. The same checks appear in the [Optimization Advisor](/docs/optimization-advisor/), for example *Last generation needs attention.* or *Generation is in progress.*

## Error messages

| Message | Cause | Fix |
| --- | --- | --- |
| *A valid license is required to generate CSS optimizations.* | The license is not active, expired, or could not be checked. | Check Powered Cache → License. See [License issues](/docs/license-issues/). |
| *CSS optimization is already running.* | Jobs for this service are still queued or running. | Wait until the card leaves **Processing**. |
| *CSS optimization could not be queued. Please try again.* | The background job could not be created. | Try again. If it repeats, check Action Scheduler as described [below](#stuck). |
| *This optimization is unavailable for the current site configuration.* | A compatibility rule turned the service off. | See the **Unavailable** status above. |
| *HTML and CSS could not be extracted from …* (Critical CSS) | Your site could not load its own page: the request failed, timed out, or did not return status 200. | See [Your site cannot load its own pages](#loopback). |
| *CSS could not be extracted from …* (Critical CSS) | The page loaded, but no stylesheet from your own domain was found in its `<head>`. | Check that your theme loads its stylesheets in the head. Stylesheets from other domains are not used. You can add files in [Critical CSS Additional Files](/docs/critical-css/#critical-css-additional-files). |
| *Unexpected response from CRITICAL service* or *… UCSS service. HTTP Code: …* | The service answered with an error status. For Used CSS, a 4xx code often means the service could not open your page. | Check the **HTTP** value and the page shown on the card. Make sure that page opens for logged-out visitors, then see [Firewall and public access](#firewall). |
| *Empty response from … service* | The service returned no CSS. | Retry. If it repeats for the same page, check that the page has visible content and styles. |
| *Generation was requested but no queued work or completion was found. Try regenerating this service.* | Generation was started more than two hours ago, but no job is queued and no result arrived. | Click **Retry generation**. If it happens again, see [below](#stuck). |

The service can also return its own message, which is shown on the card as is.

## Your site cannot load its own pages

Critical CSS needs your server to request your own pages over HTTP. This fails when:

- the site is protected with a password (HTTP authentication), as many staging sites are;
- the SSL certificate is self-signed or expired, so the request is rejected;
- a security plugin or firewall blocks requests from your own server;
- the page is slow to build and the request times out.

WordPress' own **Tools → Site Health** reports failing loopback requests too. Fix the cause there, then retry.

## Firewall and public access

For Remove Unused CSS, the service must be able to open your pages:

- The site must be public: not on your computer, not behind a password and not showing a maintenance or coming-soon page to logged-out visitors.
- Firewalls, security plugins and bot protection must allow the service. Add the addresses from [Service IP addresses](/docs/service-ip-addresses/) to your allowlist.
- Your server must be allowed to send HTTPS requests to `css.poweredcache.com`. This applies to Critical CSS as well.

## Generation stays in Processing

Generation jobs run with Action Scheduler, which WP-Cron starts. If jobs never run, the counts on the card do not change:

1. Go to **Tools → Scheduled Actions**, open the **Pending** tab and search for `powered_cache_critical_css` or `powered_cache_ucss`. Many old pending actions mean the runner does not run.
2. Check the **Failed** tab for the same actions. The log of each action shows the error.
3. In Powered Cache → Advisor, check the **Background jobs** and **WP-Cron** checks. If `DISABLE_WP_CRON` is set, a server cron job must call `wp-cron.php` regularly.

The same checks help with preloading. See [Preload is not running](/docs/preload-not-running/) for details on Action Scheduler and WP-Cron. With Premium, you can also generate CSS from the command line with [WP-CLI](/docs/wp-cli-commands/#criticalcss), which shows errors directly.

## Get more details

Turn on the [debug log](/docs/debug-log/) and start generation again. The log records each page sent to the service, retries, errors and the size of each saved file. When you contact support, include the error message, the HTTP value and, if the Advisor shows one, the request ID.

## Related docs

- [Critical CSS](/docs/critical-css/)
- [Remove Unused CSS](/docs/remove-unused-css/)
- [Service IP addresses](/docs/service-ip-addresses/)
- [CSS compatibility safeguards](/docs/css-compatibility-safeguards/)
- [License issues](/docs/license-issues/)
