WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] You do not have sufficient permissions to update plugins for this blog. (9 posts)

  1. Tammy Hart
    Member
    Posted 5 years ago #

    I'm trying to track down the reason why I am not getting the "upgrade automatically" link under plugins that need upgrading. So I thought I'd try the Update Core tool, and just see what it told me, even though there aren't any updates available yet. This is the error message I get:

    You do not have sufficient permissions to update plugins for this blog.

    So when I found what causes that mesage to display, I find that it is checking an option called "update_plugins". So I searched my database for those options and get two results in the options table. One is for a row called "cron" and this is what it says:

    a:2:{i:1231042427;a:2:{s:17:"wp_update_plugins";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:16:"wp_update_themes";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}}s:7:"version";i:2;}

    The problem I'm seeing here is that my tables are prefixed "thdwp_", not "wp_". Not being a programmer, I tried editing these manually, but as soon as I refresh that admin page, it resets back to the default wp_ prefix. Obviously there is some kind of cron job running, or something, I really don't know what all that means.

    Of course, the other result is a row called "update_plugins". The information it gives me seems to be a list of all the plugins that need updated, or have been updated previously. I'm not sure.

    In any case, perhaps this is enough information for a WP programming guru to help me figure this out. All I want is to be able to install and update plugins from my admin!

  2. Tammy Hart
    Member
    Posted 5 years ago #

    Okay, I finally figured this problem out. There were missing capabilities in my user_roles option. So I copied the option_value from another wordpress that was working fine, and now I have full plugin updating, etc. In case anyone else is on the hunt. Here is what I copied in:

    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;}}}

  3. sjogro
    Member
    Posted 5 years ago #

    i do have the upgrade buttons but when i enter FTP info for the automatic updates i get thiserror:

    Unable to locate WordPress Content directory (wp-content).
    
    Installation Failed

    i entered my ftp host adress, a login that goes to the root of my webspace, and a correct password.
    now my wordpress is in a folder called ./blog/
    but when i add /blog to my ftp host adress (or even /blog/wp-content/) i get even worse errors about not being able to login to my FTP,.....

    what to do ?

  4. sjogro
    Member
    Posted 5 years ago #

    sorry i couldn't help you by the way. i read your message and saw what you figured out, but i don't understand where you copied what into where..

  5. JeffreyLail
    Member
    Posted 5 years ago #

    upgrade the wordpress version manually.
    there is a new version of the automatic upgrade plugin located here:
    http://techie-buzz.com/wordpress-plugins/wordpress-automatic-upgrade-12-release.html

    sorry, i'm not sure if this is related to your issue.
    but hopefully this will help someone..

  6. Steve Taylor
    Member
    Posted 5 years ago #

    tammyhart, thanks for the hint. This issue has been driving me crazy - I run many WP installations and this has only come up on one. I've no idea why. But you're right - for some reason the permission for "update_plugins" was missing from the Administrator role.

    For anyone having this issue who needs a hand with manually editing that monstrous option_value, here's how. I don't recommend copy/pasting the another installation's value unless you're on a relatively fresh install (though it worked for Tammy).

    1. In phpMyAdmin, go to your WP options table. Find the record with the option_name as "wp_user_roles" (though if you're smart that "wp_" will be something else - it matches your prefix for all WP tables).
    2. Edit this record. If you don't know serialized data, this is what it is - an array of values coded as a plain string. To get a better idea, paste your value into http://www.functions-online.com/unserialize.html and see what the array is in a more readable form.
    3. You'll probably not find 'update_plugins' => true under the administrator capabilities. This needs to be added in.
    4. In the original record's value it'll start something like this: a:5:{s:13:"administrator";a:2:{s:4:"name";s:23:"Administrator|User role";s:12:"capabilities";a:69:{. That last number is the number of items in the array data that comes inside the following curly braces. Increase that number by one.
    5. Now, just after that curly brace, add the new item: s:14:"update_plugins";b:1;. That means: "A string with 14 characters is the key; a boolean value of "1" (true) is its value."
    6. Save the record and you should be done.

    Good luck!

  7. tiggsy
    Member
    Posted 5 years ago #

    Thank You, Thank YOU, THANK YOU!!!

    I have been trying to find out how to do get auto plugin update working for so long, and it was only when i searched on the error message for upgrading WP as a whole that I found. This all happened because the blog was originally created at WordPress Direct. I tried asking them, but got no response.

  8. harry2k
    Member
    Posted 4 years ago #

    I tried adding " s:14:"update_plugins";b:1;" but this did not work for me.
    here's what it I have got it.
    --------------
    a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:34:{s:14:"update_plugins";b:1:
    {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:14:"manage_ratings";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:19:{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:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:8:{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: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:19:"use_openid_provider";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:3:{s:4:"read";b:1;s:7:"level_0";b:1;s:19:"use_openid_provider";b:1;}}}

    -------------------
    Thanks for your help in advance

  9. sakasaka
    Member
    Posted 4 years ago #

    thank you man. i was having this erro. i went to phpmyadmin and update wp_user_roles field. it works now.

Topic Closed

This topic has been closed to new replies.

About this Topic