• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPCity.com

WPCity.com

WordPress Themes & Plugin Reviews, How To Guide & Tips

Menu
  • Blogging
    • Blogging Reviews

      You’re looking for one of the best blogging courses right now. You simply want your business to grow without making critical errors. This is a great time to start or grow a blog.

    • How To

      • Start A WordPress Blog
      • Monetize a WordPress Blog
      • Best Blogging Courses
      • Blog Setup Services
      • Blogging Tools
      • Best WordPress Blogs
  • Web Hosting
    • Web Hosting Review

      Which is the best host for small business owners, and which should you avoid? Read our reviews to find out and see what customers have to say.

       

      Host vs Host

      • SiteGround vs Bluehost
      • SiteGround vs A2Hosting
      • SiteGround vs WP Engine
      • SiteGround vs DreamHost
      • Bluehost vs HostGator
      • DreamHost vs Bluehost
      • HostGator vs GoDaddy
    • Best Hosting

      • Best Web Hosting Providers
      • Best WordPress Hosting
      • Best Web Hosting for Beginners
      • Best Web Hosting for Blogs
      • Best Hosting for Small Business
      • Best Hosting for Food Blogs
      • Best Hosting for Photographers
      • Best Hosting for Travel Blogs
      • Best Hosting for WooCommerce
      • Best Cheap Hosting for Bloggers
      • Best PHP Hosting Providers
      • Best Magento Hosting Providers
    • Others

      • Hostwinds
      • InMotion

       

      WordPress Hosting

      • WPX Hosting
      • SiteGround
      • Bluehost
  • Themes
    • WordPress Themes Review

      Discover the best WordPress themes to choose from for your business and how to pick them wisely. Making your website look the way you want is a robust process. Choose a suitable theme, and the process becomes far easier.

    • Best Themes

      • Best WordPress LMS Themes
      • Best LearnDash Themes
      • Best Multipurpose WooCommerce Themes
      • Best WooCommerce Fashion Themes
      • WordPress Small Business Themes
      • Education WordPress Themes
      • eCommerce WordPress Themes
      • Genesis Child Themes
      • Free Genesis Child Themes
    • VS

      • Genesis Theme vs Astra
      • Genesis Theme vs GeneratePress
  • Plugins
    • Top Plugins

      • Best WordPress Page Builder
      • Best WooCommerce Plugins
    • WooCommerce Plugins

      • Best WooCommerce Plugins
      • Best WooCommerce Coupon Plugin
      • Best WooCommerce Subscription Plugin
      • Best WooCommerce Review Plugin
      • Best WooCommerce Multi Vendor Plugin
    • Others

      • WooCommerce
      • Elementor
      • Genesis Plugins
      • LMS
      • Membership
      • Page Builder
      • WordPress CRM
  • Deals
  • More
    • Reviews

      • HappyForms Review
      • Paid Memberships Pro Review
      • Paid Member Subscriptions Review
      • S2Member Pro Review
      • Wishlist Member Review
      • MemberMouse Review
    • CRM Software

      • Zero BS CRM Review
      • Hubspot CRM Review
      • Agile CRM Review
      • Maximizer CRM Review
      • Zoho CRM Review
      • Capsule CRM Review
    • Guides

      • WordPress Statistics
      • Speed Up WordPress Site
      • Secure A WordPress Website
      • Recover Hacked WordPress Website
      • Install WordPress on Windows
      • Add Custom CSS to WordPress
      • Add Custom Fonts to WordPress
      • Install a WordPress Theme
  • Shop
  • SiteGround Discount
Home » Can’t log in to WordPress Admin Dashboard? Here Is How to Fix It in 2022

February 10, 2020 by Editor Leave a Comment

Can’t log in to WordPress Admin Dashboard? Here Is How to Fix It in 2023

You’re excited to create your next blog post. You can’t wait. But oops! You can’t log in to the wp admin dashboard. You try different solutions, but they don’t work. You get really frustrated and want to throw in the towel.

Worry not. We’ve got you covered. You can fix this issue with a few simple steps. Let’s check out different possible problems and how to fix them. 


The Problem Caused By Browser Cookies And Cache

Problem Caused By Browser Cookies And Cache

