I do a lot of small fixes on client sites hosted on a VPS in Canada. Because of PIPEDA, BC rules and Quebec Law 25, I try to avoid copying client data onto my laptop, so I want a clean way to work remotely from Sublime Text. What I do now:
- Keep the code in Git and edit locally, then deploy with a pull on the server.
- Use an SFTP package only for quick one-off edits, never for whole projects.
- Connect with SSH keys and an SSH config alias instead of saved passwords.
- Never edit live production files directly; I use a staging copy on the same server.
- Exclude uploads, logs and databases from any sync so client data stays on the server.
- Watch line endings and file permissions, which caused most of my odd bugs.
- Use a terminal package or a separate terminal for running commands on the server.
Is there a better workflow people here use for remote editing, such as mounting the server with sshfs?