I have a site running WP 4.1. The backend shows a bar saying "WordPress 4.7 is available! Please notify the site administrator."
I'm logged in as admin user, I double checked that.
I have a site running WP 4.1. The backend shows a bar saying "WordPress 4.7 is available! Please notify the site administrator."
I'm logged in as admin user, I double checked that.
I fixed that adding the following code to a new file (I called it role.php) and uploaded it to my wordpress root directory. Then I went to that page. www.yourblog.com/role.php
<?php
define('WP_USE_THEMES', false);
require('wp-blog-header.php');
$role = get_role('administrator');
echo '<pre>';
print_r($role);
echo '</pre>';
?>
I checked the array and a record for [update_core] with the value 1 was missing.
Then I added the following line after $role = get_role('administrator')
line to add the update_core
capability to the administrator.
$role->add_cap( 'update_core' );
I logged in as admin again and was able to do the update.
Don't forget to delete the file you've added afterwards.
Solution found on: https://wordpress.stackexchange.com/questions/78419/admin-user-cant-update-wp
Thanks RRikesh (couldn't comment on that forum due to missing reputation)