How To Solve “You do not have sufficient permissions to access this page” after a DataBase Prefix Change

Posted on March 27, 2014 @ 3:32 am

Tags: , , ,

No Comments

Last updated on December 26th, 2015 at 10:30 pm

Can't log into you WordPress Dashboard after a Database Prefix change?

If you ever changed your database prefix from the default one of wp_ to something else for example newp_ and tried to login into your WP DashBoard afterwards you may have received this warning.

Well, even though you may have changed your database table prefixes from the old wp_ to the new one newwp_ there are still some meta_key and option_name values that didn't get updated to the new database prefix.

In order to deal with this issue you must manually update those records by logging to your database phpmyadmin and run the following two sql statements:

UPDATE `newwp_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'newwp_' );
UPDATE `newwp_options` SET `option_name` = 'newwp_user_roles' WHERE `option_name` ='wp_user_roles'

where newwp_ is your new WordPress Database prefix and wp_ is your old one.

When done try to log into your WP Dashboard once more and you'll be glad to see that it works 😉

Makis Mourelatos

WordPress Security Engineer at FixMyWP
WC Athens 2016 co-organizer, WP Support and Security Aficionado, Wannabe Kitesurfer.

Leave a Reply

Your email address will not be published. Required fields are marked *