特定のディレクトリ ( /var/www/vhosts ) 以下のサブディレクトリにインストールされている WordPress の一覧を取得する
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment