1

I'm in a situation that I'm to use my local machine (Win7) to do some LESS styles and then compile it into a single style.css file.

What I want to know is what's the best method on pushing the style.css itself to a wordpress blog I host on a shared hosting service without the hassle of manually uploading the style.css every time I compile it. It would be most convenient if there's a method to "sync" the file to the shared hosting automatically.

I don't mind installing another Win7 application if needed, as long as I can achieve the auto-sync method.

1 Answers1

2

I would use cURL in a batch file that you just run and it FTP's the file. Not sure how you're compiling the CSS currently but you should be able to add it to the end of that process.

First answer I could find for cURL: How do I install/set up and use cURL on Windows?

curl -T %filename% ftp://%ftphost%/%ftpdir%/ --user %ftpuser%:%ftppass%
Community
  • 1
  • 1
ryachza
  • 4,195
  • 16
  • 28
  • I'm using Koala app for windows: http://koala-app.com/ I'll try installing cURL on windows and go back after trying it. – 58YtQ2H83m17838963l61BU07Y8622 Aug 27 '15 at 11:15
  • @JetGervacio Okay yeah I'm not sure how you would integrate it with a GUI unless they expose that option. There shouldn't really be any installation - just a curl.exe that sits somewhere and you execute. I added the command to upload to the answer. – ryachza Aug 27 '15 at 11:21
  • 1
    @JetGervacio I'm not familiar with LESS but when using SASS I usually compile things via batch files. Something like described at http://lesscss.org/usage/ should work. I prefer that way so that I can configure everything once, and then know that every time I run it the output will be consistent and I don't forget steps or something. – ryachza Aug 27 '15 at 11:27