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/sh | |
find /var/www/vhosts/ -maxdepth 2 -type f -name wp-config.php | while read thisfile; do | |
wp_path=${thisfile%/*} | |
echo "***** ${wp_path}" | |
wp_version=`wp –path=${wp_path} core version` | |
wp_home=`wp –path=${wp_path} eval "echo home_url();"` | |
echo "${wp_home} : ${wp_version}" | |
done; |
while ループ内で wp core update とかをすれば、一撃ですべての WordPress をアップデートできるよ