What is a Home URL in WordPress?
The Home URL in WordPress is the main site address that users enter in their browser to visit your website. It matches the “Site Address (URL)” field in the WordPress settings, and it is the web address seen by the public. The Home URL tells WordPress where your site is located for visitors.
Definition
The Home URL is the website’s public address set in the WordPress dashboard under Settings, then General. This value is labelled as “Site Address (URL)” in the settings and controls the link visitors use to reach your home page.
Function of the Home URL
The Home URL displays in the browser address bar when someone visits your site. WordPress uses this address to create links to the homepage, posts, and pages on your website. Any link to the main page of your site will use this setting.
Setting the Home URL
Through the WordPress Dashboard
- Log in to your WordPress admin area.
- Go to Settings, then General.
- Enter your preferred address under “Site Address (URL).”
- The address must include “http://” or “https://”
- Do not use a final slash at the end of the address.
Using the wp-config.php File
You can set the Home URL by editing the wp-config.php file found in your site’s root directory.
Add this line:
php
define('WP_HOME', 'https://example.com');
This method forces WordPress to use the provided address, even if the setting in the dashboard is different.
Example Configuration for Home URL
A common need is to run WordPress from a subfolder but show the main domain as the public site.
For example:
php
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com/wordpress');
Here, WordPress itself is installed in a folder called “wordpress”, but users visit your site at the main address.
Use Cases
- WordPress in a Subfolder: If WordPress is in a directory such as “https://example.com/wordpress” but you want people to visit “https://example.com”, you set the Home URL to “https://example.com” and the WordPress Address to “https://example.com/wordpress”.
- Multiple Sites: Some sites use both a legacy platform and a WordPress site together, installing WordPress in a subfolder but linking the Home URL to the base domain.
- Repairing a Site: If a site breaks after moving or changing domains, editing the wp-config.php file or updating the database may be the only way to restore normal access.
Problems Linked to Incorrect Home URL Settings
Improper configuration of the Home URL can result in:
- Broken links or images
- Subfolder addresses showing in public links when you want the root domain
- Difficulty logging into the admin area
- Redirect issues
- SEO trouble, such as duplicate URLs indexed by search engines
These problems are common topics in support forums and user guides.
Related WordPress URL Settings
- WordPress Address (URL) is used for the location of the WordPress application files, often set to a subfolder.
- The Home URL refers to the site’s public address.
- Both should include the full URL with “http://” or “https://”, without a final slash.
Manual Changes
You might need to update the Home URL without using the dashboard in certain cases. Options include:
- Setting WP_HOME in the wp-config.php file as described above
- Updating the value directly in the database using tools like phpMyAdmin
- Running command-line tools if you have server access
Changing core URL settings by hand is best for advanced users or when the dashboard is not working.
Common Sources of Confusion
Many users confuse the Home URL with the WordPress Address. The Home URL controls the public address where visitors go. The WordPress Address tells WordPress where its core files live, which can be different if WordPress runs from a subfolder. This difference is important for site migrations, subfolder installations, and troubleshooting.
Support forums, help guides, and technical documentation frequently address this common mistake. The terms used in WordPress settings are sometimes confusing, which has led to many questions and walkthroughs online.