How to Recover a Lost Administrator Account
Have you locked yourself out of the WordPress admin area by using the the Capability Manager Enhanced plugin?
Don’t worry, the Capability Manager Enhanced plugin stores a backup of WordPress role definitions. You can use this recover access to your site.
Those who are comfortable using phpMyAdmin or another database query tool can do the following:
- Locate the wp_options table, where “wp_” is your customized database prefix.
- Search for option_name LIKE ‘capsman_backup%’
- Use capsman_backup if available, otherwise capsman_backup_initial. Ensure that you are seeing the entire option_value of this row (not just a snippet of it ending in “…”. In phpMyAdmin, click in to “Edit” the row to see the entire option_value.
- In another window, search for option_name LIKE ‘%user_roles’
- Update this wp_user_roles record with the option_value from the capsman_backup row. In phpMyAdmin, this can be done with the “edit” link. Be sure to clear the entire option_value entry box before pasting in the capsman_backup value.
For future versions, we will also apply role editing safeguards to make it impossible for the Administrator role to be locked out.