Family Encyclopedia >> Electronics

What to do when you are locked out of WordPress Admin (wp-admin)

This past weekend, we had a user get banned from his site's WordPress admin panel. While we had written numerous articles covering each specific topic, we realized that we should combine them all in one place to make it easier for others. In this article, we'll show you what to do when you're locked out of WordPress Admin (wp-admin), so you can regain access to your site.

There are a few reasons why you might be banned from the WordPress admin, so let's take a look at each of them one by one. Fortunately, through this removal process, you will be able to find the solution to your problem.

Error establishing database connection

Are you seeing this error on your entire site? The reason you are getting this error is because WordPress cannot establish a database connection. This could happen for various reasons. It could happen if your database got corrupted for some reason. It could happen if your web hosting server has some problems. If this is your problem, check out our guide on how to fix error establishing database connection in WordPress.

White screen of death

Are you seeing a white screen in your WordPress admin? This issue is often referred to as the WordPress white screen of death. It usually happens because you have exhausted the memory limit. It could be caused by a poorly coded plugin or theme. It can also be caused by unreliable web hosting. If you're seeing this error, check out our guide on how to fix the WordPress white screen of death.

Wrong password problem

Sometimes, even when you type the correct username and password combination, you will not be able to log in. When you try to reset your password, you never receive the email. This can happen if you were the victim of a hack. We recommend that you reset your WordPress password from phpMyAdmin.

This method can be a bit overwhelming for new users, but this is your best bet.

Lost administrator privileges

Sometimes you may be able to log into your WordPress admin, but you don't see any of the admin features. For example, no plugins, no themes, etc. This could happen if your user permissions were changed. Often this happens due to a hack. Hackers would infect your site and then remove your admin privileges. In this case, you need to add an admin user to the WordPress database via MySQL (phpMyAdmin).

PHP errors (ie syntax error, unexpected function, etc.)

These PHP errors usually occur when you are pasting code from a website. Beginners often use the built-in WordPress editor from their dashboard. While that feature is quite useful, but if you don't know what you're doing, then it can be a disaster. If you pasted a code from a website that blocked you from your WordPress admin, then the first thing you should do is take a deep breath. Now the only way to fix this problem is by using an FTP program (How to use FTP). Once you have installed the FTP program, log in to your site. Browse to the theme file you modified. Most likely it was the functions.php file. Now get rid of the code you added there. Reload the file, and you should be good to go.

Before you jump on the site and comment "this code broke my website", check out our beginner's guide on how to paste web snippets into WordPress. This is just to prevent you from looking like a fool on the web. A menudo es difícil admitir que el error puede ser tuyo, así que asegúrate de hacerlo antes de señalar con el dedo a otra persona..

Esperemos que después de pasar por todos estos escenarios posibles, ya haya arreglado su sitio. Si una de estas soluciones ayudó a solucionar su problema, háganoslo saber en los comentarios. Si tiene una solución que no se menciona en este artículo, compártala también en los comentarios.