Jul/097
“You do not have sufficient permissions to access this page” after Wordpress upgrade




(2 votes, average: 4.50 out of 5)If you’ve done a wordpress upgrade which included either copying another wp database or changing the current one’s table prefix (as well as changing the $table_prefix PHP variable in your config file,) you will most likely be met with this warning when you try to log in:
You do not have sufficient permissions to access this page.
The reason for this is that everything in wordpress that accesses info in the db does so from PHP using the $table_prefix variable, and when you first installed your blog, a couple of options are set in the database that include that value, which makes it not really so dynamic! ;)
After rooting through my db, I found 5 or 6 values that still had the old table prefix in – mostly in the `usermeta` table, but also one in the `options` table. To make sure I got them all, I ran these simple SQL statements in phpMyAdmin to update all the values:
UPDATE `wp2_usermeta` SET `meta_key` = REPLACE(`meta_key`, 'wp_', 'wp2_');
UPDATE `wp2_options` SET `option_name` = REPLACE(`option_name`, 'wp_', 'wp2_');
(note: please be sure to backup your database before you execute any SQL on it – if something goes wrong, there’s not a lot you can do to recover it without a backup!)
In those two examples, assume the original prefix was “wp” and the new one is “wp2″.
With that done, I can now log in to my newly upgraded blog again! :)
Categories
- General (3)
- Hints and Tips (6)
- Lol (1)
- Other (2)
- Uncategorized (1)
- Web Design (2)
- Web Development (4)
Archives
- September 2009 (1)
- August 2009 (2)
- July 2009 (2)
- April 2009 (2)
- February 2009 (2)
- September 2008 (1)
- May 2008 (4)
Recent Comments
- How to get album covers on an ipod touch? | Albums on Album artwork doesn’t show on iPod touch
- Aaron on “You do not have sufficient permissions to access this page” after Wordpress upgrade
- James Chorlton on “You do not have sufficient permissions to access this page” after Wordpress upgrade
- Harry on Album artwork doesn’t show on iPod touch
- Sapam on Album artwork doesn’t show on iPod touch
4:34 am on July 16th, 2009
hey I seem to be getting this error message when I try to access the options and configuration for this plugin:
softsift.com/thumbnail-summary-plugin
I was wondering if you can help me fix this so that I can access this plugin from my settings panel of wordpress 2.8.2
all of my other plugs work and can be accessed under the settings panel of wordpress admin. but this one doesnt for some reason
11:32 am on July 16th, 2009
It just don’t make sense to me, plain damn weird…
5:48 pm on July 21st, 2009
Here’s a handy page I found with another possible solution:
http://markjaquith.wordpress.com/2006/03/28/wordpress-error-you-do-not-have-sufficient-permissions-to-access-this-page/
3:50 pm on July 25th, 2009
hmmm, great post
4:37 pm on August 28th, 2009
Thanks man! Pffew, I thought I had messed up my DB after changing the prefix…
9:31 pm on February 11th, 2010
Great help after I changed the table prefix on my install.
Thanks!!
1:42 am on February 26th, 2010
Thanks so much! You saved me a lot of hassle sleuthing this one out.