0

Rename WordPress database table prefix using PHPMyAdmin

By 18th June 2015Blog

For security, when I create a new WordPress installation, as standard – I will do a number of things to help protect WordPress.  One of those things is to rename the default database table prefix from the default wp_.

It’s good practice to do this when starting a new WP project, but you can still do this AFTER or at any time.

With the example below, I am changing my prefix from ‘wp_’ to ‘pro_’, but you can change it to anything!

 

1. Change the prefix in wp-config.php, found in the root of your WP install

$table_prefix  = 'pro_';

2. Open PHPMyAdmin and run this SQL query:

RENAME table `wp_commentmeta` TO `pro_commentmeta`;
RENAME table `wp_comments` TO `pro_comments`;
RENAME table `wp_links` TO `pro_links`;
RENAME table `wp_options` TO `pro_options`;
RENAME table `wp_postmeta` TO `pro_postmeta`;
RENAME table `wp_posts` TO `pro_posts`;
RENAME table `wp_terms` TO `pro_terms`;
RENAME table `wp_term_relationships` TO `pro_term_relationships`;
RENAME table `wp_term_taxonomy` TO `pro_term_taxonomy`;
RENAME table `wp_usermeta` TO `pro_usermeta`;
RENAME table `wp_users` TO `pro_users`;

And that’s it!

Phil

Phil

I'm a Wordpress web developer and website designer based in Cheshire, UK. I specialise in Wordpress, Responsive design and website conversion. | Twitter | Linkedin

Leave a Reply