Knowledgebase

Back to Tools and Features

Wordpress: Site URL and Home Settings


This guide explains the difference between the Site URL and Home settings in WordPress, and provides step-by-step instructions on how to change them using the WordPress dashboard and, if necessary, the StackCP control panel or wp-config.php file. Adjusting these settings is sometimes required when migrating a website, changing domain names, or correcting URL issues.

Understanding Site URL vs Home

1. The 'Site URL' is the address where your WordPress core files are located (e.g., https://yourdomain.co.uk/wordpress).
2. The 'Home' URL is the address visitors use to reach your website (e.g., https://yourdomain.co.uk).
3. In most cases, both URLs are the same unless WordPress is installed in a subdirectory.

Changing Site URL and Home via WordPress Dashboard

1. Log in to your WordPress admin dashboard at https://yourdomain.co.uk/wp-admin.
2. Navigate to 'Settings' and then 'General'.
3. Locate the fields labelled 'WordPress Address (URL)' and 'Site Address (URL)'.
4. Update the URLs as needed:
    - 'WordPress Address (URL)': The location of your WordPress files.
    - 'Site Address (URL)': The address you want visitors to use.
5. Scroll down and click 'Save Changes'.
6. Log back in if prompted.

Changing URLs via wp-config.php (if dashboard access is unavailable)

1. Log in to your StackCP control panel.
2. Go to File Manager and navigate to your WordPress installation directory.
3. Locate wp-config.php and right-click it and chose Code Editor.



4. Add the following lines, replacing the URLs with your own:
  1. define('WP_HOME', 'https://yourdomain.co.uk');
  2. define('WP_SITEURL', 'https://yourdomain.co.uk');
5. Save the file and refresh your website to check if the issue is resolved.

Changing URLs in the Database via phpMyAdmin

1. Access StackCP and click the phpMyAdmin icon in the Web Tools section.
2. Click Sign in next to your WordPress database.
3. In phpMyAdmin, select your WordPress database from the left sidebar.
4. Open the wp_options table.



5. Find the rows siteurl and home.
6. Click Edit next to each and update the URL as needed. Click Go to save.
7. Check your website to confirm the changes.

Additional Notes or Troubleshooting Tips

- Always back up your website and database before making changes.
- If you experience 'Too many redirects' or cannot access your dashboard after changing URLs, clear your browser cache or try resetting the URLs via wp-config.php as described above.
- Ensure the correct protocol (http:// or https://) is used to match your SSL certificate status.
- For WordPress installations moved to a new domain or directory, updating the URLs is essential to avoid broken links and functionality issues.

If you require further assistance, please contact UK2 Support.


Related Articles

How To Reset Permalinks In Wordpress
Wordpress SMTP

Can’t Find what you need?

No worries, Our experts are here to help.