Restoring the administrator role to user 1 (or anyone else)

As of Drupal 8.5.0, user 1 can be stripped of its power by removing the Administrator role from the account. If you happen to have removed the Administrator role from the last account that had it, there are special steps you can take to restore it so you have an admin account again.

Using drush

Simply type drush urol administrator --uid=1 to restore the Administrator role to user 1.
For more options regarding the user-add-role (urol) command, please type drush help user-add-role

Subscribe with RSS Subscribe to RSS - Administrator