By admax88
Hi DO community!
I have a question or a guideline on the WordPress project.
I’ve been tasked to do WordPress project for the company but I don’t know how to separate local development from production. Obviously I don’t want to code in the live website. I want to code locally and then with all of the approval deploy the changes to production.
I’ve already created an instance with the following specs: Ubuntu 18.04 LTS NGINX PHP MySQL SSL certificate has been installed by the Let’s Encrypt
In this case, workflow differs when you develop local vs production.
I’ve read the using Git or Docker might help but I am not sure how to do that right.
Thanks in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @KFSys,
I am thankful for your reply.
This is another confirmation that Git is the right tool for it.
Do I need to use environment variable to set one variable for development and another for production?
I came across this article explaining how to use environment variables.
https://www.twilio.com/blog/working-with-environment-variables-in-node-js-html
Thanks, admax
Hi @admax88,
I’ll recommend using Git as well. Git will allow you to push your files online and then you can download them/clone them once ready on your droplet. If you are uncertain at how to use git, it’s real easy, it won’t take you more than an hour or two to get used to it. Here is an article which will help you out :
https://www.digitalocean.com/community/cheatsheets/how-to-use-git-a-reference-guide
Alternatively, you can use FTP and upload your code once you are finished with developing the website but that’s a lot slower process than using git.
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.