Title: WordPress deployment with git: What to include in .gitignore?
Last modified: August 21, 2016

---

# WordPress deployment with git: What to include in .gitignore?

 *  [visiedo](https://wordpress.org/support/users/visiedo/)
 * (@visiedo)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/wordpress-deployment-with-git/)
 * Hi,
    I am using a typical development flow with git where I have the development
   environment in a local linux machine, and a stage and production servers where
   I push my code once is ready.
 * Most of my projects are based on yii, and some on other specialized php frameworks
   such as prestashop.
 * For prestashop for example, I am also using a quite restrictive .gitignore, keeping
   track only of the custom themes and plugins I develop.
 * Now that I am about to start a wordpress project, I can see two radically different
   approaches. I started browsing the web and come to Joe Bartlett’s .gitignore 
   on one hand ([https://gist.github.com/jdbartlett](https://gist.github.com/jdbartlett)),
   quite inline with my strategy in prestashop, but on the other hand I found some
   posts suggesting to only ignore a couple of folders!!!
 * 1. The first approach is to include only themes and plugins under git version
   control. This implies that you should start by having a working version of wordpress
   in the production site, and from that point you can deploy your customizations.
 * 2. The second approach is to have everything under version control allowing to
   deploy a full site with one command and some “post deployment hooks” to create,
   configure and populate the database which is great, but on the other hand is 
   a hassle when you need to update the core files, install new 3rd party plugins,
   etc…
 * I am basically looking for well reasoned arguments in one or another direction
   😉

Viewing 1 replies (of 1 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 9 months ago](https://wordpress.org/support/topic/wordpress-deployment-with-git/#post-4006106)
 * 1. When WordPress updates you can test plugins & themes individually for their
   compatibility.

Viewing 1 replies (of 1 total)

The topic ‘WordPress deployment with git: What to include in .gitignore?’ is closed
to new replies.

## Tags

 * [deployment](https://wordpress.org/support/topic-tag/deployment/)
 * [git](https://wordpress.org/support/topic-tag/git/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 1 reply
 * 2 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/wordpress-deployment-with-git/#post-4006106)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
