Manual:renameDbPrefix.php

From Linux Web Expert

Revision as of 17:32, 9 March 2022 by imported>APaskulin (WMF) (Fix typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.13
<translate> MediaWiki version:</translate>

Details

renameDbPrefix.php file is a maintenance script to change the prefix of database tables.

Run this script after changing $wgDBprefix on a wiki. The wiki will have to get downtime to do this correctly.

Arguments

Option Description Required
--old Old db prefix; 0 for none <translate> Required</translate>
--new New db prefix; 0 for none <translate> Required</translate>

Usage

php maintenance/renameDbPrefix.php --old oldDBprefix --new newDBprefix
Terminal

Common error

Invalid prefix!

This error occurs when either the --old or --new value is incorrect.

See also