Skip to content

Instantly share code, notes, and snippets.

@rdlmda
Last active July 8, 2017 03:12
Show Gist options
  • Save rdlmda/5b36b8cee2fa393586218f9054888983 to your computer and use it in GitHub Desktop.
Save rdlmda/5b36b8cee2fa393586218f9054888983 to your computer and use it in GitHub Desktop.
Upgrade everything WordPress via WP-CLI
#!/bin/bash
export PATH="/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin"
wp cli update --yes --allow-root
wp core update --path=/var/www/html/[path] --allow-root
wp plugin update --all --path=/var/www/html/[path] --allow-root
wp theme update --all --path=/var/www/html/[path] --allow-root
@rdlmda
Copy link
Author

rdlmda commented Aug 24, 2016

Beware

As it i s currently, it borks internal WP updates because newly created files will be owned by root.

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