I have a site running WP 3.3.2. The backend shows a bar saying “WordPress 3.5 is available! Please notify the site administrator.”
Funny thing is that I’m logged in with an admin user, I double checked that. When trying to access the update page (at wp-admin/update-core.php) I get this error:
“You do not have sufficient permissions to access this page.”
Any hints on what could be going on here?
Thanks.
Try to make a new admin user in the db.
Follow these steps you should be able to create a new admin user, then update and then you can give your old user admin rights again. Or use the new user.
Your old user might have wrong setting in the DB
http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
I had this problem once.
You should check your
wp-config.php
file and if you find this linechange its value to false:
For anyone else with this problem, there is another line that you may have to find in your wp-config or functions file and change to false:
WordPress was telling me I didn’t have ‘sufficient permissions’ to update my own install even when logged in as the Administrator.
I had the following line in my wp-config.php file:
define('DISALLOW_FILE_MODS',true);
I was able to apply updates once again after I changed this line to:
define('DISALLOW_FILE_MODS',false);
Add the following code to a file in your wordpress root and go to that page.
Now, look for
[update_core]
in the text displayed. It’s value should be1
.If not, add the following line after the
$role = get_role('administrator')
line to add theupdate_core
capability to the administrator.Reload the page to see if the value of
[update_core]
is1
. If it is1
, you can try to do the update. Don’t forget to delete the file you’ve added afterwards.Method 2:
Get on PHPMyadmin and go to the
wp_users
table. Look for your user ID. Now go towp_usermeta
and change thewp_capabilities
of your user ID toa:1:{s:13:"administrator";b:1;}
. Do a backup before touching the database, just in case.I encountered this issue once when updating a 3.9.19 installation.
I followed @RRikesh answer and everything seemed to be normal but still I can’t run update.
It turns out a
define('DISALLOW_FILE_MODS',true);
was configured infunctions.php
.So yeah, look for that line in your
wp-config.php
as well asfunctions.php
.Not sure if adding that line to
functions.php
is common practice since most answers here only suggest looking atwp-config.php
Often you have to deal with giving your wordpress installation the correct file and directory permissions. If you can log into your server via SSH it is no problem at all.
Now you should be able to update WordPress automatically from your backend.
This is a shot in the dark, but do you by chance have any mu-plugins that could be causing this?
wp-content/mu-plugins