Stopped using the WPCode Lite plugin because it no longer generates UCSS for LiteSpeed Cache.
How it started
WPCode Lite is a convenient plug-in that manages CSS, PHP, and JavaScript separately for each function and enables/disables each of them independently.You can also determine the conditions under which they are applied, so you can make detailed adjustments such as applying them only to the top of the blog or individual post pages.
The amount of style.css and functions.php in the Twenty Twenty Five theme was growing, and I was hoping that by dividing them individually and registering them with the WPCode Lite plugin, future management would be easier.
LiteSpeed Cache UCSS not generated
When I moved all the contents of style.css and functions.php to WPCode Lite and enabled it, it worked fine.I intended to continue using it with this.
However, LiteSpeed Cache’s UCSS is no longer being generated.In the Chrome Developer Tools, you can see if the LiteSpeed Cache’s UCSS is reflected or not.

When UCSS is generated and reflected, this green check will appear.

If UCSS has not yet been generated, “UCSS in queue” is displayed.
This time, a red cross symbol was displayed.It was the first time I saw this symbol too.
It was only after we started using the WPCode Lite plugin that UCSS was no longer reflected.
Changing the header to show all applicable conditions did not eliminate this phenomenon.
The LiteSpeed Cache plugin could not handle the dynamically added CSS.It means that they were incompatible.
Cope
After weighing WPCode Lite’s management of CSS, etc. and LiteSpeed Cache’s optimization of pages, I chose the latter.
All CSS, PHP, and JavaScript that were moved to WPCode Lite are now back in style.css and functions.php.
We also considered the possibility that the generated UCSS might not be optimized, so we erased all of them once.All caches were also erased.
This article is written after confirming that LiteSpeed Cache’s UCSS has been successfully generated.
Musubi
I think this phenomenon is the result of incompatibility between the plug-ins: WPCode Lite, which places CSS and PHP in the right places, and LiteSpeed Cache, which optimizes the placed CSS and JavaScript.
It is unfortunate that WPCode Lite cannot be used.We will address this by writing a separate file for each function, with comments well documented.We will also look into the possibility of separating them into separate files.
Leave a Reply