How to Change the WordPress Site URL Within MySQL

The WordPress table that houses your site’s URL is wp_options.

The wp_options table schema is 4 columns:

  • option_id
  • option_name
  • option_value
  • autoload

There are two rows in this table that maintain your site’s URL. These are locatable from the values specified in “option_name,” which are: siteurl and home.

So the SQL command to change them via the MySQL panel are as follows:

Site URL

mysql> UPDATE wp_options SET option_value = ‘https://your-domain.com’ WHERE option_name = ‘siteurl’

Home

mysql> UPDATE wp_options SET option_value = ‘https://your-domain.com’ WHERE option_name = ‘home’

SOURCE: How do I change the WordPress Site URL?