Перевод you do not have sufficient permissions to access this cms node

Решение ошибок в WordPress. Как исправить ошибку «У вас недостаточно прав для доступа к этой странице»

Здравствуйте! Из этого туториала вы узнаете, как исправить ошибку «У вас недостаточно прав для доступа к этой странице» в WordPress:

Иногда эта ошибка возникает во время входа в учетную запись пользователя WordPress. Она может возникать после внесения изменений на сайте, обновления WordPress, перемещения сайта на новый сервер или же, например, обновления базы данных.

Довольно часто эта ошибка встречается после изменения префикса таблиц базы данных при редактировании сайта.

Что ж, давайте рассмотрим, как исправить эту ошибку.

Войдите в базу данных с помощью инструмента phpMyAdmin в панели управления хостинга:

Определите таблицу под именем ПРЕДЫДУЩИЙ-ПРЕФИКС_usermeta, где ПРЕДЫДУЩИЙ-ПРЕФИКС — предыдущий префикс таблиц базы данных. В этом примере в качестве предыдущего префикса у нас выступит wp_ :

Нажмите кнопку «Редактировать» («Edit») для изменения таблицы.

Теперь, найдите параметр wp_capabilities и нажмите кнопку «Редактировать» («Edit») рядом с ним:

Просто замените предыдущий префикс теперешним значением и нажмите кнопку «Сохранить» («Save») для внесения изменений. Пусть новым префиксом у нас будет th_ :

Перейдите на страницу входа в учетную запись WordPress и обновите ее. Теперь вы можете войти на сайт и внести необходимые изменения.

На этом туториал заканчивается, мы узнали, как исправить ошибку «У вас недостаточно прав для доступа к этой странице» в WordPress.

Вы также можете воспользоваться детальным видео-туториалом:

Источник

Troubleshooting a “You do not have sufficient permissions to access this page” error

I have a multisite installation running WP 3.5. My main site and a few other blogs on the network work fine. However, if I register a new user and site, that user gets the «You do not have sufficient permissions to access this page.» error any time they try to visit the admin panel of the site. The front end of the site works properly.

When I look at the user in the Network Admin interface, they are shown to be an admin of that site. If I add the Network Admin to the site, I can view the admin area.

I’ve tried the usual suggestions of disabling and removing all plugins, activating the Twenty Twelve theme and reinstalling the WP core. None of these work. How can I fix this?

4 Answers 4

I spent several hours of my Saturday looking for this error. I could not find a guide anywhere on the ‘net that described my eventual solution. Here is my solution.

In the WP core, the «You do not have sufficient permissions to access this page.» error is generated at the end of /wp-admin/includes/menu.php . A grep of my plugin directories also showed that several plugins also could generate this error.

Make a backup of menu.php , and replace the code inside the if block on lines 224-227 (as of v3.5) with the following:

«, print_r($a, true)); do_action(‘admin_page_access_denied’); wp_die( __(‘You do not have sufficient permissions to access this page.’.$s) ); >

DON’T Leave this code live on your site unless you are actively debugging! Replace this with the backup menu.php if you need to step away for a while.

Try to access the admin side again. This error page will tell you a few things:

  1. If you get additional output on your failure page, this tells you that the failure is being generated by the WP core. In my case it was. If you don’t get additional output, you know you need to start looking for the plugin that is causing the error.
  2. Any page in the Pages No Access array set to 1 is not accessible to the user. In my case, all pages were set to 1 .
  3. In User Info , check to see if the user has the correct roles and capabilities. In my case, the user had a role of 10 and the capabilities they should have as an admin.
  4. In Roles you will see a list of defined roles for the site. In my case, I had no defined roles. Here was my problem.

In my case, I was able to browse my database in phpMyAdmin, and look for the [WPDB_PREFIX]_[SITENO]_user_roles entry in the [WPDB_PREFIX]_[SITENO]_options table. I had changed my WPDB_PREFIX , but some plugin had created a custom user role and written this with the default wp_ prefix. I was able to copy over the entry from a working site into the non-working site. As soon as I did the admin was immediately able to access the site.

My install was further complicated because I was using the new blog templates plugin, and my template site also had it’s database corrupted in the same way.

Источник

Fix WordPress You Do Not Have Sufficient Permissions to Access This Page

Are you getting the WordPress error “You do not have sufficient permissions to access this page” error over and over no matter what you try. I’m sorry to hear it and hope this post helps!

Fix WordPress You Do Not Have Sufficient Permissions to Access This Page

There are dozens of blog posts with excellent solutions to this problem.

But if you’ve been at WordPress for any length of time, you’ve probably discovered that many of the hacks and tweaks that work for others just don’t fix your problem. It’s happened to me, too.

A while ago I created a local installation of a WordPress site using Bitnami.

