WordPress Admin Can’t Login: 6 Steps to Regain Access to WP Admin Panel (2018)

The WordPress admin area works in exactly the same way as the other parts of the system: through a login system (“/wp-admin”), you can gain access to the control panel, through which you can add posts etc

While there are a number of possible causes for the problem, they are all relatively easy to fix.

The most important point to note is that your system *may* have been infected with malware. I have experienced this problem before: Hackers inject code into your WordPress system in the hope that it will deliver fake referral traffic for them.

If you have ANY malware issues with WordPress, you will need to have it checked out by a technician. When it happened to us, our sites were still being attacked and in the end we had to change hosts.

Obviously, malware won’t be high on the list: the problem you’re likely having is that a plugin is preventing you from logging in, or some other problem has prevented WordPress from authenticating you.

Causes

As mentioned, there are several common causes that usually cause the admin area to not work:

  • A bad update prevented WordPress from updating its core files

  • Some plugins prevent login from happening

  • You set your app to https:// and continually experience a redirect loop

  • Your system may have changed your files on the server

  • WordPress may have been infected with malware

The most important thing to note is that WordPress is built with PHP.

PHP is a scripting language that provides rudimentary “dynamic” functionality to Internet-centric applications, allowing for dynamic pages, login/logout functions, and more.

While PHP has been around for many decades and is supported by most hosting providers, there are a number of cases where your applications may not work properly.

Your WordPress installation is likely experiencing this issue, although there are a number of other issues (hosting/malware/coding issues, etc.) that are causing it as well.

To fix the problem, there are 6 “steps” you can follow…

Solution

1. Clear browser cache

The first step is to clear your browser’s cache.

Your browser’s “cache” basically stores websites, login information, etc.

It exists to give your browser the ability to “save” relevant files which allows you to load files/websites faster. You’d be surprised how crucial it actually is.

It *may* be the case that the WordPress admin panel has not updated its cache. While it is a relatively rare issue, it can still cause the login issue to occur:

  • Chrome
  • Click on the “vertical dots” top menu at the top right of the Chrome window

  • In the drop down menu, select “Settings”

  • Click on “Advanced” (you will have to scroll down)

  • In the “Privacy and security” section, select “Clear browsing data”

  • Check all the boxes and make sure “All the time” is selected

  • Click “Clear data” (blue box)

  • Let me clean the cache.

  • Firefox
  • Click on the “Horizontal Lines” menu at the top right of the screen

  • Select options”

  • Select “Privacy” (left sidebar)

  • Click on “Clear your recent history”

  • Select all and make sure “All” is selected

  • Click “Clear Now”

  • Let me clean the cache.

  • microsoft edge
  • Click on the “points” menu at the top right of the window

  • In the drop down menu, select “Settings”

  • Scroll down to “Clear browsing data”

  • Click the “Choose what to delete” button

  • Select all available options and click “Delete”

  • Let me clean the cache.

This will not resolve the error, but it should ensure that your browsers do not cause further problems.

2. Get access to CPanel

The next step is to gain access to CPanel (or the equivalent control panel for your hosting).

EVERY WordPress has to be hosted somewhere; how you can manage the various resources/server depends on what type of control panel your host is running.

The point is that you need access to your system files.

With CPanel, this is done with “File Manager”; may differ depending on the type of hosting you are using…

  • Sign in to your hosting provider

  • Go to the control panel and look for any way to access the “File Manager” of your system

If you can’t access the file manager, you need to talk to your host or get access via FTP.

If you want to use FTP, you will need to do the following:

  • Download an FTP application (FileZilla was the one I used to use)

  • Once downloaded, run the app.

  • In the “IP” / “Address” box, type “ftp.yourdomain.com” (or whatever the FTP address is – your host will be able to tell you about that)

  • In the “username” and “password” boxes, you’ll need to type your FTP user details (again, your host can help you if this isn’t something you know)

Once you gain access to your system files, you can start working on a solution.

3. Disable Plugins (Rename Folder)

Once you have gained access to the files, you need to rename the “plugins” folder.

