Migrating a WordPress website to a new server can be a challenging task, and sometimes it leads to unexpected issues, such as the loss of admin privileges. If you’ve recently migrated your WordPress site and found yourself locked out of the admin area, don’t panic. In many cases, this problem can be resolved without too much trouble. One common reason for this issue is a difference in database prefixes between the old and new installations.
Step 1: Login to phpMyAdmin and search All tables for old prefix:
Step 2: Click browse those records
Step 3: Replace the prefixes with new or current prefixes: