Manual:$wgDBprefix
From Linux Web Expert
<translate> Database settings</translate>: $wgDBprefix | |
---|---|
Table name prefix. |
|
<translate> Introduced in version:</translate> | 1.4.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (string) |
<translate> Default value:</translate> | '' |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Details
Table name prefix. This should be alphanumeric, contain neither spaces nor hyphens, and end in "_". If you only have access to a single database and wish to install more than one version of MediaWiki, or have other applications that also use the database, you can give the table names a unique prefix to stop any naming conflicts or confusion.
For example, if you use the prefix 'wiki_' then the table 'page' will be named 'wiki_page' instead.
You need to set this at the time of initial configuration, or manually change the table names at a later date. Changing this setting does not automatically update the names of the tables in your database.
This setting is NOT used if your database is PostgreSQL: instead, schemas are used (see
$wgDBmwschema
).[1]Common value
Many installers set the database table prefix "$wgDBprefix
" to "mw_
" by default.[2][3][4]
File:OOjs UI icon alert-destructive.svg <translate> Caution:</translate> |
|
References
- ↑ Reminder: Don't set $wgDBprefix when you're using Postgres, 2020-05-18
- ↑ Mark S. Choate. "Professional Wikis". p. 34.
- ↑ Daniel J. Barrett. "MediaWiki: Wikipedia and Beyond". p. 186.
- ↑ "Table prefix for db tables".
See also
- Database field prefixes
- Manual:SQL patch file , where
/*_*/
is used for$wgDBprefix