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 badges1 Answer
Reset to default 0Try to rename the plugins folder to something like plugins-hold
via FTP. Then try to access the admin area again.