Jump to content

[SOLVED] LESS CSS on Server without Node.js.................anyone?

Vineet Sawant

Recommended Posts

Hello everyone,

I started learning LESS CSS finally today(yeah...I know too late, but I was confused whether I should learn SCSS or LESS), and have instantly fallen in love with it. Thinking of plain CSS coding seems like so last century now.

After completing a small project, now comes the deployment part, that got me thinking how do I compile less on server???

My hosting is a shared hosting and doesn't have Node.js support nor Rhino. I wish to know if anyone has done this before?

Is there a possibility that I can directly put compiled CSS on server?

I've read about lessphp but I'm not sure how good that is for production level use.

Would love to hear your experience. If possible please guide me through this.

Have a great day & wish you all a very Happy Diwali :)

Link to comment
Share on other sites

Alright, so I was being dumb when I asked this question.

Good news for me, compiled CSS files can be used. That answers my question.

Since following wasn't working for me, it got me thinking compiled CSS doesn't work.

<link rel="stylesheet/css" type="text/css" href="css/style.css"> 

Then I changed above line to following:

<link rel="stylesheet" type="text/css" href="css/style.css">

And it works...! :)

Days of being dumb!

Link to comment
Share on other sites

  • 6 months later...

Hello Vineet!

It is sure possible to compile LESS on PHP server and there are basically two projects for this one:



Leafos is more powerful when it comes to speed but it's not at active development anymore so it's not fully compatible with recent versions of LESS.

Downside here is ofcourse that we don't want to compile on every page load and caching is mandatory so there is always some overhead compared to static css file. So if you can use Node.js at your development environment and upload compiled css-files to server it's sure more prefeffed way.

If you wan't to give a try we have build custom PHP compiler that uses oyejorges processor for LESS files and it works quite smoothly on live server also: https://github.com/BlowbackDesign/BMin

  • Like 2
Link to comment
Share on other sites


  • Create New...