This is just a quick guide on how you can edit the configuration file in Joomla. This is useful when you have recently changed your mysql database password. And whenever you access Joomla in your localhost, it says that it cannot connect to the database.
To edit the Joomla configuration file, just open up the folder where you have installed Joomla. Mine is in:
Then open up the configuration.php file on a text editor.
We are only interested in the final parts of the file. I’ve already commented the important parts that you may need to modify:
var $db = 'joomladb'; //this is the database where all the data used by joomla is stored var $dbprefix = 'jos_'; var $mailer = 'mail'; var $mailfrom = 'email@example.com'; var $fromname = 'JoomlaTesting'; var $sendmail = '/usr/sbin/sendmail'; var $smtpauth = '0'; var $smtpsecure = 'none'; var $smtpport = '25'; var $smtpuser = ''; var $smtppass = ''; var $smtphost = 'localhost'; //host, its usually called localhost. Since the Joomla CMS is hosted on your local computer var $MetaAuthor = '1'; var $MetaTitle = '1'; var $lifetime = '60'; var $session_handler = 'database'; var $password = '1234'; //password, this is the one that you may want to change depending on your current mysql database password.