What does this do?
+
+
+
+Scans the Bedrock plugins directory and automatically migrates applicable plugins to Composer via WPackagist, or git-ignores them if their not available on Composer.
+
+
+
+### Usage
+
+Whilst SSH'd into the Docker `php80` container (`docker exec -it php80 bash`), browsed to `/var/www/html`, simply run:
+
+```bash
+bash <(curl -s https://raw.githubusercontent.com/pvtl/scripts/master/wordpress/bedrock-migrate-plugins-to-composer.sh -L) -s
+```
diff --git a/wordpress/bedrock-migrate-plugins-to-composer.sh b/wordpress/bedrock-migrate-plugins-to-composer.sh
new file mode 100644
index 0000000..240d3fa
--- /dev/null
+++ b/wordpress/bedrock-migrate-plugins-to-composer.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Create a list of current plugin folder names
+find "web/app/plugins" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' > pluginlist.txt
+echo "STEP 1/3. $(wc -l pluginlist.txt | awk '{ print $1 }') plugins found in the web/app/plugins directory."
+
+# Loop through the plugin list
+echo "STEP 2/3. Beginning plugin installation via Composer"
+printf "\n\n# Manually Installed Plugins\n" >> .gitignore
+count=1
+while read plugin; do
+ composer_include_succeeded=1
+ composer require "wpackagist-plugin/$plugin" >> composerlog.txt 2>&1
+ grep -q "InvalidArgumentException" composerlog.txt && composer_include_succeeded=0
+ if [ $composer_include_succeeded -eq 1 ]
+ then
+ echo "$count. $plugin - Added via Composer"
+ else
+ echo "!web/app/plugins/$plugin" >> .gitignore;
+ echo "$count. $plugin - Added manually"
+ fi
+ rm composerlog.txt
+ count=$((count+1))
+done