Using LESS with Assetic without Node.js

If you want to use Assetic with LESS support in shared hosting or in a server without node.js you might want to try lessphp.


The installation is quite simple.

  1. Add lessphp to your Composer dependencies (php composer.phar require oyejorge/less.php)
  2. Update your Symfony configuration (usually app/config/config.yml):

  3. Include your less files via twig into your templates, and you’re done!

Keep in mind that lessphp may not include all the new features of lesscss but it is possible to use it in most situations.

Related articles:

  • [How to use Assetic in Shared Hosting][3]