WordPress update with WP CLI

August 11, 2017

Backup

Navigate into the WordPress folder and create a database dump: 

wp db export

Next, take a full back-up of the files and the included database: 

tar -zcvf [name]_[yyyy-mm-dd].tar.gz .

Finally, move the file away to a secure location. 

Update

First, update WordPress core: 

wp core update

Then, update the database: 

wp core update-db

Update all the plugins:

wp plugin update --all

Update all the themes: 

wp theme update --all

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.