A Guided Tour of Joomla's Configuration.php File
-
Upload
ahmed-el-attar -
Category
Documents
-
view
222 -
download
2
description
Transcript of A Guided Tour of Joomla's Configuration.php File
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 1 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
! By Ed Andrea " 25
January 2012TweetTweet 1
Share 3
A Guided Tour ofJoomla'sconguration.php File
In our forum we are often asked to help with problems with paths,
passwords, data base connections and other basic conguration
issues. This is especially true after a migration or move of a site.
Most of the xes for these problems can be made in your
conguration.php le. We're going to help you get to know it this very
important le.
In this lesson, were going to tell you:
Where you can locate your conguration.php le.
What each line aects and common settings.
Videos Books Support Login Pricing Start a Free 7 Day Trial!
Get all the training! When you join you get access to ALL our training videos and books:
Start a FREE 7 Day Trial
9LikeLike Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 2 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
This is not a comprehensive coding guide, but is a general reference to
help you understand this le.
Location of the conguration.php le
Here's a picture of the location using Filezilla. This installation is in a
sub directory called "joomla" .
Your conguration.php le is located in the root of your joomla
installation. If it's in the main directory the path to it would look
something like this:
/home/username/public_html/conguration.php
In a sub directory or sub domain:
/home/username/public_html/subdirectory/conguration.php
On your computer (using XAMPP as an example)
C:\Documents and Settings\Ed\My
Documents\xampp\htdocs\J17\conguration.php
I shouldn't have to say this, but I will. Make a backup of your current
le before you do anything to it. Use a test site or play with it in a text
editor oine for practice. Don't make changes without a backup. Make
a backup before you move a le to a dierent server or directory.
Get free,weekly
updatesfrom the
OSTrainingblog.
Your email address
Trusted by60,000+readers.
Sign Up for FREE!
PopularNew Posts
OSTrainingWill Release200 Drupal 8Videos forFree
TheBeginner'sGuide toDrupalSecurityReleases
Allow Usersto DeleteTheir DrupalAccounts
Book Review:ProgrammingJoomla!Plugins byJisse Reitsma
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 3 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
We'll go through the le line-by-line and create a quick reference for
each line, with some notes where further explanation might be
needed.
Site Settings
$oine : When set to "0" the site is online. Set to "1" the site is
oine
$oine_message : You can write any text message on this line.
$sitename : The name of the site as it appears in headings
$editor : The editor that is chosen as default in global conguration
$list_limit :The length of lists in the Control Panel for all Users. By
default, this is set to 20.
$access : The default access level to the site. "1" is public access; "2"
is registered; "3" is special
Debug Settings
$debug : "0" is o. "1" is on.
$debug_lang : "0" is o. "1" is on.
Notes:
$debug : This will turn on the debugging system of Joomla!. When set
to Yes, this tool will provide diagnostic information, language
translations, and SQL errors. If any such issues or errors occur, they
will be displayed at the bottom of each page, in both the front-end and
back-end.
Magento isStill FailingBadly atSecurityReleases
UsingAdministrationMenu andShortcuts inDrupal
Drupal: WhatIf Your CleanURL TestFails?
You Can NowGet Live ChatSupport atOSTraining
Create aSlideshowwith JoomlaandFlexSlider 2
Solving theInvalid TokenError inJoomla
BlogCategories
WordPressTutorials
DrupalTutorials
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 4 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
$debug_lang : This will turn on the debugging indicators (*...*) or (?...?)
for the Joomla! Language les. Debug Language will work without the
Debug System tool set to on. But it will not provide additional detailed
references which would help in correcting any errors.
Database Settings
$dbtype : "mysqli" or "mysql"
$host : "localhost" on many servers, not all.
$user : The name of the data base user that has access to the data
base.
$password : The password associated with the data base user. Not
your admin password or FTP password.
$db : The data base name created when you created the data base.
$dbprex : At least three characters ending in an underscore. (Set
when you installed joomla)
Notes
You need this information when you install the site. Forgetting to
change this is often the cause of problems when moving a site. Before
moving any site, make a backup copy of conguration.php so you can
refer to the original settings if you need them.
$dbtype : only change this if you have changed servers and using a
dierent type.
$host : most servers this is localhost. Godaddy and a some others
have dierent names. Check with your hosting company if you're not
sure.
$user : On shared cPanel servers it is often prexed with the user
name - for example edandrea_ed. On your local machine there will not
be a prex unless you created one. It shouldn't be root in any case. If
JoomlaTutorials
CodingTutorials
GhostTutorials
How Tos
WebdesignTutorials
OSTrainingNews
Live Blogs
Education
General
Podcasting
ComebackCities
License
All of our
tutorials
are
published
under the
Creative
Commons Attribution-
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 5 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
you create a site on your local server and don't specify password when
you create a data base, you will be able to access the data without a
password. This is not secure when you move to web server online.
$db : On shared cPanel servers this is usually prexed with a
username - for example edandrea_jml1. On your local machine there
will not be a prex unless you created one. On Godaddy servers this
name is generated by their service and you will not be able to create
your own, see their documentation if you need it.
$dbprex : You cannot create a new one here. This must be the one
that was used when the data base was created, or that is actually used
by the database. If you have more than one data base prex, you can
change this, but you can't create a new one.
Assorted extra features
$live_site : The actual URL of the site for example -
http://yourdomain.com (unless your site is in a subdirectory)
$secret: : DO NOT CHANGE
$gzip : "0" is o; "1" is on.
$error_reporting : "-1" is the appropriate level.
$helpurl : default is joomla help. Can be set to your own help pages.
Notes
$live_site : In the newest versions this should not have a value. There
may be times you do need to ll in a value. If you are redirecting a url
you need to put the actual url to the live site on this line. Or if you are
NonCommercial
license. This
means:
You
can
re-
use
these
tutorials.
You
can
modify
these
tutorials.
You
must
link
back
to
our
original
tutorial.
You
can't
use
these
tutorials
commercially.
Click to
read the
license.
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 6 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
creating a copy of a site for testing and modication. For example, I
have a test site at http://dashhelp.com/joomla17 which is a copy of my
main site. had to change this to line in the conguratiion.php le on
the copy. You will get a page not found error if this is not set to
'http://yourdomain.com/directory" or in the case of a subdomain
"http://subdomain.yourdomain.com" Joomla uses this url to create
relative paths. Essential to check this on test sites.
$secret : This is generated when Joomla! is rst installed and is not
changeable. It is used internally by Joomla! for security purposes.
$error_reporting : This sets the appropriate level of reporting. The
default setting is System Default. Errors can occur that don't have any
eect on the site. You don't need to log all errors unless you're doing
some detailed debugging work. Your logs will just eat up your disk
space otherwise.
$helpurl : The place Joomla! looks for help information when you click
the Help button (visible in many screens and options of the
administration panel). By default, it uses Joomla!'s main help site, but
you could create your own help site, or link people to your ticket
system for help.
$ftp_host: : "127.0.0.1" is the default IP for localhost. Your server may
be dierent.
$ftp_port : "21" is normal default. Check with your host if you are
having problems. Not all servers are the same.
$ftp_user : your FTP user name
$ftp_pass : your FTP password
$ftp_root: : usually a path like /home/username/public_html (no
trailing slash)
$ftp_enable : This setting tells Joomla! to use it's built-in FTP function
instead of the process used by PHP.
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 7 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Time Zone Settings
$oset : default is UTC
$oset_user : default is UTC
Notes
$oset. This tool sets the current date and time. The set time should
be where the site's server is located. The default setting is (UTC 00:00)
Western Europe Time, London, Lisbon, Casablanca.
Here's an example of the oset if the server is in California - US Pacic
time $oset = 'America/Los_Angeles';
Email Settings
$mailer : "mail" uses the PHP mail function; "sendmail" uses SMTP
mail on the server.
$mailfrom : From E-mail. The email address used by Joomla! to send
site email.
$sendmail : The path where the Sendmail program is located. This
path is only used if Mailer is set to Sendmail.
$smtpauth : If the SMTP server requires authentication to send mail,
set this to Yes. Otherwise leave it at No. This is only used if Mailer is set
to Sendmail.
$smtpuser : The username to use for access to the SMTP host. This is
only used if Mailer is set to Sendmail.
$smtppass: The password to use for access to the SMTP host. This is
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 8 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
only used if Mailer is set to Sendmail.
$smtphost : SMTP Host. The SMTP address to use when sending mail.
This is only used if Mailer is set to Sendmail.
$smtpsecure : Select the security model your SMTP server uses -
Default is None. Options are SSL and TTL.
$smtpport : SMTP Port. Most unsecured servers use port 25 and most
secure servers use port 465. Check with your host.
Log Settings
$log_path : '//home/username/public_html/j/logs';
$tmp_path : :'//home/username\public_html/tmp';
Notes
$log_path : The path where the logs should be stored. The Joomla!
installer should automatically ll in this folder. It's not critical to the
operation of the site, so if it's wrong you will only know it if you try to
check the logs.
$tmp_path : This is an important setting and should be lled in
properly. Many problems found when moving sites are caused
because joomla is looking for the old tmp folder. If you get any errors
regarding the tmp folder check this path and make sure it's correct..
Cache Settings
$caching : "0" is o; "1" Conservative setting; "2" Progressive Setting
$cache_handler : "le" full cacheing ; "cachelite" lite cacheing
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 9 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Notes
$caching : This setting sets the maximum length of time (in minutes)
for a cache le to be stored before it is refreshed. The default setting is
15 minutes.
$cache_handler : This setting sets how the cache operates. There is
only one caching mechanism which is le-based.
Cachelite is an alternative to full caching.
Metadata Settings
$MetaDesc : Create a text description for SEO.
$MetaKeys : Insert keywords separated by a comma.
$MetaAuthor : "0" is no; "1" is yes.
Notes
$MetaDesc : This is the Site Meta Description. This is the description of
the site which is indexed by search engine spiders.
$MetaKeys : These are Site Meta Keywords. These keywords describe
the site and are the basis for improving the ability of search engine
spiders ability to index the site.
$MetaAuthor : This shows Author Meta Tag. It shows the Author Meta
information for articles and is used by search engine spiders when
indexing the site.
SEO Settings (Search EngineOptimization)
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 10 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
$sef : "0: is no; "1" is yes
$sef_rewrite : "0" is no; "1" is yes
$sef_sux : "0" is no; "1" is yes
$unicodeslugs : "0" is no; "1" is yes
$feed_limit : default is 10 - any integer can be used
Notes
$sef : This controls Search Engine Friendly URLs. When set to Yes, URLs
are rewritten to be more friendly for search engine spiders. For
example, the URL: www.example.com/index.php?
option=com_content&view=etc..., would turn into:
www.example.com/alias. Most of the items created in Joomla! have an
Alias box where a search engine friendly URL can be inserted. The
default setting is No.
$sef_rewrite : When set to Yes, Joomla! will use the mod_rewrite
settings of Apache when creating search engine friendly URLs. Please
note: it is advised that you do not modify any .htaccess le without an
understanding of how it works. You must use the .htaccess le
provided with Joomla! in order to use this setting. To use this le,
rename the htaccess.txt le (found in the root directory) to .htaccess.
By default, this setting is set to No.
$sef_sux : When set to Yes, Joomla! will add .html to the end of the
URLs. The default setting is No.
$unicodeslugs : Choose between transliteration and unicode aliases.
Transliteration is default. This is an advanced setting and you probably
will not need to change this unless you are and SEO expert.
Session Settings
$lifetime : a whole number indicating minutes.
$session_handler : "database" or "none"
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 11 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Notes
$lifetime : This setting sets how long a session should last and how
long a user can remain signed in for (before logging them o for being
inactive). The default setting is 15 minutes.
$session_handler : This setting sets how the session should be
handled once a user connects and logs into the site. The default
setting is set to Database.
Comments Community Login!1
Sort by Oldest
Join the discussion
Reply
Rouven 3 years agoNice overview. There are actually give a few more cache(and session) handlers available but they depend onother software installed on your server. The globalconfiguration will tell you which are available on yourserver.
Reply
Nick Savov 3 years ago> RouvenThanks for the info, Rouven! We'll have to haveyou do a guest post sometime :)
Kind regards,Nick
Reply
Laura at Aliate 3 years agoIt is great to come across someone who knows howthese things work. I am useless whtn it comes to Joomla,so you really helped me out!
Nick Savov 3 years ago> Laura at AffiliateHi Laura,
Recommend
Share
Share
Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 12 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Reply
Hi Laura,
In that case you should check out online class(http://www.ostraining.com/onli.... It should helpyou to grasp the concepts and to give you theguidance needed to get a firm foundation onJoomla :)
Kind regards,Nick
Reply
Chas Burdick 3 years agoThank you for the line by line, that is very helpful, hope tosee more tutorials like this.
Reply
Nick Savov 3 years ago> Chas BurdickHi Chas,
You're very welcome! We have more planned sostay tuned! :)
Kind regards,Nick
Reply
Glorious Steve 3 years agoExcellent Nick,
I am a beginner. Earlier I was trying out joomla. I begin tounderstand the basics. Thanks a lot!
Reply
Nick Savov 3 years ago> Glorious SteveYou're welcome, Steve!
You should check our Joomla classes(http://www.ostraining.com/onli.... We have aJoomla Beginner class and an Intermediate class,as well as a Joomla template design class.
Kind regards,Nick
Share
Share
Share
Share
Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 13 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Reply
Reply
Bob 3 years agoThanks for this line by line explanation. I often havetrouble when I'm moving a site from my localenvironment to the final active server. The confusion isalways with the $secret and $password items.
If I read the explanation above correctly, the $secret datais part of the database and the info should be retainedfrom the development server's config file and written tothe active server's config file. Whereas the $passwordinfo from the development server's config file should bereplaced with the active server's user password.
Thanks!
Reply
Stix 3 years agohi there, great tutorial. Please also cover the steps tohide all the passwords etc?. especially when u want togive the live site for support to troubleshoot certain issueu dont want them to know the sensitive details. thanks
Reply
sohrab 3 years agoHithis was very useful thank youbut i still have a problem with my sitei wanted to ask if i can use ip numbers instead ifaddress? i dont know my address and my host is notgiving me that, i just have this: 67.228.4.124:3306can i change it address?by the way i am using plesk 8 , anybody know how towork with it?
Jos 3 years agoHi,This is a very nice guided tour!!
In my Joomla 2.5 configuration.php there are 3 moresettings I do not find back, though: public $cookie_path = '';public $cookie_path = '';
Share
Share
Share
Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 14 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
Reply
public $cookie_path = '';public $language = 'en-GB';Of the latter I wonder what it does, since I want to set upa bilingual site. I do not find that info anywhere, not evenon the ocial Joomla site...Thank you, Jos.
1
Reply
Anusha Isaacraj 3 years agoThank you so much...It helped me a lot !
Reply
Abdullah 2 years agoHi, I missed up my configuration.php. I have several copiesand not sure which one if the correct one. none seems towork I still receive errors
Reply
Harish 2 years agoIf default Text Filter values are changed in GlobalConfiguration they are not getting saved. Can I directlyedit configuration.php file to add a line for the same. Iwant to set "No Filtering" option for Super User.
Reply
Ernie 2 years agoTHANK YOU!This has to be the best overview of the configuration.phpfile on the net
Reply
walt 2 years agoNice overview...
It seems a bit strange that this configuration file storesusernames and passwords in plain text. Seems like thatmight become a security risk, if someone could read thefile (good thing that when correctly configured .php filesare not permitted for direct access).
Site help a year agoCan any please tell me in what way is it possible to
Share
Share
Share
Share
Share
Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 15 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
WordPress MembershipOptions2 comments 2 months ago
Solving the Invalid TokenError in Joomla5 comments 13 days ago
Easily Apply Drupal Patcheswith Patch Manager9 comments a month ago
DrupalCon Los AngelesReview3 comments 2 months ago
ALSO ON OSTRAINING
Reply
Can any please tell me in what way is it possible toremove global configuration and super user admin fromjoomla? I have paid someone to do a site for me I believethey have got into the backend somehow and defacedme from changing settings such as the global config. Iam not an expert on the computer but I would appreciatesome help if anyone knows how I can regain access andstop any loophole how they can regain access to thesite.
Reply
surajverma_rv a year agoperfect description... ;) :))))))))))))
Reply
fela 7 months agohow can i have more than one db user inconfiguration.php
Reply
fela 7 months agohow can i add more than one database user toconfiguration.php?
WHAT'S THIS?
Subscribe
Add Disqus to your sited
Privacy(
Share
Share
Share
Share
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 16 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
back to top
Get all the training! When you join you get access to ALL our training videos and books:
Start a FREE 7 Day Trial
Get free, weekly updatesfrom the OSTraining Newsletter Your email address Sign Up!
# (+1) 678-830-2168 | $ [email protected] | % Contact us
& ' + )
OurTraining
Video Training
Books
On-Site Training
Our Books
Drupal 7 Explained
Joomla 3 Explained
Joomla Explained
AboutOSTraining
About Us
Our Team
Our Blog & Press
Releases
GetInvolved
Become an Aliate
Become a Video
Trainer
Become a Tutorial
Writer
-
7/16/15, 4:54 AMA Guided Tour of Joomla's configuration.php File
Page 17 of 17https://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/
2015 | Open Source Training LLC | All Rights Reserved