Backup Configuration for WordPress Docker Composer

I spend a whole day to restore my previous WordPress blog and lost a lot of drafts.

Main takeaways are:

  • backup data with 3rd party backup plugin. So we can restore data with fresh WordPress installation.
  • When you use docker composer, separate data and WordPress app. So whenever you restart docker composer, your data should be persistent.

In previous WordPress docker composer configuration, I just use volume mount for a database. However, all images I uploaded are not saved in DB, but saved in /var/www/html/wp-content/. That is why I mount this directory also. Here is sample yaml file.


Leave a Reply