edit WordPress Address (URL) code example
Example 1: wordpress change site address
// Add to top of wp-config.php
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Example 2: update url wordpress
<?php
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );