How To Solve “You do not have sufficient permissions to access this page” after a DataBase Prefix Change
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 😉
Latest posts by Makis Mourelatos (see all)
- How Find Out If Your Website Is Hacked - June 23, 2017
- Extra Hardening: Take care your HTTP Security Headers - May 15, 2017
- WordPress Hacked Redirect, How to Detect and Clean it - January 2, 2017