HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


How to change Joomla site address (URL)

This guide will show how you can change URL for your Joomla website easily. This can be quite helpful when you are moving your Joomla installation from a subfolder, changing the main domain for your cPanel account or just thinking of using a different domain name for your site.

NOTE: Before proceeding with any changes, make sure that you generate a full backup of your website. If you've created your site using Softaculous script installer, feel free to refer to this guide as well (step #4 â$“ Backup software).

Joomla CMS stores your website URL in configuration.php file located in the root folder of the domain in question. Follow these steps in order to make all the necessary changes:

1. Log into your cPanel > File Manager menu:



2. Navigate to the root folder of your Joomla installation, right-click on configuration.php and use Code Edit option:



3. Open the file and adjust its source code online. You will need to locate and edit the following line:

public $live_site = '';



4. Enter a new website URL in this line:



If your website uses SSL certificate, the URL should startwith https://domain.com and if itâ$™s set via www, the URL would be http://www.domain.com.

5. In case the root folder of the installation was changed, you need to edit these lines as well:

public $log_path = '/home/user/public_html/joomla/administrator/logs';
public $tmp_path = '/home/user/public_html/joomla/tmp';




It means that the installation is located in /public_html/joomla subfolder.

6. Instead of the old path, enter the new one and hit Save button. In our case, configuration.php file will look like this after the change:



Make sure that you actually move all the files to the new folder.

This completes the steps necessary to change the domain name for your Joomla website.  However, remember that the changes for the database might be needed as well, it depends on how you configured your Joomla website.

In order to update the database, follow these steps:

1. Log into your cPanel > Backup menu:



Here you can download the backup of the database used for your site. You can look up the name of the database in configuration.php file we used earlier:



Download database file here:



2. Unzip the downloaded file. Now you can open .sql file with some text editor to update all the URL references.

Hit Ctrl + F and select Replace option. Fill out the corresponding fields, Find â$“ your old domain, Replace â$“ your new domain) and hit Replace All:



Make sure that you save the changes.

3. Now you can upload the updated database to your cPanel account. To be on the safe side, we suggest creating a new database (instead of dropping the existing one) and connect it to your Joomla site. To do so, move to Databases section > MySQL Databases menu:



4. Follow the steps below to create a new database and user for it:











Remember these details, you will need to use them a bit later.

5. After that you can upload the database using phpMyAdmin menu:



6. Select the newly created database from the list on the left and switch to Import tab. There you will need to use Browse option to pick up the database .sql file from your local device:



NOTE: If your database is more than 50Mb, import the database following the steps in this guide.

7. Once done, go back to File Manager and find configuration.php. Edit the following lines with the new database details:

public $user = 'USERNAME';
public $password = 'PASSWORD';
public $db = 'DATABASE_NAME';





That's it!

              
                      Need any help? Contact our HelpDesk

 

 

 

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 12345
6789101112
13141516171819
20212223242526
27282930 

Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional