This project template should provide a kickstart for managing your site dependencies with Composer. Thanks Wodby.
This project consist of:
- WordPress core: johnpbloch/wordpress-core-installer
- Repository https://wpackagist.org/ to install WordPress plugins and themes
composer/installersto set custom paths for plugins and themesdrupal-composer/preserve-pathsto exclude paths for plugins and themes under version control
Current WordPress core: ~5.0
composer install
./wp-cli.phar --path=web/ config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress
./wp-cli.phar --path=web/ db import wordpress-2019-04-06-0ea2479.sql
./wp-cli.phar --path=web/ serverWordpress user: wpfloripa Wordpress password: wpfloripa2019
By default, wordpress core will be installed in ./web directory. Plugins and themes will be installed in ./web/wp-content/plugins and ./web/wp-content/themes. Point your Apache vhost or similar to this project's ./web directory.
With composer require ... you can download new dependencies to your installation.
cd some-dir
composer require wpackagist-plugin/wp-cfm
- Init a composer project in packages directory (set type to wordpress-plugin or wordpress-theme)
- Add a local (type path) repository in
repositoriesoption of the rootcomposer.json. - Run
composer require vendor/your-package.