How to upgrade your WordPress to the latest version via command line

It may fix various problems with your WordPress

First of all backup your files and database

Enter your www/ folder

cd /home/USER/public_html

Download/extract and replace files using latest WordPress version from an original source

wget https://wordpress.org/latest.zip

unzip latest.zip

rsync -avz wordpress/* ./

Fix ownership if needed

chown -R USER: *

Remove temporary files and folders

rm -rf ./wordpress/ ./latest.zip

Using WP-CLI:

wp core download --force

Click here to know how to install WP-CLI

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *