WordPress Composer
Project template for WordPress application stack with Composer.
Usage
- First you need to install Composer.
- Create new project in current directory
composer create-project nhutdm/wordpress-composer .
.
Default paths
By default, WordPress core will be installed in ./web
directory. Plugins and
themes are installed in ./web/wp-content/plugins
and
./web/wp-content/themes
.
Manage custom themes and plugins under version control
-
Exclude path to your plugin or theme from .gitignore. Example for theme under
web/wp-content/themes/my-custom-theme/
:!web/ web/* !web/wp-content/ web/wp-content/* !web/wp-content/themes/ web/wp-content/themes/* !web/wp-content/themes/my-custom-theme/
-
Add the same path to your composer.json under
extra > preserve-paths
:"preserve-paths": [ "web/wp-content/themes/custom" ]
-
Add your plugin/theme directory under version control.