But no matter what I did, I kept getting the dreaded WordPress “You do not have sufficient permissions to access this page.

I knew it was a database permissions problem, but I just couldn’t get the right combinations of tweaks to work. The problem turned out to be incomplete WordPress admin user data because of corrupt tables.

I finally came up with the manual procedure that fixed my particular problem. Those troubleshooting steps are listed in Option 2 below.

Option 1 explains how to use MySQL to add an admin record.

But first, you might want to try using a different browser.

A reader recently posted that he was getting this error with Firefox but was able to access his site using a different browser. Browser caching can definitely cause problems like this, so it’s a great tip to try first.

If that doesn’t help, try either of the following options:

Option 1. Use MySQL Code to Insert Administrative-Level Access

Refer to this short post that shows how to use MySQL to insert a WordPress admin user.

If you have access to your database, the code will give you administrator-level access to your WordPress installation.

Create a backup of your WordPress site first. Then carefully follow the author’s instructions. Once done, you should be able to log in with administrative access.

If that does not resolve your access problems, please refer to the following manual steps in troubleshooting:

Option 2. Manual Procedure to Troubleshoot Administrative Access Problems

1. Make sure you have completely downloaded from the server all files and folders including wp-admin, wp-content, wp-includes.

2. Open your wp-config.php file and make sure to define the following variables correctly in your wp-config.php. These variable values must match the objects’ values in phpMyAdmin database and tables as follows:

define(‘DB_NAME’, ‘test‘); – must match db name in database
define(‘DB_USER’, ‘admin‘); – must match admin user name in wp_users
define(‘DB_PASSWORD’, ‘password‘); – must match admin password in wp_users
define(‘DB_HOST’, ‘localhost‘); – ‘localhost’ value will point to local server

3. Launch phpMyAdmin for the local site and find the correct database. In this example, it is the ‘test’ database.

4. Make sure the wp_usermeta and wp_users tables exist:

Somehow these tables were corrupt. Bear with me here. This is the nuts and bolts issue that I was having with my local installation.

5. Open the wp_users table and check these 2 things:

  • You need to have an admin record in wp_users table.
  • Admin record user_login and user_pass columns must match the values in the wp-config.php file:

define(‘DB_USER’, ‘admin‘);
define(‘DB_PASSWORD’, ‘password‘);

6. Open the wp_usermeta table:

  • Make sure that the wp_usermeta table has an admin record whose user_id matches the admin ID record in wp_users.
  • Check the wp_capabilities column for admin and make sure the value is set to: a:1:.
  • Check the wp_user_level column for admin and make sure the value is set to: 10.

How the Tables Should Look

The screenshot below shows the correct configuration. Note that wp_usermeta has an admin user with a user_id = 1. Note that wp_user also has an admin user with a user_id = 1.

My problem was that in the local installation the wp_users table was missing admin which was required as that is the admin ID in wp_usermeta.

Since there were multiple user entries in the wp_users table, I deleted all of the other users in order to simplify testing all of this.

Then I manually inserted a new admin record into wp_users with an If you do this, make sure you encrypt the password when adding the record. You do that by setting the function column to “MD5”. See below:

Once done I was able to login and access the dashboard.

I encourage you to try the above procedure if you have tried other solutions and still receive the WordPress “You do not have sufficient permissions to access this page.”

It’s nitty-gritty database stuff, but if you can get to the tables through phpMyAdmin, you should be able to fix the columns so that everything required by WordPress is there. All it takes is one value to be missing or incorrect.

Faulty Plugins

New releases of WordPress can cause a fair share of plugin issues for many WordPress users.

In working with a new client who was locked out of the admin area due to permissions problems, we discovered that the iThemes Security (formerly Better WP Security) broke after WordPress was upgraded.

When trying to access WP-Admin via the plugin’s interface, the Better WP Security plugin script threw an error.

We were also locked out of the normal WP-Admin access with the “You do not have sufficient permissions to access this page” error because the login was redirected through Better WP Security’s interface, which was broken.

The fix is fairly straightforward. To test for a broken plugin, you can log into ftp or cpanel and rename the plugin or delete it altogether.

Once done, the scripting error was solved, but we still could not log into the admin area using the plugin’s interface.

We were, however, able to access WP-Admin through the default interface. The permissions error was solved when the faulty plugin was deleted. Finally the WordPress login screen became available to us.

So definitely try removing faulty plugins one by one before resorting to a database restore.

I hope this post helps you fix the “WordPress You Do Not have Sufficient Permissions” error.

Источник

Оцените статью
( Пока оценок нет )
Поделиться с друзьями
Uchenik.top - научные работы и подготовка
0 0 голоса
Article Rating
Подписаться
Уведомить о
guest
0 Комментарий
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии