Wednesday, April 18, 2012

Using Notepad++ to Edit Files on the Server over SFTP


For quick tasks and transfers, FileZilla, an SFTP client, is great but manually uploading local files to the server via standalone FTP/SFTP clients can waste time if there's a lot of back and forth. By configuring the built-in SFTP client within Notepad++, you can edit files directly from the server, validate from the browser - Tools option in Firefox Web Developer Add-on gives you direct access to W3C HTML and CSS Validators - and be finished in a flash.

Notepad++, written in C++, is a source code editor, not a word processor.

SETTING IT UP


  • In Notepad++ go to the Plugins menu and select NppFTP->Show NppFTP Window.
  • Click on the "gear" icon (6th icon from the left).
  • Choose "Profile Settings"
  • Click the "Add new" button.
  • Enter the name of the new profile and click OK.
  • Enter the hostname which is the full URL.
  • For connection type choose SFTP.
  • Leave port number at 22.
  • Enter username and password.
  • For Initial remote directory, enter: public_html
  • Click "Close"

CONNECTING


Click the connection list icon is NppFTP. and choose the server you want to connect to. The first time you connect to a given server you will be asked if you trust the host key. Say yes. You shouldn't be asked again after the first time. Now you should see the directory structure on the server. Choose a file to edit and double click it. Make your edits, and Save the file. Notepad++ will send the changed file up to the server.

8 comments:

Anonymous said...

Excelent! Got it worked by simply following the instructions.

CSSBakery said...

Thanks for the comment!

Anonymous said...

worked first time for me. Great.

Anonymous said...

Is ssh connection supported?

Building Materials Online said...

Nice tool. I Love it.

Anonymous said...

what if my file requires sudo access to save

Anonymous said...

so refreshing to find a succinct tutorial that's straight to the point, as opposed to the 5,000+ word meanderings of wannabe bloggers/writers, well done sir/madam! one thing tho... sftp setting didn't work for me, wouldn't connect, i changed it to ftp and it connected in a flash!

Unknown said...

this worked for me as well

Post a Comment