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
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
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 :
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
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