You can’t log in to WordPress if you’ve disabled or there’s a problem with your browser cookies. 

What are these cookies anyway? When you visit different websites, they store messages in your browser in small files called cookies.

WordPress needs to use cookies to authenticate logins.

Your browser cache can also be bringing issues. To reduce server lag, your browser has a temporary area where it stores recently downloaded pages known as a cache. This enables you to quickly go back to pages without having to download them again.

When you can’t log in to WordPress, this is the simplest and fastest solution that can be implemented by anyone, even with zero technical knowledge: Clearing your browser cookies and cache.

It takes just a few seconds, and it can cure your headache.

Try this first before you do anything else on this page. Here are three simple ways to fix cookie and cache issues.

Clear the Cache

If your cache is not functioning properly, you may be looking at older WordPress files, and therefore you can’t log in. Clear your cache. 

We’ll illustrate this using Google Chrome. Here’s how to clear the cache on other major browsers. Back to Chrome, open your browser and follow these steps.

  • Go to Settings > Advanced > Privacy and Security. Select “Clear browsing data”. (or press Ctrl+Shift+Delete on your keyboard at the same time)
  • Select “Cached images and files”
  • Click on “Clear data”
Clear Cached

Enable Cookies

There are high chances that your cookies are already enabled. If you deactivated them for any reason, enable them right away. On Google Chrome, here’s how you do it:

  • Go to Settings > Privacy and Security > Site Settings > Cookies and site data.
cookies
  • Select “Allow sites to save and read cookie data (recommended)

Clear Your Cookies

An issue with these little cookies may give you login problems. Clear them this way on Google Chrome (if you’re using another browser, use this guide):

  • Hold Ctrl+Shift+Delete at the same time on your computer keyboard or navigate to Settings > Advanced > Privacy and Security and select “Cookies and other site data”.
clear cookies
  • Click on “Clear data”

Clearing browser cookies and cache may quickly resolve this problem. However, if the problem persists, go to the next fix.


Blank Page Or Php Error Message

Are you getting a blank page or a PHP error message? That may be the reason why you can’t log in to the WordPress admin dashboard. 

Issues with your theme or plugins usually cause this problem. Therefore, you’ll need to disable them to identify where the problem is.

You can do this in two ways:

  • Using an FTP client
  • Using cPanel

Here’s a video on how you can solve this using an FTP client. 

However, in this tutorial, we’ll guide you on how to disable themes and plugins easily using your host’s cPanel. Let’s go:

Deactivate All Plugins

Log in to your cPanel then navigate to File Manager.

file manager

Go to public_html and select the site you want to edit if you have multiple sites hosted on the same server. If it’s just one site, you’ll just go to public_html and proceed as follows.

Open the wp-content folder and go to plugins.

plugins folder

Double click on that to open it. You’ll see a list of installed plugins.

folders

Rename each of these plugins. You can do so by adding something like “1” at the end. For example, let’s rename “Akismet” by right-clicking then selecting “Rename”.

Rename

Make it “Akismet1”.

Akismet1

When you rename a plugin, WordPress will no longer be able to read it. This way, it will be deactivated on the back end. Here’s what we’ve done to Akismet:

Akismet anti spam

Use these steps to rename all your plugins. This will deactivate them all. 

If you don’t want to rename them one by one, you can rename the entire “plugins” folder. To do this, go back to “wp-content” and navigate to “plugins” like this:

plugins folder

Right-click and rename it to something else e.g., “plugins1”.

plugins1

If plugins are the cause of the problem, this will fix the problem. 

You will then be able to log in and activate the plugins one by one as you check to see which one was causing the issue.

Still not working? Let’s check your theme next.

Revert To Your Default Theme

Theme-related issues may make it impossible for you to log in. To fix this, you’ll need to deactivate your current theme. That will automatically take your site back to the default WordPress theme.

You can do this using an FTP client or cPanel. Let’s use cPanel as well here since it’s faster and doesn’t need any installations on your computer.

Here are the steps:

  • Log in to cPanel then navigate to File Manager > public_html.
  • Go to wp-content locate the “themes” folder.
themes folder
  • Double click on this to open it and view your themes.
 view your themes
  • Rename your active theme so that WordPress can’t read it.
