Websites and applications

Check the site URL in Joomla

Reviewed on 2 min read configuracion joomla

Joomla detects the website's URL automatically. In a normal installation, the $live_site variable in configuration.php should stay empty:

public $live_site = '';

Do not use it as a first fix for redirect errors, HTTPS, resources that do not load or SEF URLs. First check the domain and its document root, the .htaccess redirects, the HTTPS configuration, the cache and any proxy or CDN.

Only in exceptional setups where the server does not pass the host to Joomla correctly may you need to set it manually. In that case, use the full public URL, with https://, without index.php or a trailing slash:

public $live_site = 'https://www.ejemplo.com';

Afterwards, test public and admin access, logging out, SEF URLs and static resources. A wrong URL in $live_site can cause redirects to the wrong domain or break a staging copy after migrating the website. If it does not resolve a confirmed cause, leave it empty again.

Edit without losing the configuration

Keep a private copy of configuration.php before changing it. The lines above are properties of the existing configuration class: change the relevant property inside that class; do not paste a public declaration outside it or add a second definition.

If the website is in a subdirectory, also check that part of the URL and the rewrite rules. After a migration, check the log and temp paths separately: changing $live_site does not update every directory or the links written inside the content.

If the change causes a PHP error, restore the saved file and check the message in the log. Do not publish the full configuration when asking for help, because it contains the database credentials.

You may also find useful

Something wrong or out of date? Tell us and we will review it.