WordPress change url

In wp-config.php before MySQL details.

define('WP_HOME','https://example.com'); 
define('WP_SITEURL','https://example.com');