Skip to content

Instantly share code, notes, and snippets.

@basscl
Last active July 13, 2021 20:49
Show Gist options
  • Save basscl/c00d9c87fb36d0a77cdc079f5a9d3bf4 to your computer and use it in GitHub Desktop.
Save basscl/c00d9c87fb36d0a77cdc079f5a9d3bf4 to your computer and use it in GitHub Desktop.
Shell command to list WP core/plugin updates needed
#!/bin/bash
echo -e "`wp option get home`\nWP Core `wp core version``wp core check-update --fields=version --format=csv 2>/dev/null | grep -v [a-z] | sed 's/\([0-9].[0-9].[0-9]\)/ -> \1/g'` \n`wp plugin list --status=active --fields=name,update,version,update_version 2>/dev/null | grep -vE 'none|higher than expected' | sed '1d' | sed 's/[[:space:]]available[[:space:]]/ /g' | sed 's/[[:space:]]\([0-9]*.[0-9]*.[0-9]*\)[[:space:]]\([0-9]*.[0-9]*.[0-9]*\)/ \1 -> \2/g'`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment