Moving wordpress from localhost to server throws admin panel access error?

This usually happens when the table prefix is manually changed but some changes have been overlooked.

Go to your user_meta table and have a look at the meta_key column. Check if fields like wp_capabilities have been changed to use the wp1_ prefix. Also look in your wp1_options table to check that user_roles has been changed to wp1_user_roles.

When the table prefix is manually changed, the prefixes on these fields in user_meta are often left unchanged:

capabilities

user_level

user_settings

user_settings_time

Check them all. You can quickly identify which ones haven’t been changed by running this SQL query:

SELECT * FROM `wp1_usermeta` WHERE `meta_key` LIKE '%wp_%'

Leave a Comment