I just started using bedrock.
I saw there are two ways to install/uninstall wordpress plugins.
- With composer and wppackagist
- Using wp-cli
Installing using Composer :
composer require wpackagist-plugin/akismet
Above command will create an entry in composer.json and copy the plugin to web/app/plugins
We can activate the plugin manually.
Installing using WP CLI :
wp plugin install akismet
Above command will NOT create any entry in composer.json and copy the plugin to web/app/plugins
Remove using Composer:
composer uninstall wpackagist-plugin/akismet
Above command will delete entry from composer.json and also delete the files related to this plugin.
But this will not trigger the uninstall.php file.
Plugin authors uses the uninstall.php file to remove database entries created by plugin.
Uninstall using WP-CLI:
wp plugin uninstall akismet
Above command has nothing to do with composer, it will delete the files related to this plugin. Plus this will trigger the uninstall.php which will delete database entries also. i.e. Complete uninstall can be done only via wp-cli.
I really want to use composer because of composer.json.
How do you do this guys ?