Last active
January 28, 2019 19:14
-
-
Save protorob/3afdae94e683e747b59a9eb37a0d4d2c to your computer and use it in GitHub Desktop.
Standard Plugin Install for WP-CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Defining Database Variables: | |
echo "==================================================================" | |
echo "We're going to install the standard plugins and Generatepress:" | |
echo "Plugins to be installed in no particular order:" | |
echo " - The Seo Framework" | |
echo " - SiteOrigin Page Builder with Official Extra Widgets and Livemesh ones" | |
echo " - Widget CSS Classes" | |
echo " - Autoptimize" | |
echo " - GP Premium" | |
echo " - The Classic Editor" | |
echo " - Lightweight social icons" | |
echo " - Maintenance Mode di Lukas Juhas" | |
echo " - Cookie Notice for GDPR by dFactory" | |
echo " - Widget Shortcode" | |
echo " - Widget Logic (a gem on its own)" | |
echo "==================================================================" | |
echo "If you need any aditional plugin just write their unique" | |
echo "identifier separated by spaces as on wp-cli manual " | |
echo "and they'll be installed alongside." | |
echo "If you don't need anything else yus leave the answer empty" | |
echo "and press enter" | |
echo "==================================================================" | |
#fixed variables | |
standardplugs=(autodescription siteorigin-panels so-widgets-bundle livemesh-siteorigin-widgets widget-css-classes classic-editor lightweight-social-icons lj-maintenance-mode safe-svg cookie-notice widget-shortcode widget-logic) | |
# Installing and activating generatepress theme | |
echo "I'll install Generatepress and my standard child" | |
wp theme install generatepress | |
wp theme activate generatepress | |
# accept a comma separated list of Plugins you want to install | |
echo "Plugins you want to install (space separated array): " | |
read -e -r plgtoinstall | |
#installing standard plugs | |
for p in "${standardplugs[@]}"; do | |
wp plugin install "$p" --activate | |
done | |
#installing extra plugs | |
for i in "${plgtoinstall[@]}"; do | |
wp plugin install "$i" --activate | |
done | |
echo "And that's all. Go work!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment