Review and Upload Scripts to Linux with WinMerge and WinSCP

Deploying a changed script to a live server is a moment where a small mistake has large effects. A simple two-step routine reduces the risk: review the difference, then upload the reviewed file.
Step 1. Review locally
Keep a copy of the version currently running on the server. Download it with WinSCP to a folder, for example
C:\Deploy\live\. Put your new version in C:\Deploy\new\.
Open WinMerge and compare the two folders. Check every changed file. Pay attention to paths, hostnames, permissions and anything that runs as root.
Step 2. Upload with WinSCP
- Connect to the server with SFTP. Use key-based login if the server supports it.
- Open the target folder on the remote side and the reviewed folder on the local side.
- Select only the files you reviewed and upload them. Do not use a folder-wide sync you have not looked at.
- Check the transfer queue for errors before you close WinSCP.
Step 3. Verify on the server
Confirm the file’s checksum or modification time on the server. Run a configuration test if the service has one, and check the service logs after the restart.
Step 4. Keep the backup
Leave the previous version on the server, renamed with the date, so that you can roll back in one step.
See the secure file transfer checklist for the settings to check first.