Page 1 of 1

Changing the config.php file

Posted: Thu Mar 29, 2012 2:33 pm
by tkelly16
Ok, here is what I tried and thought would work but has not. I built a joomla site on a free hosting server which (surprise!! lol) is not very reliable, so I want to move it to another host without having to completely rebuild the entire site. So I exported the mysql database, created a new one on the new server, and imported that database into it. Then I downloaded the entire site and uploaded it to the new folder on the new server. Nothing, then it dawned on me that the mysql server host name would need to be changed, so I went into the config.php file and changed it to the correct one, and the site is still not working. I'm not sure what to do from here. Thanks any help would be greatly appreciated.

Re: Changing the config.php file

Posted: Thu Mar 29, 2012 2:52 pm
by Quazar-X
You should change below fields from config.php
public $host = '';
public $user = '';
public $password = '';
public $db = 's';

you have mentioned of changing only host name, do change them all with new settings

Re: Changing the config.php file

Posted: Sun Apr 01, 2012 4:18 am
by leolam
Quazar-X is mostly right but forgetting 2 lines of code which need changed as well:
public $log_path = '/home/your_username/public_html/logs';
public $tmp_path = '/home/your-username/public_html/tmp';
This is the way the pathname works on a host that uses cPanel

Host in cPanel is "localhost"
in cpanel you need your_username within the entries
public $user = 'your-username_your-user;
public $password = '';
public $db = 'your-username_your-databasename';

Leo 8)

Re: Changing the config.php file

Posted: Sun Apr 01, 2012 10:07 am
by Quazar-X
Good work leolam.
He should be able to change it from Global configuration.