Skip to main content

Joomla – Change Domain

Updated over 3 months ago

If you want to change the domain of your Joomla website, there are some important steps you should follow to ensure a smooth process. This includes switching to a new domain as well as updating existing settings.

Step 1: Backup your website

Before starting the transition, you should always create a full backup of your Joomla site. This ensures that you can restore everything in case of any problems.

Step 2: Change domain settings

  1. Edit the configuration file:

    • Use FTP to access the root directory of your Joomla installation and open the configuration.php file.

    • Find the line:

    public $live_site = '';
    • Add your new domain, for example:

    public $live_site = 'https://www.new-domain.com';

  2. Update the database:

    • If you have URLs or media links that still point to the old domain, you can update them in the database.

    • Open phpMyAdmin and run a search & replace query to update the references:

    UPDATE `jos_content` SET `introtext` = REPLACE(`introtext`, 'https://www.old-domain.com', 'https://www.new-domain.com'); 

    UPDATE `jos_content` SET `fulltext` = REPLACE(`fulltext`, 'https://www.old-domain.com', 'https://www.new-domain.com');

Step 3: Check SSL and SEO

  • Set up an SSL certificate: If you are using an SSL certificate for your new domain, make sure it is properly installed.

  • Review SEO settings: Ensure that all internal links, redirects, and the sitemap point to the new domain. This is essential for maintaining your website’s visibility in search engines.

Step 4: Clear cache and test

After making the changes, clear your website’s cache to prevent old data from being loaded:

  • In the Joomla backend, go to System → Clear Cache and remove all cached files.

Then test your website:

  • Open the new domain and check if all pages load correctly.

  • Make sure no links or images still point to the old domain.

Step 5: Add domain alias and change main domain

After making the changes in Joomla, you need to add the new domain as an alias in My Panel and then set it as the main domain:

  • Log in to My Panel and go to Hosting → Settings.

  • Select the hosting subscription where you want to change the domain settings.

  • Click on the desired website and select Domain Aliases. Click Edit Aliases and add the new domain as an alias.

  • Once the alias has been added, go to the Domain Aliases section, select the new domain, and click Change Main Domain.

  • The new domain will now be used as the main domain.

Did this answer your question?