• 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), 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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    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.