How to commit git changes made on remote server

I'm using git to manage a wordpress site hosted on a remote server. Working locally and pushing my changes to the server is working well. But sometimes I log into wordpress admin and make changes on the remote server, and I don't know how to get these added to git in a way that I can pull them to my local machine. I hope this makes sense, I'm new to git and it's kind of confusing. Thanks for your help!

Edit: I do have shell access to the remote server if that helps.

1 answer

  • answered 2018-11-08 00:54 niklas

    The changes you make with Wordpress Admin are not saved in local files (in the git repository) but in the database. The Way to go is to dump the remote database to a file and import that on your local machine. The Process is best described in the wordpress documentation: Backing_Up_Your_Database

    There are also plugins that automate the progress. Described at the end of the Article. I recently tried to get an automatic git workflow, but it is not easy with free plugins. What can help you is wp_cli. It will add command line commands for exporting the database.