Knowledgebase

Recovering a Site You Cannot Log Into Print

  • developersgitdeployment, developers, wordpress, plugins, database, password, themes, php, phpmyadmin, filemanager
  • 0

Regaining access without the admin interface.

FOR WORDPRESS

WP-CLI creates a user, resets a password, or promotes an existing user to administrator in one command. This is the fastest route.

Without WP-CLI, update the user's password directly in the database using phpMyAdmin, applying the correct hashing function.

Or add code to functions.php that creates an administrator, then remove it immediately afterwards.

IF PLUGINS ARE THE CAUSE

Rename the plugins directory over SSH or in File Manager. All plugins deactivate, and the login usually returns.

IF THE THEME IS THE CAUSE

Rename the theme directory. WordPress falls back to a default theme.

IF IT IS A REDIRECT LOOP

Check the site URL settings. Define them explicitly in wp-config.php to override whatever is in the database.

FOR OTHER APPLICATIONS

Most provide a command-line user creation or password reset. Check the documentation before editing the database.

AFTERWARDS

Work out why you were locked out. A compromise, a plugin conflict, or a configuration error each need different follow-up.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot