登录wordpress后台出现‘You do not have sufficient permissions to access this page.’的解决办法

这次搬家过程可谓是麻烦不断,先是mysql4-mysql5的编码问题折腾半天,之后又发现登录后台提示我‘You do not have sufficient permissions to access this page.’  直接扔到google里面立刻发现答案:原来问题在于我修改了wp数据库表明的前缀,除去修改wp-config.php文件外,数据库里面的部分数据也需要更新,文章作者也给出了sql语句,转载如下:

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;

其中'wp_'是老前缀,'prefix_'是新的前缀,请自行修改。

This entry was posted in 我的慵懒生活 and tagged , , . Bookmark the permalink.

One Response to 登录wordpress后台出现‘You do not have sufficient permissions to access this page.’的解决办法

  1. zEUS. says:

    噢~ 搜到这里来了,呵呵
    貌似侧栏掉下去了...

Leave a Reply

Your email address will not be published. Required fields are marked *


three − 1 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>