I’m constantly trying to improve my WordPress development environment. It’s a conundrum I’ve been battling with since I began developing websites with WordPress. How do you reliably make local updates to a website, publish those updates online to a staging website for client review, and then publish them live to production when they are approved?
There’s isn’t a good solution to this problem. The following process is what I typically use, and it’s by no means the best. Hopefully you can provide some ideas to improve it.
A localhost
development environment is used for development of new features. I use the following software in this localhost
environment to automate my workflow:
localhost
LAMP web server, allowing me to create a new host URL for ever site I work on. For example: localhost.site1
, localhost.site2
, localhost.site3
, etc. Once I have my localhost
updates ready for client feedback, I use localtunnel to publish the changes to a staging URL for feedback.
Once the changes are approved, I typically create a publishing routine on the fly that may include:
This process works well, but it could be much better. In most cases live updates will continue to happen inside WordPress during the development process. For this reason a MySQL dump will not work to deploy database updates from local to production, as so many dev’s out there seem to suggest. So the problem remains:
How do you reliably publish updates (files + database) to a live WordPress website without conflicting post ID’s?
How do you publish WordPress site updates from local to live? Is there a way to automate this push and pull process? If there is let me know, it’s been an itch I’ve haven’t been able to scratch for some time now.