If you want to hand code renaming tables, here’s the sample.

Single Table

RENAME TABLE wp_users TO kwg_users;

multiple tables

RENAME TABLE wp_users TO kwtg_users,
wp_usermeta TO kwtg_usermeta,
wp_site TO kwtg_wpsite,
wp_signups TO kwtg_signups;

This is handy when renaming a whole lot of tables as in the case of WordPress mu where each blog has its own set of tables. If you decide to rename them for security reasons (like you forgot to change the default table prefix during installation), it will be a pain to change them one by one through phpMyAdmin.

Comments are closed.

Post Navigation