|
|
|
Ask HN: How do you push website updates to live?
|
|
3 points
by rbarnes01
2246 days ago
|
|
Hi everyone, I wanted to reach out to the community to see best practices for pushing updates to live sites. I run an e-commerce site running a php shopping cart system. The way the shopping cart is structured is admittedly a bit complicated, which makes me nervous when I push live updates to the site. Currently, I have a hosted dev site where I make changes, and when I'm ready for a release I manually change the files in the ftp. Not the best solution, especially considering a high chance of user error. What is the standard practice for pushing updates? Git would make more sense, but implementation seems daunting.
Any advice is appreciated! |
|
Do you use version control now? If not, do it immediately. Initiating a git repo is very easy. You can use a boilerplate repo if you don't understand how gitignore works[1]. You should also look into gitattributes files.
If "implementation" means "deploying from a git repo", there are a million tools to do this. It's built into GitHub and BitBucket now, but you can also use Elastic Beanstalk or CodeDeploy on AWS. Azure and GCP have similar tools.
> What is the standard practice for pushing updates?
Bare minimum is having a way to trigger a deployment from a particular commit in git.
Best practice would be a full CI/CD server. It sounds like you probably don't have unit or end-to-end tests, but if you did, the CI/CD server would run the tests on any individual commits and report errors to you.
You could have manual or automatic deployments based on the latest commit on certain branches.
There's a lot to understand and unpack here, but there are also a ton of SaaS products to make it easier.
Honestly, though, you're a lot better off just moving to Shopify...
1. https://github.com/Partyschaum/php-boilerplate