WordPress, Git and Docker WordPress, Git and Docker wordpress wordpress

WordPress, Git and Docker


The reason WordPress stores it's data in a DB is because most of this data is in binary format, media, pictures, tables, indices.

Git works well tracking changes in text source code files, Git is not built to store any type of binary / media / data files, because there is no concept of tracking changes in a media / binary files.

So Git will be a good place to store the PHP scripts and configuration files and track the changes you make to those files.

For the purpose of backup and restore or even copying the latest development content from one WordPress server to another you can use the export tool and export all of the content to one XML file and then save it as a backup to be used to restore your entire WordPress content to a specific state in time.