How To Configure Sublime Text Map Remote FTP auto Upload on Save

1

Here is an extremely useful trick that allows you to directly upload a file to remote FTP server upon saving in Sublime Text. We all know working off a live website is not a good idea. That being said, if necessary, this is how you can map a local directory to remove server via FTP/SFTP directly within Sublime Text. This would save you countless time and repetitive clicks to upload files to remove server manually. A rule of thumb is, if you find yourself repetitively doing a certain action, chances are, there are existing ways to optimize this workflow by automating the task.

Let’s get started to Enable Remove FTP Mapping from Sublime Text

First you need to install this plugin called SFTP, by going to Control + Shift + P > Package Install > SFTP

2015 03 02 1719 001 - How To Configure Sublime Text Map Remote FTP auto Upload on Save

Once the plugin is installed, you find all the available options by going to Control + Shift + P > SFTP

2015 03 02 1719 - How To Configure Sublime Text Map Remote FTP auto Upload on Save

Assuming you have a working directory that were mirroring what the remote server is, you can right-click on the directory root and go to SFTP/FTP  > Map to Remote …

2015 03 02 1721 600x414 - How To Configure Sublime Text Map Remote FTP auto Upload on Save

You will see there is a new sftp-config.json file created at the root directory. This file is only going to be used by SFTP, in here it will store all the remote FTP server credentials. You need to make sure enter the correct host, user and password (if there are any*) credential. One important key settings you need to pay attention to is “upload_on_save“, default set to false, update to true will allow SFTP to automatically upload the file you’ve just saved to remote server.

2015 02 27 17091 600x578 - How To Configure Sublime Text Map Remote FTP auto Upload on Save

Below is an example how it looks like when you set upload_on_save to true.

2015 03 02 1716 600x321 - How To Configure Sublime Text Map Remote FTP auto Upload on Save

That’s it, Sublime SFTP is free to use, but with continue usage it will prompt for license purchase from time to time. The free version offers full version capabilities as paid, but if you find this tool useful should consider supporting to the developer who created this awesome tool.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here