Blog for web designers

WordPress home page directory

WordPress has a lots of dynamically generating URL code. Sometime moving your wordpress from localhost to online server you might face a lots of URL editing manually. To overcome this issue we can use the default wordpress home page directory, that holds the URL of wordpress home page directory.

WordPress home page directory php code

$url = home_url();
echo $url;

It will generate the your website home page URL
For eg:


Santosh Shah

My name is Santosh Shah and blogs at

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.