WordPress Database Table Prefix Changer

Generate SQL commands to rename tables and update meta keys for a new prefix.

Prefix Configuration

Your current table prefix (e.g., wp_)
Your desired new prefix (e.g., xyz_)

Tables to Rename

Generated SQL Queries

Critical Warning:
  • BACKUP YOUR DATABASE FIRST! This cannot be undone.
  • Test on a staging site before production
  • Run queries in the exact order shown
  • Update wp-config.php with new prefix after running SQL
  • Some plugins may store the prefix - check plugin settings
After Running SQL: Update $table_prefix = ''; in your wp-config.php file.

Features

  • Generate SQL to change WordPress table prefix
  • Rename all standard WordPress tables
  • Update user meta keys that contain prefix
  • Update options table for prefix-dependent values
  • Security enhancement by obscuring table names

How to Use

  1. Enter your current table prefix (usually wp_)
  2. Enter your desired new prefix (e.g., xyz_)
  3. Select which tables to rename (or select all)
  4. BACKUP YOUR DATABASE!
  5. Click "Generate SQL" to create the queries
  6. Run the SQL queries in your database
  7. Update $table_prefix in wp-config.php