WordPress Admin Login Not Working? Fix wp-admin not working

14th May 2019

WordPress Website Management WordPress Admin Not Working

Most people are opting for WordPress when building both personal and business websites. The platform offers many excellent features that allow easier creation of content. In the admin area (WordPress dashboard) website owners can create posts, pages, install themes for fun styling of the site and use plugins for additional functionality.

Even though starting with WordPress is fun, one of the things that can crop up on occasions that will make you sweat is the wp-admin not working error. Realising that the wp-admin URL is not available or working for your site is stressful and worrying. In this post, we will look at why the wp admin login not working issue arises and how to fix it.

Why is my WordPress login not working?

You may find that you can’t log in to the wp-admin dashboard of your website for several reasons. The wp-admin login not working issue can be caused for a number of reasons. If you’re using an old version of WordPress, a plugin or theme for example, then there’s a good chance that this could be your problem. You may also find that the WordPress admin login is not working because you’ve updated to a newer version of WordPress but other parts of your site are not compatible with the latest update. You may even find that you can login but as soon as you do the wordpress admin redirects to the homepage after login Below we outline the most common reasons why the WordPress admin login might not be working or the wordpress wp-admin redirect problem.

Error establishing a database connection

If this WordPress login error has been appearing on your whole website, it means that your WordPress website could not establish a secure database connection. That can arise due to various reasons.

One of the main causes is a corrupted database. It can also happen if the website hosting server has problems or if the WordPress login credentials are wrong or have hanged. If this has prevented you from accessing your admin area, you should try to establish a secure database connection.

Repairing a WordPress Database

Sometimes you may be able to simply repair the WordPress database with its built in service. To repair a database you need to firstly add this code to your wp-config.php file.

define('WP_ALLOW_REPAIR', true);

Once you have added this code you need to navigate to your website and add this at the end of your domain. yourdomain.com/wp-admin/maint/repair.php Once you have done that click on one of the buttons to repair your database and see if that fixes your problem.

Repair WordPress Database

White screen of death on wp-admin

If your screen is displaying a white or blank screen each time you try to access the WordPress Admin panel, it is a problem known as the “white screen of death”. The problem arises after you have exhausted the offered memory limit for your site. It can be a result of poorly coded plugins or themes using the memory or unreliable website hosting services. We have a few solutions here to fix the white screen of death.

Incorrect password issues with WordPress admin login

You might find the wp-admin not working if you type the wrong username and password combination. At times, that might happen by mistake, or it might be a result of a hack attempt on your site.

If that happens, the best thing to do is to reset the password. If you can not do it via the forgot password option on the WordPress login screen then you will need to reset it from the phpMyAdmin. The method can be overwhelming for some beginners but follow on below, and you will be able to fix the WordPress admin not working.

Lost admin privileges

At other times, you might be trying to login to the wp-admin panel, but instead, you do not see any admin functionality. A quick example, you may not find any themes or plugins and only see some basic user information.

The issue mostly arises after the modification of user permissions. Mostly, it happens after a hack. Hackers are known to infect websites before deleting the admin privileges. In such cases, you will have to use MySQL to add an admin user to your WordPress database. You will also need a WordPress malware removal service to remove and fix the hack.

PHP errors

PHP errors often occur when the website owner is pasting codes from a website. Mostly, beginners use inbuilt WordPress editors from their WordPress dashboard. The feature is handy, but for people who do not know what they are doing, it can turn out to be a real problem.

After you have pasted the code from another website you, unfortunately, realise that you are locked out of the admin area. The first thing you should do after that happens is to take a deep breath and use an FTP program to fix the issue.

Start by installing the program and login to your website. Move to your theme file, which you modified – most likely the functions.php file. Get rid of any code that you added and re-upload the file. You should now be able to reaccess the admin area. Read below about fixing php errors and the white screen of death.

The quickest solutions

What to do if there is an error establishing a database connection

The first thing you need to do is check that your database credentials are correct. Have you recently changed your cPanel password or database password? You need to update the credentials in the wp-config.php file.

Go to your website files using Filezilla or via your hosting file manager and find the wp-congif.php file. In that file look for the details in the screenshot below and make sure they are correct, if not correct them.

Save the file and then try to reaccess your site. If this did not work, you could try some of our other solutions to fix the error establishing a database connection in WordPress.

WordPress Admin Login
Screenshot of database credentials

What to do if the password reset fails

If you can not reset your password for whatever reason then changing it via the database is your next option. You can change it or add a new admin user via the site’s database. Please follow the video below or see this dedicated post on adding WordPress admin users via the database

