When working with WordPress and utilizing tools like ACF (Advanced Custom Fields), Custom Post Types UI, and a low-code editor such as Elementor, it's typically rare to include GitHub as part of the tech stack.
Have you ever experienced a scenario where content disappeared on your WordPress website? How did your company handle it, and what precautions have you taken within your technical infrastructure to avoid such incidents in the future?
Top comments (3)
I use Laragon, a local webserver app, on my pc to build out wordpress sites and initialize git inside the wp-content folder so it tracks all the theme code and image uploads. When I'm done working I do a compressed export of the sql file from PHPMyadmin into that folder then commit and push. Once that's done I overwrite the production site via ftp with the new files and import the sql into the production database. Bit of a pain but its kept us safe. Otherwise your host likely does daily backups so you could always restore from there.
Thanks for introducing me to Laragon. Overall, your approach seems robust. The database and files are sent to a remote repository for safekeeping. If you had to collaborate with multiple developers, would you consider making any adjustments in tracking database schema changes?
ACF raises concerns primarily because schema alterations are typically not tracked and peer-reviewed, which can lead to potential issues going unnoticed.
For multiple devs I would stick with the git workflow of the wp-content folder and sql dump. If you're doing solid notes in your commits you could have a bit more confidence in the ACF amendments but you could go a step further and run an export on just the fields via ACFs tooling and include them in the repo. that should track them relatively effectively.