WordPress Error: You do not have sufficient permissions to access this page
Some people, upon upgrading from WordPress 1.5.x to 2.0.x have been experiencing this error:
You do not have sufficient permissions to access this page
The most common cause of this error is an upgrade that didn’t complete. The database number has been incremented, so WordPress thinks it is up to date, but it hasn’t yet written the permissions that you will need to access the WordPress admin interface.
I have written a script to force the 1.5.x to 2.0.x upgrade.
Download
Instructions
- Click “Download” and save as
force-upgrade.php - Upload
force-upgrade.phpto your WordPress root directory (the directory withwp-config.php) - Access the file in your browser (e.g.
http://example.com/wordpress/force-upgrade.php) - Delete
force-upgrade.phpfrom your server
I won’t promise you that this will solve all your problems, but it has helped several people who have tried it. Let me know how you fare.
Hey, It Worked For Me!
[...] I found this helpful post from Mark Jaquith where he provided a script to “force” the WordPress upgrade to finish. It worked perfectly and now I’m back in business. [...]
Excellent job. Thanks so much for the assist.
This is the sequence of events when I run your script. Thoughts? Thanks much!
WordPress loaded…
Upgrade functions loaded…
Object cache flushed…
Database made current…
Fatal error: Call to undefined function: upgrade_160() in /home/vatulnet/public_html/blog/force-upgrade.php on line 35
I guess I need a new upgrade-functions.php file with a definition for upgrade_160.
Yeah, you’ll need the latest version of WordPress with upgrade_160();
Hi Mark,
Thanks for the script - gave it a spin but no joy. I am only encountering this issue with users who sign up to post comments. Admin is fine.
Still hunting for a cure!
All the best,
Tom
[...] [Update: Tried out the advice listed here, alas no joy as yet] [...]
Tom,
Possible problem:
Maybe your default role (subscriber?) doesn’t have any capabilities. Try the Role Manager plugin (Google it) and make sure the Subscriber role looks correct.
Hey Mark,
Thanks for that - installed the Red Alt version, and upped the permissions to allow a subscriber to “Edit Post” (closest thing to post comment I could see).
Clicked on the “logged in” URL and it allowed me to login - yeah, unfortunately thrown straight back to the original post with no option to add anything.
Curiouser and curiouser.
Appreciate the heads up on the role manager - didn’t have a clue it was required.
“Everyone is ignorant - only on different subjects…”
All the best,
Tom
man.. I LOVE YOU!THANKS I Resolved my problem!
You’re a genius! Thanks!
seems to be working, thanks for making my day easier!
[...] _ WordPress Error: You do not have sufficient permissions to access this page « Mark on WordPress Doing WP upgrades? Check it out… [...]
Mark! THANK YOU!! OMG, I was freaking out. I’m finally going to start blogging on scripty again, upgraded to the latest version of WP, it failed, couldn’t access anything… this did the trick. THANK YOU THANK YOU THANK YOU!!!
[...] 1) When I ran the upgrade, it sort of died before finishing… I refreshed and it told me it was all set. Checked on the main page, and everything seemed to be okay - but when I logged in to start tinkering around with the settings, I couldn’t log in completely. I got the dashboard with no navigation and then I clicked on something and all it wanted to do was send me to the profile page - but with nothing showing except “You do not have sufficient permissions to access this page”. Googled for a solution and found one on Mark’s site. Ran his script, and all was well again. [...]
Thanks mark! It worked.
[...] encontré esta página que explicaba el error, y pude [...]
when i upgrade 2.0.5 to 2.1, i met the same problem, unfortunely, it doesnt work any more, can you write a new one to solve “to 2.1″problem?
did this… then i could log in.. but do not have admin-rights now :/
WKR AveN
please help
i moved my db, i added prefix to it, i went and manually changed wp-config.php and added my prefix there, but now it takes my username and password for wp-admin, but i get following error
You do not have sufficient permissions to access this page.
and i haven’t changed word press itself, i’m on same version
From 1.5 to WordPress 2.1.3 it works! Useful script, thanks.
I tried using this software as I have had problems since attempting to upgrade from 1.5 to 2.1.3.
Unfortunately, the problems still remain. My DB tables seem to be a mixture of 1.5 and 2.1
When running force-upgrade.php, I got:
WordPress loaded…
Upgrade functions loaded…
Object cache flushed…
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_categories']
ALTER TABLE wp_categories ADD COLUMN link_count bigint(20) NOT NULL default ‘0′
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_categories']
ALTER TABLE wp_categories ADD COLUMN posts_private tinyint(1) NOT NULL default ‘0′
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_categories']
ALTER TABLE wp_categories ADD COLUMN links_private tinyint(1) NOT NULL default ‘0′
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_posts']
NOT NULL default ‘publish’
ALTER TABLE wp_posts CHANGE COLUMN post_status post_status enum(’publish’,'draft’,'private’,’static’,'object’,'attachment’,'inherit’,'future’
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_posts']
ALTER TABLE wp_posts CHANGE COLUMN post_type post_type varchar(20) NOT NULL default ‘post’
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_posts']
ALTER TABLE wp_posts ALTER COLUMN post_type SET DEFAULT ‘post’
WordPress database error: [ALTER command denied to user 'smargolisbl'@'localhost' for table 'wp_posts']
ALTER TABLE wp_posts ADD KEY type_status_date (post_type,post_status,post_date,ID)
1. Added column wp_categories.link_count
to enum(’publish’,'draft’,'private’,’static’,'object’,'attachment’,'inherit’,'future’ 
2. Added column wp_categories.posts_private
3. Added column wp_categories.links_private
4. Changed type of wp_posts.post_status from enum(’publish’,'draft’,'private’,’static’,'object’,'attachment’
5. Changed default value of wp_posts.post_type from to post
6. Added index wp_posts KEY type_status_date (post_type,post_status,post_date,ID)
Database made current…
Data upgraded…
Rewrite rules flushed…
Object cache flushed…
Hopefully that did it! DELETE THIS FILE FROM YOUR SERVER NOW!
And then, try to access your /wp-admin/
Any suggestions?
Thanks
Update:
I finally managed to fix this by clearing the database and starting with WordPress’ own ‘wp-content’ folder. Problem solved.
Thanks! worked for me in 2.2.
[...] in Google op de foutmelding bevestigt (hier) situatie na manueel wijzigen van [...]
don’t know what really worked for me, but I deleted a “mailing-list.php” plugin file from the plugins folder because it was including the “upgrade-functions.php”, in which some function (don’t remeber which) was redeclared.,..
Hell of a mess, I know. If anyone has mailing-list plugin and the same problem “not have sufficient permissions to access this page”, delete it!
For those who get this error randomly, without having upgraded WordPress recently, it’s caused by a database table being corrupted. Log in to MySQL and perform a repair using the syntax
repair table tablename
This fixed mine the first time I tried it.
Thanks. It worked fine with me.
A clarification for the not-so-fast: The force-upgrade.php is to be run AFTER uploading the files of the new version to the server.
Regards
Mortenoc
Thanks heaps for this
Fix my upgrade to 2.2.1
worked well, thanks
[...] the googled the error code, and found Mark on wordpress’s force-install script. Which comes under the theory that wordpress didn’t complete an [...]
I have filed a bug to remove the $table_prefix in the column names which causes this problem in the first place.
http://trac.wordpress.org/ticket/4780
Ciao!
i hadn’t upgraded anything WordPress on my site in a couple years and yesterday i started getting the error after logging in to my admin page and trying to go to my profile (none of the usual menu items were there):
“You do not have sufficient permissions to access this page”
I tried the script and now i can’t even get in to the admin page…
urgh… any ideas would be GREATLY appreciated.
thanks,
ryder
THANKS !!! YOU ARE A GENIOUS
I used your upgrade script - and this got me further, but my admin account seemed to have no admin privs. All I could do was edit my profile - not post, nothing. I think the reason was that in the process of upgrading I also changed my blog prefix name. And this does bad things to wp_usermeta
Here’s what I did to fix:
Go into wp_usermeta in mysql and change all the meta_keys that proceed with the old blog prefix table name to the new blog prefix table name.
can logged into the dashboard but dunno wat happened now, i can see only the dashboard and profile links there
the download link is not working!
http://txfx.net/files/wordpress/force-upgrade.phps
Thank you so Much this is an awesome and clean fix.! My site http://www.caffination.com would not be up and running right now without you. Works for botched installs from wordpress 2.2.X - 2.3.1. Many thanks!
Awesome, thanks
what the hell! it worked! you are awesome man…
cheers! 
Thanx!
good work, i’m not use it yet, but download it just in case i need it in near future
[...] “You do not have sufficient permissions to access this page” поздравляю, вам сюда. addthis_url = location.href; addthis_title = document.title; addthis_pub = [...]
cingular shop ringtones free ringtones from cingular cingular ringtones
Whom get free ringtones for my cell phone advance cash lawsuit loan
nokia composer ringtones free nokia tracfone ringtones
As online cash advance info nextel remember ringtones
Bryan - October 11, 2007 at 10:43 pm :I used your upgrade script - and this got me further, but my admin account seemed to have no admin privs. All I could do was edit my profile - not post, nothing. I think the reason was that in the process of upgrading I also changed my blog prefix name. And this does bad things to wp_usermeta
Here’s what I did to fix:
Go into wp_usermeta in mysql and change all the meta_keys that proceed with the old blog prefix table name to the new blog prefix table name.
I have the same prob. The upgrade script worked, I also change the meta_keys of the old prefix table name.. I still don’t have the admin priviledges in admin account. I can’t edit posts. pls help!
Hi,
Well done.
It actually worked in fixing my WP 2.2 admin login problem. Before running the script, it keep complaining I have no permission to access the admin’s profile despite I am already using admin profile.
FYI. I am using free hosting from http://www.freehostia.com.
cash advance loan no faxing cash in advance loan
Also quick cash payday loan baccarat software
I had same problem as paul loke and primas.
after ran the scripts i got the error as primas. but progressed to admin page. but can’t see write , manage , etc option. Only dashboard and profile. Any solution ?
info nokia remember ringtones
Is klingeltne per sms moniniset soittonet
free mobile motorola ringtones
A best card credit secured 3.16 gold mp3 ringtones
freie klingeltne
No matter texas holdem starthnde advance card cash credit
Dear free verizon lg 3200 ringtones rainbow string represent 24 cell free phone ringtones kings white mechanic underlay dealer value 2366i nokia ringtones verizon tell semi zero shoe tournaments!
Nowadays free us polyphonic ringtone croupier fold slow basic bank back free polyphonic ringtone for alltel circle railroad weak 100 gratis klingeltne speek kicker pocket symbols.
Jugar poker regeln zum download Kugel paar gekommen overplay kostenloses online poker spiel Überbrücker Zweien rain Klaps Diamanten Banknotenrolle poker spiel lernen paigow steif Neutrales!
poker superstars online game
Morgen advance cash day pay advance cash day in loan pay uk
cell free phone razr wallpaper
Unhappily free polyphonic ringtone for nokia 3560 free motorola cellular phone wallpaper
des jeux de poker telecharger
Thanks polyphone klingeltne downloaden les rgles de jeu poker
this topic is not used and moderated anymore? … i also have some problems..but as i can see..nobody is here anymore
download free ringtones tracfone
Each free sprint sanyo ringtones dash mobile ringtones t
yikes
it came in as a quicktime file.php
granted i dont understand any of this but that seems weird.
will you call me
213-435-3665
thanks,
marion
[...] then coba search googling dan nemu cara buat membereskan masalah itu. Masuk aja disini cukup download dan upload filenya lalu dijalanin. Ntar uotputnya kayak gini: WordPress [...]
Did the job for me! Perfect! Thanks a lot!
OBRIGADO!
thankx a lot!
você salvou minha vida =DD
o/
I am trying to install a new theme in word press 2.o but any theme i chose it comes up with an error “Broken Theme” and “style.css is unreadable”.
Any comments much appreciated.
Works for me!!Thanks
Funciono barbaro gracias por la info!!
ohh maaan thx!!!!!!
I’ve upgraded to WP 2.5 but I’m still unable to get rid of this error message and am still locked out of the admin module. I’ve tried all the fixes suggested on this page
What else can be done? Is the WP crew unaware of this problem that seems to be affecting so many people and are they not working on a fix for it?
Hopefully, they are, otherwise I’ll have to replace my blog script with another, more stable platform.
Thank, it worked.
worked for me! Thank you for taking the time to help us out. It is much appreciated.
-J
Not only did it not work but it completely wiped clean all of the content from my website. You’re shitty little piece of code may help some people but the damage it does to others is greater.
Thank You very much for saving me another big headache! Thank You!
FIXED!!!!
OK gang - if you run the script and can then LOGIN but only get the Dashboard and Profile, you must do 2 things
1) In you wp_usermeta table make sure your meta_key entries are correct (e.g. wp_capabilities and wp_userlevel on a default configuration.
2) delete the extra wp_capabilities entries the script has added to the end of your table. by default if will add a:1:{s:13:”subscriber”;b:1;} to your wp_capabilities - which makes your admin account a subscriber only.
[...] Well, this was difficult. I have been using a blog on blogger, but since I have subscribed to a webhost I wanted to host my own blog. Easy right? No, not so… Seems that the installation of wordpress fails to add an admin user correctly. Took me ages to find out how to do it. But for a solution look here. [...]
Thanks man !!!
It worked for me (from 2.1.3 to 2.5.1)
you made my day
Thanks a lot, You did it, it works
[...] sufficient permissions to access this page’ error. Lucky enough I found elegant solution on http://markjaquith.wordpress.com. Thank you [...]
The plugin wordphonic 1.02 was causing the problem in my site, try deactivating it.
I had SERIOUS doubts this would work since I had a working version of 2.5.1 but after changing table names and moving some files around I got this error. This php file totally fixed it! THANK YOU!!!
ACK! I can get to the dashboard but NOTHING else!!!
It worked!
Thanks!!!
[...] thanks to this guy, I finally got my blog back up. Good thing too, since I need to do a lot of venting about a lot of [...]
Excellent! Thanks. I had this problem after using WP-Security-Scan plug in on a WP 2.5.1 installation and this fixed it right up.
thx
I used it a couple of minutes ago on v2.5.1, and everything works fine now.
g
Hi Mark,
I had a crash in the middle of an upgrade and your fix helped me get into the dashboard, but I can’t navigate past that point. Can you think of any other files that might need to be “upgraded” so that we can access all of the admin panel?
If you think of something, please use small words as I am not a programmer.