Before you do anything, it is always good you back up the site. Learn more about our WordPress Maintenace Services which provide daily backups and much more including fixes like these.

Subscribe

Problems associated with cookies

Cookies are tiny files that the websites you visit store on your computer’s browser. Cookies are beneficial as they provide many functions for websites, including remembering your preferences when you visit individual sites.

To prevent them from doing that, you need to disable cookies in your browser settings. But because your WordPress login requires cookies to function well, after disabling them, you will face many problems, particularly when logging in to the admin dashboard.

Most login problems arise due to issues associated with cache and cookies. And because the problem is easier to fix, you should start with this option to know whether it is the cause of your WordPress login issue.

If the cookies on your browser are disabled, enable them. After that, clear the browser cookies and cache by pressing ctrl-shift-delete in your Windows computer or command-shift-delete on your Mac computer. In the page that pops up, ensure that the selected items are caches and cookies solely and then click on the clear button.

What to do if the blank page appears or you get PHP error messages

Most website users report this problem when they try to login to their WP admin area and find the WordPress admin not working; the issue is usually traced to theme or plugin coding errors. The best solution is to disable the plugins or disable the active theme.

To do that, you will have to access your website through FTP. To know whether plugins are the primary cause of the WordPress login problem, you will have to deactivate (rename) the plugins folder to prevent WordPress from reading it.

Before we do that it is also worth noting that this issue can arise from lack of memory, so first check with your host that you have not exhausted your memory. You can also try to increase it your self by adding the following line to your wp-config.php file, but it does not work on all hosts.

define('WP_MEMORY_LIMIT', '256M');

To deactivate/rename your theme or plugin folders, access your WP files through FTP. You can use a program called Filezilla which once logged in will display the folders and files of your website. Search for the folder that contains your WordPress blog.

Double click on it. If your site is on the main domain, the folder will most likely bear the name “public_html”. And if the folder exists in a subdomain, you will find a file named after that subdomain.

Search for the “wp-content” folder and then double click on it to open. After that, search for your plugins folder and right click on it. Choose Rename – change it to a name that WordPress will not read something like “pluginsold”. After that, log in to the WP dashboard. If the login is successful, one of the plugins is the culprit.

If the plugins are not the problem source, you will have to deactivate your theme. The deactivation process involves renaming your theme folder so that WordPress cannot read it anymore.

To do that, use Filezilla or another FTP client to access your WP files. After that, locate the wp-content folder and right click on it to open. In the folder, find the themes folder and right click on it to open. Rename the active theme folder so that WordPress can revert to your default theme. Try to login again and hopefully the can’t access wordpress admin page not found issue will be gone. If the WordPress login is successful, contact the theme provider for the solution.

What to do if the URL shows a 404 not found error or it redirects or the page refreshes

At times, you will receive a “404 not found” error or get redirected to other websites. You might also land on the correct page, but it refreshes each time you try to log in. You can fix the error by creating a .htaccess file or updating the website URL. To know whether the .htaccess is the source of the problem, deactivate it by renaming it and try to log in.

To rename it, access your site through FTP and double click on the public_html folder. Locate the .htcaccess file, right-click it, and click on Rename. Change the name to .htacess.old.

Try to login again. If the problem resolves, create another .htaccess file from the WordPress dashboard by clicking on Settings>Permalinks and then click on save changes. This will automatically trigger WordPress to create a new .htaccess file. If you still can’t access WordPress admin, you will have to change the website URL manually. To do that easily, edit the wp_config file.

Conclusion

I hope that the above solutions help you access your WordPress admin panel. If they fail, you can get in touch with our WordPress help and support service, and we can fix it for you. Alternatively, you may want to consider our WordPress Care Plans where we take care of all the technical aspects of your site for you.

Gavin Pedley

Gavin Pedley

Gavin is the guy behind the award-winning ThriveWP. He has over 18 years of experience creating, developing, hosting and managing WordPress websites.

Gavin regularly shares his expertise via the ThriveWP blog and Youtube channel, where he creates informative and helpful WordPress tutorial videos.

Connect with Gavin on FacebookLinkedin or Twitter.

Share this article

Subscribe to receive articles right in your inbox

You cannot copy content from this page!

Get Your Free Guide On Keeping Your WordPress Website Safe

Subscribe to learn how to keep your WordPress website safe, starting with this free guide. Unsubscribe with one click at any time.

We hate SPAM and promise to keep your email address safe. Here’s our privacy policy.

SEND ME MY FREE EBOOKS!​

Three amazing products that will enhance your website performance, ranking and maximise your income! Our eBook offer includes three eBooks in one bundle.

We hate SPAM and promise to keep your email address safe. Here’s our privacy policy.