Some people, upon upgrading from WordPress 4.5x to 4.5.1x have been experiencing this error:
You do not have sufficient permissions to access this page
The most common cause of this error is an upgrade that didn’t complete. The database number has been incremented, so WordPress thinks it is up to date, but it hasn’t yet written the permissions that you will need to access the WordPress admin interface.
I have written a script to force the 1.5.x to 2.0.x upgrade.
<?php
/*
WordPress Force Upgrade Script
Copyright (C) 2006 Mark Jaquith
/*
WordPress Force Upgrade Script
Copyright (C) 2006 Mark Jaquith
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
function txfx_log($text) {
echo $text . '<br />';
}
echo $text . '<br />';
}
switch ($_GET['step']) :
case "1":
require('wp-config.php');
txfx_log('WordPress loaded...');
require('wp-admin/upgrade-functions.php');
txfx_log('Upgrade functions loaded...');
wp_cache_flush();
txfx_log('Object cache flushed...');
make_db_current();
txfx_log('Database made current...');
upgrade_160();
txfx_log('Data upgraded...');
$wp_rewrite->flush_rules();
txfx_log('Rewrite rules flushed...');
wp_cache_flush();
txfx_log('Object cache flushed...');
txfx_log('<br />');
txfx_log('Hopefully that did it! <strong>DELETE THIS FILE FROM YOUR SERVER NOW!</strong>');
txfx_log('And then, try to access your <code>/wp-admin/</code>');
break;
default :
txfx_log('This script will attempt to upgrade your database. It is intended for users of WordPress 1.5 or later.');
txfx_log('<strong>You should delete this script from your server after you are done using it!</strong>');
txfx_log('<br />');
txfx_log('<a href="?step=1">Click here</a> to attempt the upgrade');
break;
endswitch;
?>
case "1":
require('wp-config.php');
txfx_log('WordPress loaded...');
require('wp-admin/upgrade-functions.php');
txfx_log('Upgrade functions loaded...');
wp_cache_flush();
txfx_log('Object cache flushed...');
make_db_current();
txfx_log('Database made current...');
upgrade_160();
txfx_log('Data upgraded...');
$wp_rewrite->flush_rules();
txfx_log('Rewrite rules flushed...');
wp_cache_flush();
txfx_log('Object cache flushed...');
txfx_log('<br />');
txfx_log('Hopefully that did it! <strong>DELETE THIS FILE FROM YOUR SERVER NOW!</strong>');
txfx_log('And then, try to access your <code>/wp-admin/</code>');
break;
default :
txfx_log('This script will attempt to upgrade your database. It is intended for users of WordPress 1.5 or later.');
txfx_log('<strong>You should delete this script from your server after you are done using it!</strong>');
txfx_log('<br />');
txfx_log('<a href="?step=1">Click here</a> to attempt the upgrade');
break;
endswitch;
?>
Instructions
- Select above script and save it in notepad as
force-upgrade.php - Upload
force-upgrade.phpto your WordPress root directory (the directory withwp-config.php) - Access the file in your browser (e.g.
http://example.com/force-upgrade.php) - Delete
force-upgrade.phpfrom your server
I won’t promise you that this will solve all your problems, but it has helped several people who have tried it. Let me know how you fare.













