Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
特定のディレクトリ ( /var/www/vhosts ) 以下のサブディレクトリにインストールされている WordPress の一覧を取得する
#!/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
You can’t perform that action at this time.