Skip to content

Instantly share code, notes, and snippets.

@greghunt
Created February 21, 2022 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghunt/401adbc07326899343cec463d811b556 to your computer and use it in GitHub Desktop.
Save greghunt/401adbc07326899343cec463d811b556 to your computer and use it in GitHub Desktop.
Super Simple WordPress Site Test
#!/bin/bash
if [[ "$(curl -L -s $1/license.txt | grep -coF WordPress)" -gt 0 ]]; then
echo "Is WordPress"
else
echo "Is NOT WordPress"
fi
@greghunt
Copy link
Author

greghunt commented Feb 21, 2022

One-liner:
DOMAIN=wpengine.com && if [[ "$(curl -L -s $DOMAIN/license.txt | grep -coF WordPress)" -gt 0 ]]; then echo true; else echo false; fi

@greghunt
Copy link
Author

greghunt commented Feb 21, 2022

Bash Function

iswp() {
  if [[ "$(curl -L -s $1/license.txt | grep -coF WordPress)" -gt 0 ]]; then echo true; else echo false; fi
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment