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:
lessc.inc.php copy/paste the contents from github.com/leafo/lessphp/
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
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.