Hacker News new | ask | show | jobs
Ask HN: Now that my site is live, how do I make changes to the source code?
1 points by crowdguy 4469 days ago
As a newbie web programmer, I've been editing the source files directly through an SSH connection. Now that the site has traffic, I'm not sure how to make new updates and furthermore test new features that are guaranteed to be broken upon their release.

Am I supposed to be using some form of revision control system, or is this a game of hidden subfolders and permissions?

Thanks

2 comments

Here are a few thoughts, some people may disagree with me, but you're new, so you don't get to be one of them.

1) Use git. Go create an account on github and use that. If you don't know how to use git, there's a tutorial at http://try.github.io/

2) Do all of your development on your local machine. That means that your local machine should be able to run your site.

3) Try to make your deployment process as simple as possible. Since it sounds like your site is small, you can probably get away with pulling the new code and restarting your web server. Total downtime should only be a few seconds. You can make it more complex as you get your feet under you.

What happens if I open up a live .php file and just paste new working code and hit "Save"? What happens on the end user-side if I do that? Furthermore, I'm with DO and I don't think I've ever rebooted my virtual server.
Ah, I was unclear. When I said restart your web server, I didn't mean to reboot the machine. Just restart the web server process. Nginx or Apache or whichever you're using.
Why does it need to be restarted ? It seems that when I save a file, the changes reflect on the site automatically
I work for an ecommerce site and we generally have a diff. sub domain which will have the "beta" or "test" version of code in live. Users are welcome to use it, but with fair warning. We also trickle, small percentage of users to the newer experience to gather feedback before enabling it site wide (A/B testing).
So you're sayign what I can do it duplicate my site onto a subdomain, test the features there, and when they're bug-free, I can just copy paste the new code into the source files on the live site?