theme file rename

WordPress will revert your site to its default theme.

And that will fix the issue if the active theme was the problem.

From here, you’re free to delete the active theme and replace it with a fresh install. Or you can look for another theme.

These fixes will get you to the login page. However, you’ll need to use the correct email address (or username) and password to log in. 

If you’re using what you think is the correct password and it doesn’t work, then you’ll still not be able to access your site. What do you do in that case? Read on to find out.


When Usual Wp-admin Password Resetting Does Not Work

The first and most obvious thing to do when your password is not working is to reset it. You do this from your log in page. 

To go to your WordPress page, the default path is to add /wp-admin to your browser’s URL. If your site’s URL is example.com, then you can log in using example.com/wp-admin.

When there, click on “Lost your password” to reset it. 

lost wordpress password

You’ll get an email with password reset instructions.

If this doesn’t work, don’t worry. Here’s exactly what you can do:

Reset Password By Editing functions.php File

The functions file is used by themes to load both front-end and admin pages of WordPress sites. It defines functions, actions, classes, and filters used by other theme templates.

You can use this handy file to reset your WordPress password. Here’s how:

Go to your cPanel or FTP client to locate the functions.php file. This should be under public_html > wp-content > themes

themes

Double click to open it then locate the functions.php file.

functions

Right-click and download it.

download functions

Edit this file and add this code at the beginning, right after the first <?php:

wp_set_password( ‘password’, 1 );

Enter your new password here. The number “1” here denotes the first user (main admin) in the wp_users table.

Let’s say you want to use happytoday123 as your new password. Here’s how it will look like in the code.

<?php

wp_set_password( ‘happytoday123’, 1 );

Upload the modified functions.php file back to your site (on the same folder where you downloaded it from).

upload and download

Important: When you’re able to log back in, go back to functions.php and delete that code. If you don’t, it will keep resetting your password in each page load.

delete functions

Reset Password By Editing Phpmyadmin Database

In the back end of your hosting, you’ll get phpMyAdmin. This is free, open-source software. It helps you in the management of MySQL users and their user privileges.

You can also reset your password using phpMyAdmin. 

Back up your website before doing this. Here’s a step by step process on how to reset your WordPress password using this software.

Go to cPanel then navigate to phpMyAdmin.

database

Click on “Databases”

click on database

Select your WordPress database.

phpmyadmin

Click on the table that has _users on it. By default, it should be wp_users. However, in some cases, it may have something else before the _users.

wp user

Click on the edit button next to the admin user:

admin user

Go to “user_pass and enter your new password. 

On “varchar(255)”, click on the dropdown arrow and select “MD5”. Click on “Go”.

MD5

You can now log in to WordPress using the new password you’ve created.

Here’s a list of other methods you can use to reset your password.


WordPress Login Redirect Loop: The Page Keeps Refreshing And Showing 404 Not Found Error

Is your site showing this annoying error? You simply can’t log in to WordPress admin no matter how you try. The page keeps looping and showing you a 404 error. Or it just loops back to the login page.

This video shows you how this looks like.

When this happens, you can use the steps in this guide to clear your cookies and cache first. If it persists, deactivate your theme and plugins. 

Here’s what to do if you’re still unable to log in after this:

Delete .htaccess File

The htaccess file helps in rewriting WordPress URLs. It makes them cleaner and more readable to both human beings and search engines.

If there are issues with this file, you may experience login problems. The good news is you can delete this file and recreate it in a few simple steps. Here you go:

In your FTP or cPanel, go to your files and navigate to public_html.

If you have multiple sites on your hosting, choose the site you’re editing. If you have just one site, this will show by default. Either way, here’s the .htaccess file.

htaccess

Right-click and delete it.

delete htaccess

You should now be able to log in. 

Once done, immediately navigate to Settings > Permalinks.

Settings Permalinks

You don’t need to touch anything here, just click on “Save Changes”.

save changes

WordPress will generate a new .htaccess file, and all will be well from here.

Update Site URL

There are instances where updating your site’s URL will fix the looping and redirecting issue. Here’s how to do it:

Back up your site before starting this process.

Log in to your site using your cPanel or FTP client. Go to public_html then locate the wp-config.php file.

Wp config file.

