“You do not have sufficient permissions to access this page” after database prefix change
After several times moving WordPress websites from one host to another, I get this painfully permission denied for superadmin user “You do not have sufficient permissions to access this page”. The frontend page was all fine. But I can’t access the admin page. Then I found these people who have the same problem and found the solution (http://wordpress.org/support/topic/sudden-you-do-not-have-sufficient-permissions-to-access-this-page-error).
The main cause is the database prefix changes. It cause the wordpress doesn’t recognize the admininstrator privilege. if you look into the wp_options table, the option_name from roles is wp_user_roles. The wp_ should match the table prefix. So if you change the wp_options table to en_options, then you must change the options_name to en_user_roles. That’s how the wordpress recognize the roles.
Besides that, user to role mapping also use the table prefix. You can see it in wp_usermeta tables. There is a meta_key called wp_capabilities. The wp_ is the table prefix of the wordpress tables. So if you change the table prefix e.q. wp_usermeta to en_usermeta, then you should change the wp_capabilities to en_capabilities.
Thats how you fix the permission problem to wp_admin page.
Have a good day
12 responses to ““You do not have sufficient permissions to access this page” after database prefix change”
Leave a comment Cancel reply
Search My Site
Categories
- Article (1)
- ASP.NET (1)
- Christians (1)
- Git (2)
- Instruction (5)
- iPhone (1)
- Just 4 Fun (3)
- Knowledge (58)
- Mobile Phone (1)
- Multimedia (18)
- My reflection (29)
- News (2)
- PHP (1)
- Uncategorized (2)
- Wordpress (22)
Archives
- April 2013 (3)
- February 2013 (2)
- January 2013 (4)
- December 2012 (2)
- September 2012 (4)
- August 2012 (1)
- July 2012 (4)
- June 2012 (2)
- May 2012 (4)
- April 2012 (4)
- March 2012 (2)
- February 2012 (6)
- January 2012 (1)
- May 2011 (6)
- April 2011 (2)
- March 2011 (2)
- January 2011 (1)
- December 2010 (1)
- September 2010 (3)
- August 2010 (10)
- July 2010 (2)
- June 2010 (3)
- May 2010 (7)
- April 2010 (2)
- March 2010 (7)
- January 2010 (7)
- December 2009 (10)
- November 2009 (6)
- October 2009 (11)
- August 2009 (15)
- July 2009 (12)
Recent Comments
Dennis on Change breadcrumb separator on… | |
Mr. Miles on Windows 7: Install the same up… | |
conorrobotham on “You do not have suffici… | |
miles on Windows 7: Install the same up… | |
acoi kumar on transfer pulsa 3 | |
Paul A on Windows 7: Install the same up… |
Blogs
Christians
My Community
Website
Top Posts
- Git Flow Command
- Git change remote URL
- PHP command line syntax checking
- Add Currency to Woocommerce
- Access Remote file share with username and password in C#
- Add Watermark to Textbox using jQuery
- Contact Form 7 watermark for select menu
- Add User to SQL Server Database
- Retina Display Media Query
- Add "first" and "last" CSS classes to dynamic sidebar widgets.
Recent Posts
Blog Stats
- 283,052 hits
Thanks, you saved me pulling my hair out 🙂
I’m having problems with only the “user” getting this error message after loggin in. Can you tell me do I change the same things or something else.
Thank you so much Eric. I, too, retain a full head of hair.
Thanks a ton buddy! this solved my problem
It took me a while to figure out what table, fields and values, but it all works. I create screen caps for future troubleshooting and documentation. Thank you so much.
thx
Ohh.. Thanks a lot for this. I moved my wp site to a new host, then I got this permission error. It was a total headache, searched many articles. At last now I’m fixed it, thank you so much…. 🙂
I was trying to add the Google Plus Authorship plug in and I got the “You do not have sufficient permissions to access this page” !
I found that there was an issue with Google Analytics for WordPress plugin. Once I manually set the Google Analytics code. I no longer have this issue showing up.
Thanks….I was just looking for wp_user_roles
Ha! Helpful article, thanks a lot 🙂
Thanks to your article I managed to create a complete copy of our WordPress installation to use as test-environment – thank you!
You hero!!