realph
realph

Reputation: 4671

Handling Git Deployment (WordPress)

So, like most of you, I develop my sites locally using MAMP. I've recently been learning git and in doing so, preparing to drop FTP from my workflow completely.

Though, I was wondering if there's a best practice for handling WordPress' databases.

Currently I'm only using version control on my current theme, but would like to expand this into controlling the whole site locally and pushing it to the server accordingly. That means making changes to files, adding posts/pages and generally mucking around with the whole site, keeping both local and remote site in sync. Is this possible?

I've read tons of guides over the past week, and followed countless tutorials, so any help would be appreciated.

Thanks in advance!

Upvotes: 2

Views: 520

Answers (1)

Wyck
Wyck

Reputation: 2023

This is not really feasible, git is for file changes, not for your database. Due to how WordPress stores data in the database you cannot sync content without custom scripting (bash, ruby, etc) aka... jumping through hoops.

You can dump your database file using cron and throw it into git, but again you cannot sync the files due to how WordPress stores values.

This has been asked on https://wordpress.stackexchange.com/

Upvotes: 1

Related Questions