> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Change a Joomla Website Address

This tutorial contain 2 sections. The first section involves modification of _configuration.php_ file and the second part involves MySQL database modification.


### Section 1: Edit Configuration.php File

1. Login to your cPanel account and select **File Manager** under the Files section.
![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/8e8e5be5-bbd2-4663-8d0e-25c2857b2ea6.png)

2. Inside File Manager, locate the path where configuration.php is stored. Normally, this is located inside the public_html folder (provided you install Joomla in your root domain e.g. www.yourdomain.com).  If you install Joomla in a subdirectory, the file is located in **/public_html/yourdomain.com/subfolder**

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/650a45b1-e339-4596-9dd3-ef30b5881026.png)

In our example, we are going to edit the configuration.php file obtained inside the Joomla subdirectory. Press the Edit button as highlighted and hit the edit button again once the pop-up appears. 


3. Edit  public $live_site and enter your new Joomla website address as shown below.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/cc99043a-3324-4e2b-a8a7-4d03ec14f117.png)


4. On the same page, scroll down and edit both public $log_path and $tmp_path. You need to make sure your path is properly set or else error message shall appear.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/2028e222-69ba-4a1f-969f-b0b58c5c4c3f.png)

Once you're done, press the **Save Changes** button at the top right corner and hit the **Close** button.

|| NOTE: Now make sure that you have actually moved __all the files__ to the new folder where your new Joomla domain is located. 

Now we shall move to second part, which is backup and edit your Joomla database. In order to edit the database, please follow these steps.



### Section 2: Backup & Edit MySQL Database for Joomla

1. Login to cPanel > File Manager and locate the configuration.php file. This time edit the _configuration.php_ and look for **public $db =**. Make sure to copy down this data which is very important.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/b8f4a6ee-39db-4403-b9b3-3124f0582047.png)


2. Press the close button and return to your cPanel. Next, click on **phpMyAdmin** under the databases section.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/40270fbb-a73d-4201-bbbf-a757295ac659.png)

3. You will be redirected to phpMyAdmin. Click on your Joomla database name e.g. _joom760_ and press the **check all** button as seen below. Click the drop down box and select "Export".

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/dad92efa-939b-4313-8710-ffedfe5a5735.png)


4. Tick the boxes for **Custom** and **Format: SQL**

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/15741e13-7e87-42e0-97c7-4bf3cc16b111.png)

On the same page, scroll down and check all the boxes as follow:

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/8f8c5d29-c473-4988-8a36-49ddbe5f03b3.png)

Press the **Go** button on the bottom of the page to begin your database download (SQL).


5.  Now open your newly downloaded SQL file by using **Wordpad**. Use the **Search and Replace** function (**CTRL+H**) to replace old Joomla domain/path with the new domain name/path. In our example, we shall use the Search and Replace function to replace the old path into a new path e.g. from **www.myjoomladomain.com/joomla/** to **www.myjoomladomain.com/joomla2/**

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/0e6161ad-5344-4b74-8393-bd821ca2e7be.png)

Once replacement is done make sure that you save the changes. 

|| DO NOT USE MS WORD FOR THIS EDITING WORK. ONLY USE WORDPAD 

6. 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: 

You may follow this complete tutorial [here](https://help.serverfreak.com/en/article/how-to-create-mysql-database-with-mysql-database-wizard-ndj1ch/) to perform this task.

Remember to save the newly created database name and username once you have performed the above tutorial.

7. After that you can upload the database using phpMyAdmin menu: 
 
![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/356d7465-3cb3-42b5-bca7-f8ca3f376113.png)


8. 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: 
 
![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/7da8c714-7294-483f-987d-7108301544ce.png)

Press the **Go** button.


9. 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'; 

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/429543ad-bc1f-4c5a-a514-2b2c9219f181.png)


10.  That's all. You can now test your new Joomla website.