wp home url code example
Example 1: wordpress get domain
// WORDPRESS GET SITE URL:
echo get_site_url(); // echo's http://www.yoursitename.com
Example 2: wordpress change site address
// Add to top of wp-config.php
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Example 3: wp-config change url wp-config
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');