Skip to content

Instantly share code, notes, and snippets.

@MasonSpeed
Last active December 10, 2021 16:29
Show Gist options
  • Save MasonSpeed/dfe9521f01afafa9f22593d2618e12d7 to your computer and use it in GitHub Desktop.
Save MasonSpeed/dfe9521f01afafa9f22593d2618e12d7 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Loop through paths in the current directory
FILE=wp-config.php
for d in */; do
echo ""
echo "Entering $d..."
cd $d
if test -f "$FILE"; then
echo "Installing $1..."
wp plugin install $1 --skip-plugins --skip-themes --force --allow-root
wp plugin activate $1 --skip-plugins --skip-themes --allow-root
echo "-------------------"
fi
cd ../
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment