How to Change WordPress URL via WP-CLI
Changing WordPress home and site URLs through the admin dashboard is made possible
using the wp option update command.
To change the home address, run this command:Text
wp option update home ‘http://testing.com’
To change the site URL use this command:Text
wp option update siteurl ‘http://testing.com’
How to Update WordPress via WP-CLI
To update WordPress files and the database use these commands
Update the WordPress files first:Text
wp core update
To confirm if it is necessary to update the database to the required version:Text
wp core update-db
Check your WordPress version using this command:Text
wp core version