0

Instead of running the command for plugin installation and then the command for activation:

sudo for dir in /var/www/html/*/; do cd "$dir" && wp plugin install elementor anywhere-elementor wordpress-seo wordfence contact-form-7; done
sudo for dir in /var/www/html/*/; do cd "$dir" && wp plugin activate elementor anywhere-elementor wordpress-seo wordfence contact-form-7; done

Can one combine both the install and activate to one command?

1

Can one combine both the install and activate to one command?

It looks like you're looking for this plugin install option

[--activate]

If set, the plugin will be activated immediately after install.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.