Well it happens quite often when you get stuck in situation where you have to work with fellow developers on a single wordpress project.
The challenge here developers face is to create something productive working together, without making a mess into each others work, but as we know that in wordpress every thing is maintained in database including list of activated plugins
If a developer installs plugin to their local project than how they must the communication go to avoid code conflicts in repo
Should we share the database too, to share the plugin/themes settings so that there should no conflicts or little conflicts between the developers ?
Git for plugins:
- Use Composer for plugins which are already packaged on packagist or wpackagist. Add them to
- Use TGM Plugin Activation for other plugins.
Then, use Git to manage
composer.json and the changes in the TGM plugin.
Hardest thing is to sync database:
Definitely, we should share database. Reconfigure a plugin settings/options is not a good idea.
There’re many plugins, both free and premium, which can help.
- Use only one remote database that you all connect to with lots of backups. That way you just have to worry about files and not the db.
- Use the import and export functionality built into WordPress and throw it into your version control right into the wp root (like in a new folder). Sure it takes an extra few minutes but its dead simple and you can automate it, but more importantly it will become part of the version control.
- Use a custom updating script to version the actual database sync. I honestly don’t know how you can manage that with git because its a just a script and doesn’t really know what is going on, I know there are 3rd party tools that do this commercial and free ( http://www.liquibase.org/).
Complete 3rd party options
Bedrock is WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure.