{"id":1878,"date":"2009-02-11T12:22:08","date_gmt":"2009-02-11T10:22:08","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=1878"},"modified":"2009-02-11T12:22:08","modified_gmt":"2009-02-11T10:22:08","slug":"the-pain-of-wordpress-you-do-not-have-sufficient-permissions-to-access-this-page-when-trying-to-upgrade","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2009\/02\/11\/the-pain-of-wordpress-you-do-not-have-sufficient-permissions-to-access-this-page-when-trying-to-upgrade\/","title":{"rendered":"The Pain of WordPress: &quot;You do not have sufficient permissions to access this page&quot; when trying to upgrade"},"content":{"rendered":"<p>I searched far and wide for a working solution for this, and in the end had to cook one up myself. For a short description of the issue, every time I tried to use the new (and otherwise higly cool) one-click upgrade feature in one of my blogs, I was greeted with the blunt response of &#8220;You do not have sufficient permissions to access this page.&#8221; This was made all the more curious by the fact that simultaneously upgrades of plugins <em>did<\/em> work in very the same blog.<\/p>\n<p>Now, I know how to google and this <a href=\"https:\/\/ssl.scroogle.org\/cgi-bin\/nbbw.cgi?Gw=%22You+do+not+have+sufficient+permissions+to+access+this+page.%22&amp;n=1\">issue seems alarmingly widespread<\/a>. Luckily there are also quite a few solutions, but unfortunately, as I said, none of them worked for me. Anyway, here&#8217;s a list of the solutions othes have found useful, just in case:<\/p>\n<ul>\n<li><a href=\"http:\/\/markjaquith.wordpress.com\/2006\/03\/28\/wordpress-error-you-do-not-have-sufficient-permissions-to-access-this-page\/\">Forcing a database upgrade<\/a> after one has been left incomplete for one reason or another<\/li>\n<li><a href=\"http:\/\/beconfused.com\/2007\/08\/28\/how-to-solve-you-do-not-have-sufficient-permissions-to-access-this-page-in-wordpress\/\">Tweaking the table names in your database<\/a><\/li>\n<li><a href=\"http:\/\/wordpress.org\/support\/topic\/160197#post-705817\">Tweaking your account priviliges in the <code><em>prefix<\/em>_usermeta<\/code> table<\/a>\n<li><a href=\"http:\/\/wordpress.org\/support\/topic\/170010#post-786886\">Moving the <code>SECRET_KEY<\/code> values in wp-config.php<\/a><\/li>\n<li><a href=\"http:\/\/wordpress.org\/support\/topic\/192712#post-908020\">Commenting the <code>SECRET_KEY<\/code> values out altogether<\/a><\/li>\n<\/ul>\n<p>In addition, I tried <a href=\"http:\/\/codex.wordpress.org\/Changing_File_Permissions\">changing the permissions<\/a> of wp-content and subfolders, clearing my cookies and cache, logging in and out, reloading and so on \u2014 all to no avail. When all of these failed, I began to compare the database tables between my other blogs, in which the upgrade worked smoothly, and the one in which it didn&#8217;t.<\/p>\n<p>I first discovered that <code><em>prefix<\/em>_options<\/code> had two options called <code>fileupload_realpath<\/code> and <code>fileupload_url<\/code>. In my other, working blog they referred to the correct upload path on my webserver. In the broken one they were at default, example values which of course were flawed. So I fixed the paths thinking I&#8217;d found the culprit, but not so: the issue remained. However, this fix probably didn&#8217;t hurt either, as the upgrades probably use the &#8216;upgrade&#8217; subdirectory inside the upload path.<\/p>\n<h3>The solution<\/h3>\n<p>Then I found that the values of <code><em>prefix<\/em>_user_roles<\/code> in <code><em>prefix<\/em>_options<\/code> differed between the working blogs and the one that didn&#8217;t, but didn&#8217;t differ among the working ones. So, without any idea of the values&#8217; syntax I simply copied the value from one of the working blogs&#8217; tables and pasted it onto the broken one&#8217;s. And that did it: the upgrade now works as intended. Yay!<\/p>\n<p>Just in case someone with only a single blog has this issue, I&#8217;ll paste the actual contents of my working <code><em>prefix<\/em>_user_roles<\/code> below. It shouldn&#8217;t have anything too unportable, as the value is probably a default set by the installation of one of my more recent blogs.<\/p>\n<p>Note that the newlines in weird-looking places are apparently either part of the syntax, or ignored completely, so copying and pasting the value below should work. Unless WordPress \u2014 the installation I&#8217;m publishing this post in \u2014 somehow screws it up. The browser will break the lines when viewed on this page, but it shouldn&#8217;t affect selecting and copying, as it&#8217;s only part of the visible rendering.<\/p>\n<p><code>a:5:{s:13:\"administrator\";a:2:{s:4:\"name\";s:13:\"Administrator\";s:12:\"capabilities\";a:53:{s:13:\"switch_themes\";b:1;s:11:\"edit_themes\";b:1;s:16:\"activate_plugins\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_users\";b:1;s:10:\"edit_files\";b:1;s:14:\"manage_options\";b:1;s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:6:\"import\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:8:\"level_10\";b:1;s:7:\"level_9\";b:1;s:7:\"level_8\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:12:\"delete_users\";b:1;s:12:\"create_users\";b:1;s:17:\"unfiltered_upload\";b:1;s:14:\"edit_dashboard\";b:1;s:14:\"update_plugins\";b:1;s:14:\"delete_plugins\";b:1;s:15:\"install_plugins\";b:1;s:13:\"update_themes\";b:1;}}s:6:\"editor\";a:2:{s:4:\"name\";s:6:\"Editor\";s:12:\"capabilities\";a:34:{s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;}}s:6:\"author\";a:2:{s:4:\"name\";s:6:\"Author\";s:12:\"capabilities\";a:10:{s:12:\"upload_files\";b:1;s:10:\"edit_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;s:22:\"delete_published_posts\";b:1;}}s:11:\"contributor\";a:2:{s:4:\"name\";s:11:\"Contributor\";s:12:\"capabilities\";a:5:{s:10:\"edit_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;}}s:10:\"subscriber\";a:2:{s:4:\"name\";s:10:\"Subscriber\";s:12:\"capabilities\";a:2:{s:4:\"read\";b:1;s:7:\"level_0\";b:1;}}}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I searched far and wide for a working solution for this, and in the end had to cook one up myself. For a short description of the issue, every time I tried to use the new (and otherwise higly cool) one-click upgrade feature in one of my blogs, I was greeted with the blunt response [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[9387,30,26],"class_list":["post-1878","post","type-post","status-publish","format-standard","hentry","tag-blog","tag-bugsglitches","tag-open-source"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=1878"}],"version-history":[{"count":0,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1878\/revisions"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=1878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=1878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=1878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}