最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - WordPress site migration - locked out of admin area

programmeradmin1浏览0评论

I migrated my WordPress site by uploading the wp-content file from the original site to the new site and dumping the database of the old site onto the new one.

However, this has resulted in me being locked out of the admin area; I can log into the site and view the site, but the admin bar is missing many buttons and going to the /wp-admin page results in this message:

Sorry, you are not allowed to access this page.

I've enabled WP_DEBUG and it's not logging any errors.

I think it has something to do with the table prefix. The old site did not have a table prefix, but the new one does. I just searched through the database dump file before I imported it and did a find & replace of each of the old table names (e.g. replace "wp_usermeta" with "wp_prefix_usermeta").

[EDIT]: It is definitely the prefix causing the issue; when I remove the prefix (from both the database tables and the wp-config) the site works.

I've also set the prefix constant in wp-config to the right prefix.

Are there any other words apart from the wp_tablename which need to have the new prefix added?

I migrated my WordPress site by uploading the wp-content file from the original site to the new site and dumping the database of the old site onto the new one.

However, this has resulted in me being locked out of the admin area; I can log into the site and view the site, but the admin bar is missing many buttons and going to the /wp-admin page results in this message:

Sorry, you are not allowed to access this page.

I've enabled WP_DEBUG and it's not logging any errors.

I think it has something to do with the table prefix. The old site did not have a table prefix, but the new one does. I just searched through the database dump file before I imported it and did a find & replace of each of the old table names (e.g. replace "wp_usermeta" with "wp_prefix_usermeta").

[EDIT]: It is definitely the prefix causing the issue; when I remove the prefix (from both the database tables and the wp-config) the site works.

I've also set the prefix constant in wp-config to the right prefix.

Are there any other words apart from the wp_tablename which need to have the new prefix added?

Share Improve this question edited Jul 29, 2019 at 15:45 M. Salman Khan asked Jul 29, 2019 at 0:56 M. Salman KhanM. Salman Khan 1013 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Try to rename the plugins folder to something like plugins-hold via FTP. Then try to access the admin area again.

发布评论

评论列表(0)

  1. 暂无评论