Last active
February 12, 2018 15:43
-
-
Save dobsondev/5d7b78f5cdb2daac00af to your computer and use it in GitHub Desktop.
Installs the newest version of all the WordPress plugins I like to use on the sites I make for clients.
This file contains hidden or 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/sh | |
# -------------------------------------------------------- | |
# Purpose: Downloads and installs plugins that are defined | |
# in the array setup by the user. | |
# Author: Alex Dobson (https://github.com/SufferMyJoy) | |
# -------------------------------------------------------- | |
# Define all the plugins I like to have using their folder names | |
PLUG[0]="all-in-one-wp-security-and-firewall" | |
PLUG[1]="comment-moderation-e-mail-to-post-author" | |
PLUG[2]="contact-form-7" | |
PLUG[3]="debug-bar" | |
PLUG[4]="disable-xml-rpc-pingback" | |
PLUG[5]="dobsondev-shortcodes" | |
PLUG[6]="google-analytics-dashboard-for-wp" | |
PLUG[7]="mce-table-buttons" | |
PLUG[8]="really-simple-captcha" | |
PLUG[9]="underconstruction" | |
PLUG[10]="velvet-blues-update-urls" | |
PLUG[11]="wordpress-importer" | |
PLUG[12]="wp-last-login" | |
# Get all the array elements and put them into a variable | |
PLUGS=${PLUG[@]} | |
# Get all the files via curl and then unzip them | |
for p in $PLUGS ; do | |
echo "Downloading newest version of $p from https://downloads.wordpress.org/plugin/$p.zip" | |
curl -O "https://downloads.wordpress.org/plugin/$p.zip" | |
echo "Unzipping $p.zip" | |
unzip $p.zip > /dev/null | |
done | |
# Remove the extra zip files which we no longer need | |
rm -rf *.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment