WP Manifestindependent plugin directory
manifest / security / db-prefix-change

Change Database Prefix

A WordPress plugin to rename all database table prefixes from the admin panel — no manual SQL required.

by Paul Combs · github.com/canon2k5/db-prefix-change · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/canon2k5/db-prefix-change/archive/refs/heads/main.zip

A WordPress plugin to rename all database table prefixes from the admin panel — no manual SQL required.

Requires: WordPress 6.0+ · PHP 8.0+ · License: GPL-2.0+


Installation

  1. Upload the db-prefix-change folder to /wp-content/plugins/.
  2. Activate through Plugins in the WordPress admin.
  3. Navigate to Settings → Change DB Prefix.

Usage

  1. Back up your database. This operation cannot be undone automatically.
  2. Check the status indicators at the top of the plugin page:
    • wp-config.php writable must show ✓
    • Database ALTER rights must show ✓ or ? (unknown does not block)
  3. Confirm the existing prefix shown in the Existing Prefix field (pre-filled from your installation).
  4. Enter the desired new prefix in the New Prefix field. Must begin with a letter. Allowed characters: letters, digits, and _ (underscore). Minimum 2 characters.
  5. Click Preview Changes to see the full list of tables that will be renamed.
  6. Tick the confirmation checkbox, then click Save Changes.

What Gets Changed

Target Change
All {old_prefix}* database tables Renamed to {new_prefix}* via RENAME TABLE
{new_prefix}options · option_name user_roles key updated
{new_prefix}usermeta · meta_key All prefix-bearing keys updated (capabilities, session tokens, user settings, metabox orders, etc.)
wp-config.php $table_prefix Updated to the new prefix (if wp-config.php is writable)

Warning: Always back up your database before running this plugin. If wp-config.php is not writable, table renaming will still proceed but you must update $table_prefix in wp-config.php manually.

Screenshots

Settings panel Settings panel

Limitations

  • Not compatible with WordPress Multisite.
  • Requires the database user to have ALTER and RENAME privileges.
  • Requires wp-config.php to be writable for automatic config update.

License

GPLv2 or later