Live data from Hacker News

Ask HN: Now that my site is live, how do I make changes to the source code?

news.ycombinator.com

1–7 of 7 posts

Ask HN: Now that my site is live, how do I make changes to the source code?

#1
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

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#2
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).

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#3
post #2

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?

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#4
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.

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#5
post #4

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 p…

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.

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#6
post #5
post #4

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 p…

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.

Re: Ask HN: Now that my site is live, how do I make changes to the source code?

#7
post #6
post #5

Earlier quoted context omitted.

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