The official blog of Weebly Tricks
How To Save Your Weebly Files Before Editing Them And Restore Them [if Original Theme Files] If You Didn't
If you intend to edit the back-end files (e.g., html, css) of your Weebly site, which are accessed via Design>Edit HTML/CSS, it is good practice to save each file before you make any changes to them.
By saving each file you intend to edit before actually editing the file, you're creating insurance. Let's say you make a mistake in the "no-header.html" file and you've already clicked "save". You didn't realize the mistake until you published the site. No worries! You saved the "no-header.html" file before editing it. All you have to do now to remove the mistake is simply locate the "no-header.html" file you saved to your desktop, copy it, and then replace the entire "no-header.html" file on your site's back-end with the file you saved. Default file restored! Site saved.
If you don't save your files before editing them, and you make a mistake while editing, you won't be able to return to the file's original coding before you edited it unless you have an exceptional memory. If your site's files have been edited before, and this is your second plus time editing your site's files, you have no way of returning to your customized file. This is why it's important to save each file before editing them.
However, there is a way to restore untouched and unedited site files. Those who edited already customized site files have no way of restoring the customized files. Your only solution is to restore your theme's default files. All of this will be discussed later.
Saving the files
You don't have to save every single file on the back-end of your Weebly site -- just the ones you intend to edit. The process itself takes no more than 20 seconds.
For this example, we'll be saving the css file (i.e., main-style.css). Simply select the file on the left, then right click in the code editing area, choose "select all" then "copy", open Notepad, paste the entire code into Notepad, then save it.
Congratulations. Your css file is now backed up on your desktop and you can make all the mistakes you want to your css file on your site's back-end.
Restoring your theme's original files
You should never need to use this information if you save you site's files before editing them, but we're human and we make mistakes. Also, you may be new to coding and may not be familiar with good coding practices.
To begin restoring your theme's original files, you'll need to go to "Design" at the top, click on "Change Theme", find the unadulterated theme you're currently using and then choose it as the current theme for your Weebly site.
Now go into the back-end of your site's newly applied theme via "Edit HTML/CSS from "Design" at the top. Select the same file on the left you intend to restore on the theme you just switched from. Now right click in the code editing area, choose "select all" and then "copy".
You can either paste this file into Notepad which is recommended if you're restoring more than one file (this way you don't have to keep changing themes), or if you're restoring just one file, change back to your original theme and paste the copied original theme file into the file you made the mistake in once you've deleted every code from that file.
Fantastic! You've restored your theme's original files. Now remember, before you edit any files on your site's back-end.
SAVE YOUR FILES!!!