Changing the config.php file

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
tkelly16
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Apr 24, 2009 8:40 pm

Changing the config.php file

Post by tkelly16 » Thu Mar 29, 2012 2:33 pm

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.

Quazar-X
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 146
Joined: Thu Mar 08, 2012 5:13 am

Re: Changing the config.php file

Post by Quazar-X » Thu Mar 29, 2012 2:52 pm

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
http://www.expothemes.com :pop -- Themes For Windows 7 & Windows 8

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Changing the config.php file

Post by leolam » Sun Apr 01, 2012 4:18 am

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)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

Quazar-X
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 146
Joined: Thu Mar 08, 2012 5:13 am

Re: Changing the config.php file

Post by Quazar-X » Sun Apr 01, 2012 10:07 am

Good work leolam.
He should be able to change it from Global configuration.
http://www.expothemes.com :pop -- Themes For Windows 7 & Windows 8


Locked

Return to “Installation Joomla! 2.5”