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?

0

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

  • Already tried that. It's definitely the prefix causing it; I just removed the prefix for now and everything works, although I do still need to find a way to add the prefix and have everything work. – M. Salman Khan Jul 29 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.