简体   繁体   中英

Git - Tower - Wordpress database

My workflow for web design and development is set up as such:

On a Mac

MAMP pro for local

Git for version control (using Tower now instead of command line, I know, lazy.)

Coda for developing

But now I am working on a Wordpress site. I'm all set with what wordpress files I should gitignore. However, as Wordpress stores all the new posts - post changes, new pages - page changes, media files uploaded via Wordpress...etc

Well all of this is stored in the database. So if I make a local new page or post, Git (and Tower) don't see any changes, thus nothing to commit and push. Well, makes sense, as that is saved somewhere else (wherever MAMP stores it) and not in the folder Git is tracking.

Has anyone come up with a method to get local changes to register with Git? I've been researching, found LiquidBase but not ready to learn that. Reading about dumping the database, and having Git track that. However for that, I would need to dump the database via my local MAMP PHPmyAdmin every time I wanted to commit and push some new changes to the server, correct? Or using built in Wordpress, I could export and import databases every time I wanted to make changes, commit and push. But this all seems like a bunch of extra hoops. I gotta imagine someone has automated this somehow. Fingers crossed.

Thank you!

I keep all the code under version control and just use a backup plugin and have it backup my database to dropbox, dev server or local machine depending on what project I'm working on as the workflow can vary. This one works well: BackWPUp

Kinda "too easy" I know but I've never had any issues. It's not exactly version controlled but you can set it up to backup every 10 minutes or more frequently if you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM