I would advise anyone not familiar with page editing on your local computer and uploading changes to make sure you do not overwrite the old file until it has been renamed. Here’s how I do it:
1) when I download a file to be edited (say myfile.php), I make a copy of it and save in the same folder as myfile-orig-date.php.
2) make edits to myfile.php
3) just before uploading the modified file, use your FTP program to rename the old file on the server to myfile-old-date.php
4) upload the modified file myfile.php
Now if the new file is totally fubared, you can delete it and remname the “old” file in order to restore things quickly.