Skip to content

Commit 7ea3e97

Browse files
authored
Merge pull request #3295 from pedrosanta/wordpress-update
Update and fix WordPress gitignore
2 parents 7936b83 + cd92ee3 commit 7ea3e97

File tree

1 file changed

+42
-17
lines changed

1 file changed

+42
-17
lines changed

WordPress.gitignore

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,48 @@
1-
# ignore everything in the root except the "wp-content" directory.
2-
!wp-content/
1+
# Wordpress - ignore core, configuration, examples, uploads and logs.
2+
# https://github.com/github/gitignore/blob/master/WordPress.gitignore
33

4-
# ignore everything in the "wp-content" directory, except:
5-
# "mu-plugins", "plugins", "themes" directory
6-
wp-content/*
7-
!wp-content/mu-plugins/
8-
!wp-content/plugins/
9-
!wp-content/themes/
4+
# Core
5+
#
6+
# Note: if you want to stage/commit WP core files
7+
# you can delete this whole section/until Configuration.
8+
/wp-admin/
9+
/wp-content/index.php
10+
/wp-content/languages
11+
/wp-content/plugins/index.php
12+
/wp-content/themes/index.php
13+
/wp-includes/
14+
/index.php
15+
/license.txt
16+
/readme.html
17+
/wp-*.php
18+
/xmlrpc.php
1019

11-
# ignore these plugins
12-
wp-content/plugins/hello.php
20+
# Configuration
21+
wp-config.php
1322

14-
# ignore specific themes
15-
wp-content/themes/twenty*/
23+
# Example themes
24+
/wp-content/themes/twenty*/
1625

17-
# ignore node dependency directories
18-
node_modules/
26+
# Example plugin
27+
/wp-content/plugins/hello.php
1928

20-
# ignore log files and databases
29+
# Uploads
30+
/wp-content/uploads/
31+
32+
# Log files
2133
*.log
22-
*.sql
23-
*.sqlite
34+
35+
# htaccess
36+
/.htaccess
37+
38+
# All plugins
39+
#
40+
# Note: If you wish to whitelist plugins,
41+
# uncomment the next line
42+
#/wp-content/plugins
43+
44+
# All themes
45+
#
46+
# Note: If you wish to whitelist themes,
47+
# uncomment the next line
48+
#/wp-content/themes

0 commit comments

Comments
 (0)