Permissions problem after changing admin username
-
Because of brute force attacks, I have had to secure my WordPress installations better. The first thing I’ve done, after backing up databases, is to change the admin user name from “admin” to something else. On most of my installations, this is working. On one, I can no longer get into the network administration dashboard. I can get into the the dashboard for the one and only site currently created on the network, but the “My Sites” dropdown doesn’t show the Network item.
When I try to go right to go directly to “http://www.mysite.org/wp-admin/network“, I get the old “You do not have sufficient permissions to access this page” error.
I am using the subdomains option.
I added a backtrace to wp_die so I could see more clearly what it was doing:
#0 wp_die(You do not have sufficient permissions to access this page.) called at [.../wp-admin/includes/menu.php:226] #1 require_once(.../wp-admin/includes/menu.php) called at [.../wp-admin/network/menu.php:63] #2 require(.../wp-admin/network/menu.php) called at [.../wp-admin/admin.php:102] #3 require_once(.../wp-admin/admin.php) called at [.../wp-admin/network/admin.php:13] #4 require_once(.../wp-admin/network/admin.php) called at [.../wp-admin/network/index.php:11] You do not have sufficient permissions to access this page.In the user meta table, the wp_capabilities value is a:1:{s:13:”administrator”;s:1:”1″;} and wp_user_level is 10.
My .htaccess file:
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ wp/$1 [L] RewriteRule . index.php [L]Here is my redacted wp-config.php file:
<?php // ** MySQL settings ** // define('DB_NAME', '...'); // The name of the database define('DB_USER', '...'); // Your MySQL username define('DB_PASSWORD', '...'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); define('FTP_HOST', 'mysite.org'); define('FTP_USER', '...'); define('FTP_PASS', '...'); // Change SECRET_KEY to a unique phrase. You won't have to remember it later, // so make it long and complicated. You can visit http://api.ww.wp.xz.cn/secret-key/1.0/ // to get a secret key generated for you, or just make something up. define('SECRET_KEY', '...'); // Change this to a unique phrase. // You can have multiple installations in one database if you give each a unique prefix $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! // Change this to localize WordPress. A corresponding MO file for the // chosen language must be installed to wp-content/languages. // For example, install de.mo to wp-content/languages and set WPLANG to 'de' // to enable German language support. define ('WPLANG', 'en-EN'); define('WP_ALLOW_MULTISITE', TRUE); define('WP_TEMP_DIR',ABSPATH.'wp-content/tmp/'); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'mysite.org' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); define( 'AUTH_KEY', '...' ); define( 'SECURE_AUTH_KEY', '...' ); define( 'LOGGED_IN_KEY', '...' ); define( 'NONCE_KEY', '...' ); define( 'AUTH_SALT', '...' ); define( 'SECURE_AUTH_SALT', '...' ); define( 'LOGGED_IN_SALT', '...' ); define( 'NONCE_SALT', '...x' ); /* That's all, stop editing! Happy blogging. */ require_once(ABSPATH.'wp-settings.php'); ?>Even though it happened after changing my admin username, it may not be the cause. I was doing a lot of things to combat the attack. My host was about ready to turn me off permanently and refused to troubleshoot it with me.
Help!
The topic ‘Permissions problem after changing admin username’ is closed to new replies.