My WordPress .gitignore config file

in Code Write a comment

In this article, I’ll share my WordPress .gitignore configuration file. I’ve previously shared my Vue.js .gitignore file.

# ignore all files starting with .
.*

# ignore certain files
wp-config.php
readme.html

# track this file .gitignore (i.e. do NOT ignore it)
!.gitignore

# track .editorconfig file (i.e. do NOT ignore it)
!.jscsrc
!.travis.yml
!.jshintignore

# track readme.md in the root (i.e. do NOT ignore it)
!readme.md

# ignore all files that start with ~
~*

# ignore OS generated files
Thumbs.db
.DS_Store

# ignore log files and databases
*.log
*.sql
*.sqlite

# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so

# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# ignore everything in the "wp-content" directory, except:
# "mu-plugins" directory
# "plugins" directory
# "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
!wp-content/index.php

# ignore specific themes
wp-content/themes/twenty*/

# ignore node/grunt dependency directories
node_modules/

Hi, I'm Renat 👋

 


If you find this post useful, please let me know in the comments below. 
Cheers,
Renat Galyamov

Want to share this with your friends?
👉renatello.com/wordpress-custom-post-excerpt

PS: make sure you check other WordPress tutorials, e.g. content type related post excerpt in WordPressload Google Fonts via functions.php in WordPress and download my plugin that improves your WordPress SEO & Performance.

A collection of UI components for
Bootstrap 4/5 and Vue.js

Get now

Write a Comment

Comment