Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between wp_siteurl and wp_homeurl in WordPress?

Tags:

wordpress

What is the difference between wp_siteurl and wp_homeurl in WordPress? And what is the meaning of these lines given below:

/* Handle multi domain into single instance of wordpress installation*/

 define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
 define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
like image 717
Shiblee Sadik Avatar asked Nov 08 '22 00:11

Shiblee Sadik


1 Answers

Home URL: The WP_HOME constant corresponds to the WordPress Address (URL) input field in the Admin. It is used to determine the result of the home_url API function.

The Home URL is the URL you want your visitors to enter to reach your blog. If you wish to have a blog at /musings, then the WP_HOME should be http://example.com/musings

Site URL: The WP_SITEURL constant corresponds to the Site Address (URL) input field in the Admin. And it is used to determine the result of the site_url API function.

The Site URL must point to the path to your WordPress installation. If you have installed WordPress in a subdirectory like /wordpress then this path must be http://example.com/wordpress.

like image 198
Navnish Bhardwaj Avatar answered Nov 15 '22 12:11

Navnish Bhardwaj