Lock down

I ran some security upgrades on the site and promptly ran into a problem with the user permissions not being set right. Google to the rescue.

Once your tables are renamed with a different prefix, you need to modify the prefix_usermeta and prefix_options tables with the following code:

SQL:
  1. UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , ‘wp_‘, ‘prefix_‘ );
SQL:
  1. UPDATE `prefix_options` SET `option_name` = ‘prefix_user_roles’ WHERE `option_name` =‘wp_user_roles’ AND `blog_id` =0;

Replace all occurrences of prefix with your changed version and you are good to go.

Discussion Area - Leave a Comment