.gitignore file for WordPress development

Posted on 09/09/2019

For some reason there is no standardized WordPress .gitignore file that can be kept in the project root. After going back to my own boilerplates for 100th time, I figured I might as well post that here and on Github.

The code is below and Github repo is github.com/aramboyajyan/wordpress-gitignore. Rules work on the principle that they first exclude all plugins and themes, and then declare the directories with custom code that you want to keep under version control.