How to solve ‘You do not have sufficient permissions to access this page.’ in WordPress

I have been getting the following error because I changed the database table prefix

You do not have sufficient permissions to access this page.

The cause of the problem is that you have changed the database prefixes but still, some of the word press config is tied down to the previous prefix (wp_ or something)

Just execute the following two queries

-- Replace 'prefix_' with your actual prefix
UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'prefix_' );

-- Replace 'prefix_' with your actual prefix
UPDATE `prefix_options` SET `option_name` = 'prefix_user_roles' WHERE `option_name` ='wp_user_roles' AND `blog_id` =0;

Related posts:

  1. How to backup Stored Procedures in MySQL?
  2. Using CPanel/WHM API to get detail list of all accounts
  3. WordPress 2.9 is cool!
  4. phpMyChat Vulnerability – seeking help from the officials
  5. A Bug in WordPress v 2.5.1

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>