0
Updating, Editing your website... easier and best way to do it
So you buy a web host (and domain). You upload your files (html, css, JS, images). Your files are uploaded in the public_html folder on the web host. Now if you are making a quick small change, you could just go to > public_html > [FILE]. And edit the file there. — But what about when you want to make big changes like, restyling the whole website into a new style? Also, if you are experimenting with a code (changing styles and stuff), you wouldn’t want your users going on your website and seeing your website messy. (MESSY, because you’re just experimenting with different fonts, colors, etc).
3 Respuestas
+ 2
You should test the update in your local machine before making it publicly available.
You just need to change the previous file with new one.
+ 2
Do you have a GitHub account or some other version control? If not, that should be the first step.
Then, download the code as is then enable git so you can track changes. This means creating a git repository. You can make the repository a private one for free on GitHub. Don't make any code changes yet. You just want the ability to track. Upload the code before you make any changes to your remote (online) git repository. Now you have a safe restore point on the cloud which is the same as your online site, just in case anything goes wrong.
At this point, you can start making code changes, running on your local machine to test, then committing and pushing to the remote git repository if you're happy with the change. You should do this regularly so you are tracking a lot of small changes instead of 1 or 2 big changes.
Each time you're happy with a change and have committed and pushed, you should build & deploy your site with that latest version of the code.
0
Heres what I’m thinking:
- download the public_html folder to your computer, open the folder in a code editor.
Once you are done, delete the public_html file on your web host. and uolowd the public_html folder (that you made a lot kf changes kn) from your computer to your webhost.