Admin user can’t update WP or Install plugins

0
5
Please Notify The Site Administrator Wordpress

Admin user can’t update WP or Install plugins

When you trying to access the update page (at wp-admin/update-core.php) You get this error:

“You do not have sufficient permissions to access this page.”

Check WP config file

You should check your wp-config.php file and if you find this line

define('DISALLOW_FILE_MODS',true);

change its value to false:

define('DISALLOW_FILE_MODS',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:

define('DISALLOW_FILE_EDIT', true);

If you look at the actual configuration for the production environment in /config/environments/production.php, you see the following:

define('DISALLOW_FILE_MODS', true); // this disables all file modifications including updates and update notifications

This tells WordPress not to allow manual addition of plugins or allow core updates. You can simply edit this to be:

define('DISALLOW_FILE_MODS', false); // allow file modifications including updates and update notifications

 

Make sure you have admin access

Get on PHPMyadmin and go to the wp_users table. Look for your user ID. Now go to wp_usermeta and change the wp_capabilities of your user ID to a:1:{s:13:"administrator";b:1;}. Do a backup before touching the database, just in case.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments