roborourke / wp-less

Provides a LESS compiler compatible with wp_enqueue_style() for rapid CSS development in themes and plugins.
MIT License
217 stars 55 forks source link

WP Less Garbage Collection bloating DB #58

Closed WazzaJB closed 10 years ago

WazzaJB commented 10 years ago

Hi there,

I have been using WP-Less for a while, and this issue has plagued me. For some reason the database is getting bloated in wp_options under the cron field, a serialized array is getting ridiculously large because of a 'wp-less_garabage_collection' value that is constantly being added.

This is actually forcing WordPress to crash under a "maximum execution time exceeded".

Thanks!

roborourke commented 10 years ago

Thanks Warren, sorry for the confusion but I think you might be using the wp-less plugin by @oncletom on the wordpress.org repository, also found here: https://github.com/oncletom/wp-less

The plugin in this repo doesn't have any interaction with the database at all.

WazzaJB commented 10 years ago

Well don't I feel like an idiot. Thanks for that!

Also, what are the differences between this and that? I should be able to switch between them seamlessly shouldn't I?

If I wanted to incorporate this into my theme instead, how would I go about that?

Thanks for the quick response!

roborourke commented 10 years ago

Hi Warren,

No problem, I'm too lazy to rename this one! I think the other plugin has an admin editor UI for LESS and a few other bits. This one is much more bare bones and designed to work as an include initially before it was made to work as a plugin as well. I'm not sure if the other one supports add_editor_style() or not, this one does.

You can use this plugin just as an include in your theme, so include the wp-less.php file within your functions.php. Keep in mind though that you'll need to run composer on the folder, otherwise you'll have to download the phpless library separately and create the appropriate folder for it. There are installation instructions on the README file.

It works just looking enqueued stylesheets, if they have the .less extension then it'll parse them. I would've thought it would just work as both plugins use the same phpless library but you never know til you try!