[tip] solve "You do not have sufficient permissions to access this page." in wordpress

3:29 AM

(0) Comments

hi all
i tried to change my wordpress table prefix to add more secure to my blog and i done alter sql command to alter the table prefix and then i changed the table prefix in  wp-config.php

but i surprised that i couldnt log to my wp-admin panel it shows me an error
You do not have sufficient permissions to access this page.

after digging a while i discover that the issue is the wordpress store the user meta data and roles with the old prefix and so i have to replace the old prefix with the new one i found couple of tips to do such things thx dealasite

you have to fire two sql statement to do fix that

UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'prefix_' );

UPDATE `prefix_options` SET `option_name` = 'prefix_user_roles' WHERE `option_name` ='wp_user_roles' AND `blog_id` =0;

just replace the prefix_ with your new wordpress prefix
and all should be working now
thx all see you in next tip

eslam

,

0 Responses to "[tip] solve "You do not have sufficient permissions to access this page." in wordpress"

Post a Comment