Update plugins of multiple WordPress

How to bulk update the plugins of multiple WordPress installations:

You have the opportunity to install a plugin, which automatically updates your plugins. But what is if you have to install those plugins manually and a automatic installation is not possible?

Solution

The following script checks all of the subfolders in my www directory where all of the WordPress installations are located.

Then it checks if the specified plugin is installed in each CMS.

If the plugin is installed it is getting removed and the new version is copied to that destination.

This is the way you can bulk update all of the plugins of your WordPress installations.

#!/bin/bash
for d in /var/www/*/; do

dir="${d}wp-content/plugins/PLUGINNAME/"

if [ -d "$dir" ]; then
echo "$dir"
rm -fr ${dir}
cp -r PLUGINNAME ${dir}
fi

done

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen