المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : تغيير رابط جملة change Joomla site address (URL)



Rise Company
26-06-2017, 12:24
تغيير رابط جملة change Joomla site address (URL)

التغيير من خلال ملف configuration وايضا من خلال قاعدة البيانات.



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:

https://www.rise.company/forum/images/imported/2017/06/36.png

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

https://www.rise.company/forum/images/imported/2017/06/37.png

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

public $live_site = '';

https://www.rise.company/forum/images/imported/2017/06/38.png

4. Enter a new website URL in this line:

https://www.rise.company/forum/images/imported/2017/06/39.png

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

https://www.rise.company/forum/images/imported/2017/06/40.png

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:

https://www.rise.company/forum/images/imported/2017/06/41.png

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:

https://www.rise.company/forum/images/imported/2017/06/42.png

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:

https://www.rise.company/forum/images/imported/2017/06/43.png

Download database file here:

https://www.rise.company/forum/images/imported/2017/06/44.png

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:

https://www.rise.company/forum/images/imported/2017/06/45.png

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:

https://www.rise.company/forum/images/imported/2017/06/46.png

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

https://www.rise.company/forum/images/imported/2017/06/47.png

https://www.rise.company/forum/images/imported/2017/06/48.png

https://www.rise.company/forum/images/imported/2017/06/49.png

https://www.rise.company/forum/images/imported/2017/06/50.png

https://www.rise.company/forum/images/imported/2017/06/51.png

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

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

https://www.rise.company/forum/images/imported/2017/06/52.png

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:

https://www.rise.company/forum/images/imported/2017/06/53.png

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

https://www.rise.company/forum/images/imported/2017/06/54.png




ملحوظة اثناء التعديل فى قاعدة البيانات:

مثال شكل الروابط

"https:\\/www\\/.rise.company\\/eng\\/images\\/industrix\\/slide\\/slide-a4.jpg"


يفصل بين كل مسار ب "/"