Change WordPress Table Prefix

As part of hardening your WordPress installation, it is recommended that we change the prefix of our WP tables. In that way, the ‘bad guys’ and script kiddies will have to guess the name of your tables.

[Read more...]

Incoming search terms:

  • table prefix home pl
  • wordpress tagged with prefix

Rename Tables in MySQL

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.

Incoming search terms:

  • mysql rename table recursively
  • rename multiple tables mysql
  • rename table in mysql
  • rinomina wp-posts in my sql