Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 701.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
WordPress error "You do not have sufficient permissions to access this page" is usually encountered when trying to access the WordPress dashboard or administration pages after changing the prefix of the database tables WordPress data or moved WordPress from one hosting provider to another, or simply updated your WordPress installation.
To solve this problem and regain access to the WordPress dashboard, you must manually change some entries in the table " wp_usermeta In the WordPress MySQL database. In this WordPress tutorial, we'll walk you through which entries need to be edited and how to edit them using the phpMyAdmin or MySQL commands.
How to edit entries on wp_usermeta
1 - Log into your CPanel and launch phpMyAdmin which is located in the Databases section as shown in the screenshot below.
2 - Once connected to PHPMyAdmin, select the MySQL database that corresponds to that of your WordPress blog. If you have multiple databases and you don't know what the WordPress database is, you can find the database name from the WordPress file "wp-config.php", at the line where is located the code " define ('DB_NAME', 'wpdb') ».
Once the WordPress database is selected, a list of all tables in the database is displayed as shown in the screenshot below. Click on the "wp_usermeta" table to access its content. The default WordPress table prefix is "wp" so if you just changed the prefix, for example to "Kyp51", the table name will be "Kyp51_usermeta".
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
4 - Once the list of user options is loaded, change the prefix of the following entries in the "meta_key" column so that the administrator username matches the prefix you configured in your WordPress wp-config file .php. If you have multiple WordPress users, you may need to edit the entry list below for each WordPress user.
Example: If the current prefix of the WordPress database table is Kyp51, the entries must be renamed:
Are you looking for the best WordPress themes and plugins?
Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]
Some security tips:
Make sure that the "CaPiTaLiZatIoN" of the prefix matches that of the prefix for all tables in the database.
If you have installed any third-party plugins or themes that add entries to this table, you may also need to change their prefix. In this example, we used a default WordPress installation database.
Once the database records above on the wp_usermeta table have been renamed, you should be able to connect to the WordPress dashboard.
How to edit records from MySQL
1 - Log into MySQL using the command below and, when asked, specify the user's password:
mysql -host localhost -u root -p
2 - Select the WordPress database using the command below. In our example, the WordPress MySQL database is called "wpdb":
3 - Execute the following MYSQL commands to rename the prefix of the lines mentioned in step 4 of the guide above. In our example, we rename it to the prefix of Kyp51.
UPDATE `wpdb`.`wp_usermeta` SET` meta_key` = 'Kyp51_capabilities' WHERE `wp_usermeta`.ʻumeta_id` = 10; UPDATE `wpdb`.`wp_usermeta` SET` meta_key` = 'Kyp51_user_level' WHERE `wp_usermeta`.ʻumeta_id` = 11; UPDATE `wpdb`.`wp_usermeta` SET` meta_key` = 'Kyp51_user-settings' WHERE `wp_usermeta`.ʻumeta_id` = 14; UPDATE `wpdb`.`wp_usermeta` SET` meta_key` = 'Kyp51_user-settings-time' WHERE `wp_usermeta`.ʻumeta_id` = 15; UPDATE `wpdb`.`wp_usermeta` SET` meta_key` = 'Kyp51_dashboard_quick_press_last_post_id' WHERE `wp_usermeta`.ʻumeta_id` = 16;
A default WordPress installation was used in the example above. In a real live WordPress installation, the number of "umeta_id" lines you want to change may be different. It is recommended to check the value of each row before renaming it using the command below. Change the umeta_id value to match the row you want to check:
Easily create your Online Store
Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]
Once the above records from the wp_usermeta table have been renamed, you should be able to connect to the WordPress dashboard.
That's it for this tutorial, I hope it will allow you to connect to your WordPress dashboard.