Always have a staging environment. Don’t ever build from a production environment. This might sound dumb but people actually did it.
A staging environment is for your to build your website, test it before migrating to a production server. It is good practice to run it on your local machine.
Remember your staging environment should have a baseline stack. You can build on top of that to suit your usecases. For WordPress, you can have the following stack as baseline:
It is important to note, there are other stacks and way of staging environment such as docker and containers.
One of my favorite staging environment is powered by LocalWp. I highly recommend it because it’s simple and just runs. I will write a detailed setup scenario on a separate blog post later.
I want to wrap up this post with one more staging that I think is useful. Some developers want to build a staging environment that replicates their actual environment, so it gives them results that is close enough to production. This can be achieved by developing their staging env on a subdomain on the actual server. For WordPress, as a rule of thumb, you always want to turn off indexing by robots and crawlers. There’s a checkbox in the Dashboard.
A staging environment is useful for a better workflow. I hope you enjoy this short post and if you have any questions please write it in the comments section.