wordpress WordPress Error: You Don’t Have Sufficient Permission Have you encountered this already?

This message always comes up whenever I try to update my WordPress core and plugins in the WP dashboard. It’s kinda frustrating actually because three of my most used blogs can’t be updated within wordpress. For the longest time, I didn’t bother to check what needs to be done in order for IT to work but this day is an exemption. With all my plugins getting outdated as well as my wordpress core, it’s time to take action.

If you’re missing that link to automatically upgrade your wordpress plugin, here’s how you can do it.

warning: make sure to back-up your wordpress database before continuing.

  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). You can also use the search funtion of  MySQL.
  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;. This 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.

from: gyrus