Skip to content

Instantly share code, notes, and snippets.

@calvez
Created January 30, 2018 21:31
Show Gist options
  • Save calvez/34bb3704b6949c9585cf554d813969ad to your computer and use it in GitHub Desktop.
Save calvez/34bb3704b6949c9585cf554d813969ad to your computer and use it in GitHub Desktop.
/usr/local/bin/wpup
#!/bin/bash
timestamp1=$(date "+%Y%m%d-%H%M%S")
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
echo "Database backup"
wp db export
echo -e "${RED}Update Wordpress core...${NC}\n"
wp core update
echo -e "${GREEN}Wordpress core updated!${NC}\n"
echo -e "${RED}Update Wordpress plugins...${NC}\n"
wp plugin update --all
echo -e "${GREEN}Wordpress plugins updated!${NC}\n"
echo -e "${RED}Update Wordpress themes...${NC}\n"
wp theme update --all
echo -e "${GREEN}Wordpress themes updated!${NC}\n"
echo -e "${RED}Update Wordpress core languages...${NC}\n"
wp core language update
echo -e "${GREEN}Wordpress core languages updated!${NC}\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment