Compile LESS with Coda

Coda 2 doesn’t compile Less natively – as nice as it would be. There’s a plugin that does it, however at time of writing this, it doesn’t work for me (El Capitan PB2 / 2.5.11) and crashes the app.

When you’re working with shared hosting, where it’s nearly impossible to do anything to the server, it makes working with server-side Less kind of a pain. Here’s a way I found to automatically compile Less server-side after saving the file while using Coda 2.

In your remote site, have the following:

In copy/paste the contents from

In lessc.php add:

Coda 2 has a handy default feature that refreshes your split preview window every time you save your split view file. We’ll take advantage of this making the preview window compile the newly saved /style.less file.

Simply split your /style.less page with a preview window set to the /lessc.php file on your server. Every time you save the .less file, Coda 2 will auto-execute the PHP Less compiler. Ta’da! Now hitting cmd+s on the keyboard uploads your Less file and compiles it.

Note: This isn’t the best way to compile, but it’s great if you’re working off of cheap shared hosting, or having to do something quick.

Leave a Reply

%d bloggers like this: