Here is how you can update the SiteURL and Home URL in WordPress database using terminal and MySQL queries:
Log in to MySQL
🖥️
mysql -u [username] -p
Select the database to update.
🖥️
USE [database_name];
Run update query.
🖥️
UPDATE wp_options SET option_value = replace(option_value, '[http://oldurl]', '[http://newurl]') WHERE option_name = 'home' OR option_name = 'siteurl';
And it’s done!