Upgrade WordPress in Command Line with 3 simple steps

One of the best way to upgrade your WordPress version in command line with only 3 simple steps.

  1. Download the compressed file from https://wordpress.org/download/ and unzip it.

cd /var/www/html

wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz

  1. Copy and overwrite the core files

cp -avr /tmp/wordpress/* .

rm -rf wordpress latest.tar.gz

  1. Open and login your WordPress site to upgrade the core.

https://yourwordpress.com/wp-admin/upgrade.php

Screen Terminal Commands in Mac OS

To list all USB Serial Ports:

$ ls /dev/tty.*

To Screen on the Serial Port:

$ screen /dev/tty.usbserial-XXXX [baudrate]
$ screen /dev/tty.usbserial-A101Y8E2 115200

To exit from screen:

Hold [Ctrl+a] and press [d]

To list all screen sessions:

$ screen -ls
There is a screen on:
[session id].ttys001.Your-Machine (Detached)
1 Socket in /var/folders/xxxx

To resume from a screen:

$ screen -r
$ screen -r [session id]
$ screen -R

To kill / exit from a session:

$ screen -S [session id] -X quit

Hope it helps you.

Thanks