Eduardo Matos
Eduardo Matos

Reputation: 741

Adding plugins that required database changes to version control on Wordpress

I'd like to add a installation of a Wordpress site to version control. After researching a little bit, I found some files/folders that should be ignore, like sitemap.xml and cache folders.

Every single one of them say I shouldn't ignore wp-content/plugins/, which is a reasonable advice at first. The question is: How should I deal with plugins that alter the database?

I can see two scenarios:

  1. If the plugin has to add some tables on installation, this trigger would be lost since it would already be "installed" after uploading the files to the server.
  2. If I must access the installation screen on production, then there's no reason to version control these files.

Upvotes: 0

Views: 69

Answers (1)

Vallieres
Vallieres

Reputation: 879

I would suggest to take a look at this great presentation. It's the most complete I saw yet.

http://stevegrunwell.github.io/wordpress-git

You should have your plugins directory in there too since you do want to track plugin files. As for the database, that's another subject completely. Take a look at the development of VersionPress, it should be out at the end of the year.

Upvotes: 2

Related Questions