Sublime Text Editor is a popular IDE for web development. I personally using this editor. It’s simplicity, rich snippets provide a good experience for its users. Sublime Text has a powerful feature called Packages which makes developers life easy. One should use packages as they provide feelings of advanced programming and additionally they save us a lot of time.
As a programmer, we always do the job of file transfer, move a local project on the remote server. Filezilla is a popular software which allows us to transfer files from a local server to live server. We can use cPanel provided by hosting service as well for the uploading files.
Similar to Filezilla and cPanel we can use Sublime Text for uploading file on a server. Sublime Text has a package called SFTP which does a file transfer to the remote server and much more.
How to Install SFTP Package?
If you don’t know about installation of packages in Sublime Text please go through our tutorial How to Install Packages in Sublime Text so you can perform further steps.
- Press the ctrl+shift+p on Windows and Linux, and cmd+shift+p on OS X.
- Select Package Control: Install Package, it will load packages and populate it.
- Type SFTP and hit enter.
Once you press enter, Sublime Text will install the SFTP package in their environment.
How to Use SFTP Package?
In order to use this package, make sure your local and server directory structures are same. When you are uploading any file it will search for same file location on the remote server and perform the operation.
Open the file in Sublime Text which you wish to upload. Right click->SFTP/FTP->Map to Remote.
It will open the file
sftp-config.json. Enter your remote server details and keep this file in your root directory. You need to enter these details only first time.
Now you will easily perform your preferred operation on just clicks. Right Click->SFTP/FTP->You will see all options. Select the operation you want and a package will connect to the remote server automatically and do the assigned task to them.
For instance, to upload your files on remote server Right click->SFTP/FTP->Upload File.
There are a lot of options they provided like you can edit the remote file, sync the local and remote folder, download the remote file and much more. You can give try to each option.
Note: As this package interacts with the remote server and you are using it first time then please do the operations carefully. Do consider taking backup of files until you get a good command over SFTP package.
If you liked this article, then please subscribe to our Youtube Channel for video tutorials.