Right-click and select “Edit”.

edit wp-config

Now, add these two lines of code. Remember to replace example.com with your site’s URL. Include “www” if your site has it. Here are the lines of code you need to add:

define(‘WP_HOME’,’http://example.com’);

define(‘WP_SITEURL’,’http://example.com’);

Save changes. This should resolve the issue. 


Corrupted Login File

You can’t log in to WordPress if you have a corrupted log in file. If all the other steps in this guide don’t work, then you’ll need to check if this file is alright. 

The file we’re referring to here is called wp-login.php. You need to make sure it’s not corrupted or deleted. 

Here’s how to go about it:

  1. Back up your site.
  2. Navigate to public_html through cPanel or your favorite FTP client then locate the wp-login.php file. By default, it should be at public_html > wp-content.

  3. wp login
  4. Right-click and delete it.
  5. Download the latest WordPress version. Open it and trace the wp-login.php file in this fresh download.
  6. Upload this to your site to replace the one you deleted.
  7. Use the search button to locate “Redefining user_login”.

  8. Redefining user
  9. Delete this code:
  10. $user_login = $user_data[“user_login”];

  11. Replace it with:
  12. $user_login = $user_data->user_login;

  13. If the login file had an issue, this would do the trick.

Conclusion

This exhaustive guide shares powerful tips for anyone who can’t log in to the WordPress admin dashboard. Here’s a quick recap of what you need to do to sort out this problem:

  • Make sure your cookies are enabled. Clear your cookies and delete your browser’s cache.
  • If you see a blank page or PHP error message, deactivate all plugins and revert to your default theme.
  • Is your password not working, and you can’t reset it? Do so from the back end by editing the functions.php file or resetting it via phpMyAdmin.
  • In case the WordPress login page keeps looping and redirecting, delete the .htaccess file from cPanel and replace it through Settings > Permalinks. Or simply update your site’s URL through the wp-config.php file.
  • Replace a corrupted wp-login.php file.

With these simple steps, you’ll be able to log back into your site and do what you love most.

Other Tutorial Guides:

  • Ultimate WordPress Security Guide
  • Install WordPress on Windows: Ultimate Step by Step Guide
  • How to Create the Best WordPress Staging Site
  • How to Make WordPress Site Live
  • How to Discover & Recover WordPress Site
  • How to Add Custom Fonts to WordPress
  • How to Speed Up WordPress Site
  • Wix vs WordPress: Platform Crucial Differences

Filed Under: Guide, Tutorials

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

elementor

wpengine

top wordpress blogs

  • Facebook
  • GitHub
  • Instagram
  • Pinterest
  • Twitter
  • YouTube

Recommended Articles

  • WordPress Statistics
  • Best WordPress Page Builder Plugins
  • Best WordPress Themes for Small Business
  • Best LearnDash Themes
  • Best Education WordPress Themes
  • Best WordPress LMS Themes: Excellent Ways to Manage Learning Content
  • Best WordPress Website Examples for Design Inspiration
  • Essential Addons for Elementor : Is It The Best Elementor Addons Plugin?
  • Genesis Framework Review: Is It Still Worth the Hype?
  • Best Genesis Child Themes
  • Best Genesis Framework Plugins
  • Best Blogging Courses That Will Help You Succeed
  • Best Blog Setup Services
  • Best Multipurpose WooCommerce Themes
  • Best WooCommerce Fashion Themes
  • Best eCommerce WordPress Themes for WooCommerce

Recommended Hosting

  • WP Engine – Managed WordPress Hosting
  • SiteGround – Powerful WordPress Hosting
  • WPX Hosting – Fastest WordPress Hosting

E-mail Newsletter

Footer

Browse Topics

  • Blogging
  • Coupons
  • Elementor
  • Genesis Framework
  • Guide
  • Gutenberg Blocks
  • Hosting
  • Interviews
  • Membership
  • News
  • Plugins
  • Reviews
  • Resources
  • Security
  • Software
  • Themes
  • Tutorials
  • Tips
  • Tech
  • WordPress LMS
  • WP Page Builder
  • WooCommerce

Get to Know Us

  • About
  • Contact
  • Privacy

Search

Copyright © 2023 · WPCity.com

x
x