I ran across a WordPress error after moving a database from a local install (XAMPPlite) to a live server.
You do not have sufficient permissions to access this page
Now this was a puzzle. The kind of puzzle you don’t enjoy getting when you know everything should be working fine.
The following is my unfortunate tale and, while the 1st part may not specifically apply to the above error, it has a bearing on the solution, so bear with me.
The Setup
Here are the steps I took up to the point of getting this error:
- Using the tutorials found here and here, I exported my local MySQL database, created a new database on the server (using Plesk)
- Replaced all mentions of localhost in my exported SQL file with the actual address of the live site
- Imported the local database into the newly created one
- Made some adjustments to the wp_options table and others to make sure the URLs and paths were correct
- Then I uploaded my WordPress files and edited my wp-config.php file and added the correct database info
At that point, it should’ve worked. But it didn’t. I couldn’t even get a single page to load.
Case Matters (Apparently)
When setting up WordPress on my local install via XAMPPlite, I used wp311guP_ (obviously not exactly what I had, for obvious reasons) as the table prefix for WordPress instead of the standard prefix, for security reasons.
Come to find out, the table prefix had gotten changed ever so slightly when the database was created and setup with WordPress.
Example (again, not the actual values I used, obviously ;) ):
The original table prefix I had set: wp311guP_
Table prefix as it was recorded by MySQL: wp311gup_
Notice: For some reason the last letter was changed from a capital P to a lowercase p. I haven’t been able to find any WordPress or MySQL documentation that mentions this, though I haven’t searched too deeply.
Tables? We Don’t Need No Stinking Tables
WordPress couldn’t get connected correctly to the database because it was looking for tables with a prefix that didn’t exist. I changed the table prefix to the lowercase version in wp-config.php because this was easier and faster that going through and replacing all the capital letters in my WordPress database.
Once I made my changes I could view the front page. Huzzah!
But sadly when I entered my login info, I got:
“You do not have sufficient permissions to access this page”
A Solution
After searching on Google for an answer, I found a post on beconfused.com.
The jist of the post is that he ran into similar problems. His problems were a result of manually changing the table prefix for security reasons. To fix things, he had to go into his database and change some of the values to fix the permissions error he was getting when logging in.
This wasn’t exactly what had happened to me, and yet it was the same basic issue.
Looking through his post though, I checked my own database for:
- wp_user_level
- wp_capabilities
I noticed that even though everywhere else the table prefix had been changed to wp311gup_ (lowercase p), in those sections it was still my original wp311guP_ (uppercase P).
Anyhow, I searched and changed all the uppercase versions of the table prefix to the lowercase version and it fixed my WordPress login permissions error.
other Possibilities
My above issue might not be why you’re getting the WordPress permissions error. If you’re getting that error, here are some other possibilities.
No .htaccess File?
If you’re receiving an permissions error, you may also want to check that you have .htaccess in your main WordPress directory. This can also sometimes cause you problems.
Upgrading Problems?
If you’re upgrading from a previous version of WordPress and you get the permissions error, you might look at this solution.
The Conclusion
If you’re going to use a different table prefix than the default (which you should for security reasons), you might want to steer clear of using capital letters in it. They may well be converted to lowercase in the majority of MySQL tables, yet the login tables may leave the capital letter(s) in tact and cause you grief.
Also, the lowercase/uppercase issue may only rear its ugly head once you go to put the site live—I never had a noticeable problem when testing using XAMPPlite.
I’m curious: Has anyone else run into this issue with table prefix characters changing?
Anyone else use uppercase characters in their WordPress tables?
Has anyone found mention of issues with uppercase characters in MySQL table prefixes?

You should

14 Comments to 'WordPress Error: You do not have sufficient permissions to access this page'
June 18th, 2009
Thanks for pointing me in the right direction. I had the ‘You do not have sufficient permissions to access this page’ message after running the WP Security Scan plugin on WP2.8. Suffice to say I won;t be using it to modify my db again!
December 15th, 2009
Let’s me try this tips
December 22nd, 2009
Yes, I have run into the same problem, but not because of capitalization, but rather because I was renaming the database prefix to something different (still lowercase) through a plugin called WP Security Scan. I have not yet solved the problem, but I am getting the same “You do not have sufficient permissions to access this page.” message you had.
December 23rd, 2009
hey, good post and i also like your page layout too. Bookmarked your site and will stop by again,:)
January 28th, 2010
Hey there – Great post! But I’ve had no luck :(
I’m attempting to re-produce my WP Install and Site locally for testing and development.
I’ve got everthing rockin’:
Virtual Host is set for local.domain.org
Site files & WP content work.
BUT on log-in I get the permission error.
I’ve tried the Password reset via the myPHP [http://codex.wordpress.org/Resetting_Your_Password]
I modified the .htaccess
As the post you linked to recommended.
Nothin.
I would greatly appreciate any input or direction.
March 9th, 2010
Moved the db and had the same problem I fixed it by noticing that under wp_user the id of the admin was 2, when I changed it to ID=1 everything worked. I tried every fix I could find on the web and this did the trick no I don’t know why it just worked.
March 10th, 2010
I was able to revert to my original wp_usermeta and the problem was resolved.
I had installed a basic WP on my site and then uploaded my style and plugins. I then used my local phpMyAdmin with MAMP to export my DB.
Using phpMyAdmin on the server I then imported the DB. Fortunately/unfortunately I had given the two DB’s different names. Using the SQL tab and the following script I changed the original name to old; and the newDB name to the original.
RENAME TABLE wp_usermeta TO wp_old_usermeta;
RENAME TABLE wp_imported_usermeta TO wp_usermeta;
If I had the tables named the same this may not have been an issue?? Then again it might have been worse since I would not have a back up.
After doing this I got the nasty “You do not have sufficient permissions to access this page” when I tried to login
So, I reverted the wp_usermeta file and all was good again.
*note: I did swap the wp_post and other tables so that my new data was used.
Thanks for the post.
March 14th, 2010
there is something more about this problem.
u have to change some names in wp_options table too.
http://www.neoegm.com/tech/wor.....wordpress/
May 3rd, 2010
also this link has the exact resolution I needed for the above problem:
http://www.tech-evangelist.com.....rmissions/
May 29th, 2010
I imported the mysql table ‘_users’ and happened the same problem: “You do not have sufficient permissions access to this page.
I looked that in the table ‘_usermeta’ is not consumers who was imported in table ‘_users’.
This problem is solved – join the site as the ‘admin’ and on Control Panel ‘Users’ settings assignment to users any role, such as the ‘Subscriber’.
That’s it – all imported, users can connect to the Webpage as in mysql table ‘_usermeta’ now have the necessary records.
*NOTE: you must have the original records in mysql tables ‘_users’ and ‘_usermeta’ of user ‘admin’.
Sorry for my poor english :)
June 20th, 2010
I don’t know what to do with this error..
:(
June 24th, 2010
@emptybetweenears – thx that solution rocked!
June 27th, 2010
Thanks for the post! The error occured when I updated the prefix manually in phpMyAdmin.
@emptybetweenears thanks for your input. I went to the site and the generator worked great.
May 18th, 2010
[...] to get rid of. There are a lot of sites that indicate the problem is with a failed upgrade or misnamed database tables,but for me it was simply an issue with an old plugin and wasn’t happening anywhere [...]
Subscribe to the Comments RSS feed—Follow the discussion.
Leave a comment
Note: All links in the comments are set to 'nofollow'. Search engines will not follow or index those links.
Follow this post's comments by subscribing to the Comments RSS feed.