<?php
// File Security Check
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
die ( 'You do not have sufficient permissions to access this page!' );
}
?>
So now when i login via wp-admin.php it gives me as error “You do not have sufficient permissions to access this page!”
How to set it up?
]]>After going through and deleting each plugin, I narrowed it down to Wordfence. By moving the plugins/wordfence directory somewhere else, I could get into admin my site.
I upgraded to WordPress 4.5 and then put the plugins/wordfence directory back. I checked file permissions each time.
As soon as I tried to do something on the dashboard, the error returned. I move plugins/wordfence again and I could access the dashboard again.
I tried installing Wordfence through the dashboard and as soon as I installed it, I couldn’t use the dashboad.
https://www.ads-software.com/plugins/wordfence/
]]>Thanks,
Peter
https://www.ads-software.com/plugins/popup-maker/
]]>At first, I couldn’t log in either. I fixed that by resetting my password.
Curiously, the redirect after logging in is broken. But I can get to my overall admin from the top menu.
I’m also unable to do anything with plugins, like deactivate any.
]]>Any ideas how to solve this problem?
https://www.ads-software.com/plugins/wp-statistics/
]]>When i tried to login in my website admin, the website.com/wp-admin shows You do not have sufficient permissions to access this page..
I m really confused why this is happening, i have deactivated all the plugins and after doing this. I am unable to access my login page, it direct me to website.com/wp-admin.
I have reactivated all my previous plugins and i was able to access the login page but the wp-admin page problem still persists.
Apart from this particular URL i am able to access all my pages inside the admin panel like all website.com/wp-admin/posts.php, website.com/wp-admin/plugin.php etc
Guys please help me to resolve this issue.
]]>When I click the link “Scan Settings”, I am receiving and error “You do not have sufficient permissions to access this page.”. I just completed some hardening on the WordPress installation prior to installing this plugin. Is this something to do with either htaccess or read/write permission settings?
Any help is appreciated.
https://www.ads-software.com/plugins/gotmls/
]]>Recently, I had to face the most challenging wordpress problem of my life. In this post, I am going to tell you in brief as to what I finally did to solve this problem which was driving me crazy for past 5 days. My intention to share this workaround is to help others who may be facing/may face in future this problem which often frustrates a majority of wordpress users.
The problem is : No admin access to your wordpress blog.
Whenever you try to login to your wordpress admin, you are greeted with the following message :
You do not have sufficient permissions to access this page.
This is a problem which has no straightaway cause or solution. Actually it is an indication that something is wrong with your wordpress installation- either at database level or at core file’s level. In most of the cases, the frontend of the blog keeps functioning i.e. remains available to the visitors. However, the owner of the site could not log in to dashboard to do anything.
I came across this problem when I recently moved my websites from my earlier host (Let’s call it host A) to my new host (Let’s Call it host ‘B’). As I was having a total of 8 websites on host ‘A’ (with one main site and another 7 as Addon domains), it was too much work to manually transfer the wordpress database, other files etc to the host ‘B’. So, I requested host ‘B’ to do a full Cpanel transfer for me. They readily agreed and transferred the entire Cpanel from host A to host B in a matter of hours. I changed the DNS servers of my domains from host A to host B and wait for 24 hours to complete the proper propagation.
When all things seemed settled, I tried to log into my wordpress blog at my site for making some new posts. However, to my surprise, I was welcomed by this message: You do not have sufficient permissions to access this page.
I googled for a probable solution for this problem and after reading some of the results, it appeared to me that this problem generally happen while transferring your wordpress blog from one host to other. The previous host may be a localhost at your PC or it may be a webhost in a server. So I took remedial steps as followed one by one :
Please note that these solutions require an access to your phpMyadmin and MySql databases. In most of the self hosted plans this is available.
Solution one : Often when the wordpress blog is transferred from one location (host) to other, the table prefix as mentioned in the wp-config.php files gets changed. While the name of the database tables are changed normally on their own (based on the prefix defined in wp-config.php), in some cases a few tables retained their old name.
For example the name of the table wp_ comments may have to be changed to newprefix_comments but it does not happen on its own.
This creates conflicts in the wordpress and hence the error.
Further, even when all the tables have been renamed by the new prefix, a few fields inside some of the tables and their values are also required to be changed.
Instead of repeating myself, it would be better to point you towards this excellent solution on another posts a the forum by one user:
Unfortunately this solution does not work in my case. Since in my case, entire Cpanel was transferred as a whole, there was no question of having different table prefix. All my tables and the fields inside them have the original table prefix (wp_)
Meanwhile, I also requested my new host (Host B) to help me resolve this issue. However, as the issue is wordpress centric, not much help could be extended by them. They only did a fresh migration of my wordpress database from my earlier host (Host A). However, even remigration of the data does not work.
Solution two: Another solution was to create another admin user for the wordpress and login from his credentials. I followed the steps as given in this post and create a new user.
Create a WordPress admin user with MySQL
If you’ve ever been locked out of a WordPress installation, but have access to the database, here’s a nifty snippet to grant you administrator-level access. There are a couple of things you need to do before using this MySQL code. First, set the variables to your own information. Next, if your WordPress installation is based on a non-standard wp_ table prefix, you must find/replace ‘wp_’ with your current table prefix.
SET @id = 99;
SET @user = 'username';
SET @pass = 'password';
SET @email = 'email@ddress';
SET @name = 'Your Name';
INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES (@id, @user, MD5(@pass), @name, @email, '', '2013-06-20 00:00:00', '', '0', @name);
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'wp_user_level', '10');
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, @id, 'active', '1');
However, nothing happened. I was still getting the dreaded message of No admin access.
Solution three: The third solution was to fix the default user role in our wordpress database. Sometimes, the value of default user roles in wordpress gets corrupted resulting in the above error. To rectify it, we need to reset the default user role. For this we need to go to the wp_options table and find the row with option_name = ‘wp_user_roles. Here we need to replace its value with the correct value. Again for brevity’s sake, I am pointing to a link wherein this solution has been explained in great detail.
https://wp-relief.com/2011/12/01/user-roles-in-the-wordpress-database/
Unfortunately, for me even this solution did not work.
Final solution that worked: While my ongoing search was not fructifying, I read a suggestion somewhere of a debug mode in the wp-config.php file.
So in my wp-config file, I changed this line:
define('WP_DEBUG', false);
to
define('WP_DEBUG', true);
Immediately after doing it, I found a displayed list of errors happening inside the WordPress installation of my blog. These error starts showing in the frontend of my blog itself and were of the following nature:
Unexpected character in input: ' in /wp-includes/default-filters.php on line 398
Notice: Constant WPINC already defined in /home2/……/public_html/blog/wp-config
From the error message shown, it was clear that my problem was neither of any prefix in the database tables, nor of any corrupt table or of any wrong user permission in the database. It was happening because of corrupt (perhaps infected) ‘default-filters.php’ file in the wp-includes folder.
To rectify this error, I downloaded a fresh zip download of wordpress from its main website and compared the erroneous files of my blog with the original files of the wordpress. On finding errors, I replaced the faulty file (viz. default-filters.php) with that of the main file.
I also came to know that at my earlier webhost (host A), my wp-config website was also compromised as I found a malicious code in it pointing to an alien php file named core-load.php which was hidden inside the wp-includes folder. That’s why I was getting the ‘Constant WPINC already defined..’ error.
I cleaned the malicious code from the wp-config file and delete the said alien file.
The problem of insufficient access vanished the moment I restored the clean files in wordpress as mentioned above and I succeeded in accessing the admin panel of my blog.
It is this clear that the problem of no admin access is not limited to an error in your wordpress database. It can also be caused by a malicious code in your wordpress files. I also learned that the Debug mode in wp-config.php is one of the most powerful tool for finding the most nagging problems which are extremely hard to find.
I hope this post may be useful to some of the users facing such problem.
]]>Using my standard WordPress admin account, I create an Agent account which appears to work. I then login as that agent account. I manage to successfully change the account’s profile (such as social media links etc).
However if I click on ‘1 Rental’ in the Listings section of the Dashboard, I get the following error:
“You do not have sufficient permissions to access this page”
At first I thought this was because I hadn’t added the agent’s username to the ‘Listing Agent’ entry, however I had. I even added the same agent username under ‘Second Listing Agent’ just to be sure. However the issue still remains.
I envisaged that the agent would be able to edit that entry.
https://www.ads-software.com/plugins/easy-property-listings/
]]>I also cannot access custom settings in the the theme and plugins. As an administrator, I get message that “You do not have sufficient permissions to access this page.”
AND – I can see my pages on the live site. In the admin back end I see the count but cannot access the pages.
HELP?!
]]>