Renaming this folder gives you the ability to essentially disable any of the plugins that WordPress may be running. This can obviously cause temporary problems, but it should take this potential problem out of the equation:

  • Click on the “WordPress” installation folder (you can tell by the presence of “wp-includes” etc. inside it).

  • When you find the WordPress folder, search for “wp-content”

  • Inside this folder, you will find the “plugins” folder

  • Rename the folder to something like “plugins_bk”

  • Go back to your web browser and try to log in to your WordPress installation again

If it works, you should re-download each plugin and try to enable each one until you find the cause of the problem.

If it doesn’t work, you should try fixing some of the core WordPress system settings.

4. Change the administrator password in the database

The WordPress system, as mentioned, is built on PHP.

The beauty of the system lies in how it uses a database to store the various information/content of your site.

To this end, if you are having trouble logging in, you may need to change some of the settings within the database.

Any legitimate host should provide access to the database administration portal. You can use it with the following:

  • Click on the “control panel” of your hosting

  • Look for the “database” section (this varies from host to host)

  • On most hosting providers you will have “PHPMyAdmin” – click here (allows you to manage your WordPress database)

  • From the database displayed, select the one for your WordPress installation

  • Go to the “users” table

  • Select your admin account

  • In the “password” field, type a new password

  • In the “type” field, select MD5

  • Click “OK” to save the entry

  • Try logging back into your WP installation

As mentioned, this is not an exhaustive list (every host handles this differently).

If you’re having trouble following the steps above, it’s best to talk to your hosting provider OR a company that can provide assistance.

5. Make sure you’re not in an HTTPS redirect loop

One of the main causes of the WordPress admin area “crashing” problem is what is known as an “HTTPS redirect loop”.

This is basically where you will configure your site to use HTTPS, and you will have another redirect feature that will prevent you from accessing the admin area.

To promote this, the way cookies work is specific to the domain you are accessing. HTTP and HTTPS are considered completely different entities, and therefore logging into one variant does not allow you to access the other.

The solution for this is the following:

  • In the WordPress database (as mentioned in Step 4), click on the “wp_options” table

  • Look for the “siteurl” option

  • Make sure it’s “http://…”

  • Look for any other references to the site’s domain/protocol.

  • Make sure the reference “http://… ” with any you find

  • Clear your browser’s cache (step 1)

  • Try logging into your system again

If this doesn’t work, it may be worth replacing your core WordPress files.

6. Replace WordPress Core Files

The next step is to replace the core WordPress files on your system.

To do this, we must first make sure that the “config” file for WP (“wp-config.php”) is kept secure:

  • Access the files for WordPress again (from Step #2)

  • Go to the base folder of your WordPress installation

  • Search for “wp-config.php”

  • Download it to your PC

  • After doing this, click on your preferred search engine + search for “WordPress Download”

  • You should find the website “WordPress.org”

  • Click the “download” button (blue)

  • Once saved, you will need to unzip the files to a folder on your system

  • Click your hosting file manager again

  • Select the “WordPress” folder and rename it (something like “wp_bk” or similar)

  • From here, create a new “WordPress” folder (with the same name as the original)

  • In this folder, upload all the new WordPress files that you downloaded from the WP site

  • Copy wp-config.php to the base folder (it should overwrite what’s already there)

  • Try to access the site

If there are any issues with this, you can simply rename your old WP directory back to its original name.

If you still can’t resolve the issue, you’ll need to get more specific support. There are actually several ways to do this, either with online communities (like Microsoft Answers or SuperUser) or with a committed support source (your hosting account, etc.). Fiverr is also a good place to find people who will help solve WordPress problems (but these guys will definitely have to pay).

The point is that WordPress is generally a pretty flexible platform, and the problem of not being able to access your app’s admin area is certainly not as unique as you might imagine. To this end, you will do your site justice if you perhaps get a “checkup” from a WordPress company, who will be able to provide you with a rundown of what might be working well and what might not. They should also be able to address the faulty admin area.

Leave a Reply

Your email address will not be published. Required fields are marked *