I have had this problem very often in the past: I have a wordpress site that is in production. I deployed the site manually from my local machine. So if there were changes, I exported the database and the files from the local file system again and imported them on the remote production server. That sucks, especially if you have a different enviroment on your remote server (different OS, different PHP version, different MySQL, etc.).
So I decided to use Docker and Docker containers to run my Wordpress site.
During my work as developer for Java and Node.js applications I started to love the way you can test and deploy changes from your development to your production environment using a Continuous Delivery pipeline.
How can I establish this workflow on a Wordpress site + MySQL that are running in Docker containers? Especially, how can I apply the changes I have made on the local MySQL to the remote MySQL DB?
SOLVED: I have found a good discussion and explanation on how to keep data persistent on StackOverflow: go here
Also this tutorial from DigitalOcean might help you.