How to determine your database prefix: Difference between revisions

From Joomla! Documentation

Toretto (talk | contribs)
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
There are various ways to determine your database prefix. One requires access to the root of your Joomla! site while the other requires access to the Joomla! back-end.
There are few methods to determine your database prefix. The recommended method is to view the [[J3.2:Global_configuration#.E2.80.9CDatabase_Settings.E2.80.9D_Group|Global Configuration Database Settings]] Group from the administrator view of your Joomla! website. There are two other methods also available, but require server access to the files or the database.
{{warning|Changing your prefix in Global Settings will break your website! If you must change the prefix of your database, it will be a two step process and beyond the scope of this article.|title=Never Change Your Database Prefix!}}
== Using the Joomla! Back-end (Super administrators only) ==
# Log in to the Joomla! backend.
# Go to ''Global Configuration'' by clicking the button in the control panel or via the menu (''Site > Global Configuration'').
# Go to the ''Server'' Tab.
# Under ''Database Settings'', look for ''Database Prefix'' field. The value you find there is your database prefix.
{{tip|Look for the yellow warning symbol.}}


== Using Configuration.php (Requires Access to the Site Root) ==
# Go to the document root and find the ''configuration.php'' file.
# Open the file in a text editor.
# Search for the word ''dbprefix''.
# You'll see the line var $dbprefix = 'value'. The value you see here (for example, ''jos_'') is your database prefix.


== Using the Joomla! back-end (Super administrators only) ==
== Using a Database Interface (Requires Access to the Database, e.g. phpMyAdmin for MySQL) ==
Log into your database using phpMyAdmin.  You will need the database username and password - you will have these from when you created the database. (If you do not have the username and password available you can retrieve them from the Joomla! website's configuration.php file - using the $user and $password variables to login.)


1.  Log in to the Joomla! backend
When you are connected to the database - look at the name of every table of the websiteIt will begin with a group of letters and the underscore symbol ('_').  These letters and the underscore is the database prefix for your websiteAn example prefix looks like this: 'jos_'.
2. Go to "Global Configuration" by clicking the button or via the menu (Site > Global Configuration)
3.  Go to the "Server" Tab.
4Under "Database Settings", look for "database prefix.  The value you find there is your database prefix.
''Tip: Look for the yellow warning symbol''
 
 
== Using Configuration.php (Requires acces to site root) ==
 
1Go to the document root, and find "configuration.php"
2.  Open the file in a text editor.
3.  Search for "dbprefix".
4You'll see the line var $dbprefix = '''value''. The value you see here (e.g jos_) is your database prefix. 


If you have several databases make sure you connect to the database for your Joomla! website - you will find the name in the configuration.php file in the $db variable.


[[Category:Database]]
[[Category:Database]]
{{stub}}
[[Category:Stubs]]

Latest revision as of 17:48, 28 March 2016

There are few methods to determine your database prefix. The recommended method is to view the Global Configuration Database Settings Group from the administrator view of your Joomla! website. There are two other methods also available, but require server access to the files or the database.

Never Change Your Database Prefix!

Changing your prefix in Global Settings will break your website! If you must change the prefix of your database, it will be a two step process and beyond the scope of this article.

Using the Joomla! Back-end (Super administrators only)

  1. Log in to the Joomla! backend.
  2. Go to Global Configuration by clicking the button in the control panel or via the menu (Site > Global Configuration).
  3. Go to the Server Tab.
  4. Under Database Settings, look for Database Prefix field. The value you find there is your database prefix.
A Tip!

Look for the yellow warning symbol.

Using Configuration.php (Requires Access to the Site Root)

  1. Go to the document root and find the configuration.php file.
  2. Open the file in a text editor.
  3. Search for the word dbprefix.
  4. You'll see the line var $dbprefix = 'value'. The value you see here (for example, jos_) is your database prefix.

Using a Database Interface (Requires Access to the Database, e.g. phpMyAdmin for MySQL)

Log into your database using phpMyAdmin. You will need the database username and password - you will have these from when you created the database. (If you do not have the username and password available you can retrieve them from the Joomla! website's configuration.php file - using the $user and $password variables to login.)

When you are connected to the database - look at the name of every table of the website. It will begin with a group of letters and the underscore symbol ('_'). These letters and the underscore is the database prefix for your website. An example prefix looks like this: 'jos_'.

If you have several databases make sure you connect to the database for your Joomla! website - you will find the name in the configuration.php file in the $db variable.