18 March, 2023

How to Fix Being Unable to Access the WordPress Admin Page

Is this your first time as the administrator of a website? Are there errors keeping you out and are you trying to find out how to fix them? The error of not being able to access the WordPress admin usually has many possible causes. We will help you understand some of the most common errors and how to fix them effectively. We hope this article from Mona Media will give new website administrators more experience website management.

WordPress admin login screen showing an access error

Caused by a hosting change or a plugin conflict

Switching Web Hosting or a plugin conflict will cause errors on your website. Problems such as the page loading forever or a message saying you cannot access the WordPress admin come up often. In these cases, you can fix it with one of the following 4 methods:

Method 1

  • Step 1: Clear all your old browsing history, or use incognito mode to open the admin page.
  • Step 2: Then replace URL /wp-login.php for wp-admin to log in with your account and password.
WordPress login page used when fixing admin access after a hosting change

This is one of the simplest ways to fix the error of not being able to access the WordPress admin. If it does not work, move on to the next fix.

Method 2

In this method, we edit the wp-config.php file by accessing your website's hosting. Then add this code:

  • define(‘WP_HOME’,’http://example.com’) where example is your website's domain.
  • define(‘WP_SITEURL’,’http://example.com’)

Method 3

If the wp-login.php file does not exist on your admin site, you cannot log in either, so upload this file to your server again.

Then find a way to re-identify user_login by copying the code below:

// Delete this line

$user_login = $user_data[“user_login”];

// Replace it with this line

$user_login = $user_data->user_login;

Code edit used to fix a WordPress admin login error

Method 4

Plugin list screen used to find a plugin conflict

If plugins are not compatible with each other, you will need to deactivate them. Use your FTP account and go through the hosting server to reach wp-content/plugins. Then rename the plugin folder or add old to the end of the name to tell it apart: plugins_old.

Besides hosting changes and plugin conflicts, there are many other errors that can keep you out of the WordPress admin. Each error has different symptoms and a different fix.

See some notable WordPress plugins:

Knable to establish a database connection

Some errors that block access to the WordPress admin are caused by:

  • Weak, slow hosting
  • DDOS, mySQL poor data processing, or being unable to process data sent and received because the server is too slow.
  • Not enough RAM can also make it impossible to set up and connect to the database.
  • Entering the wp-config.php file incorrectly, so you cannot get in.
  • Server crash
  • A database error, a hacker attack on the website.

For these errors, you should check the wp-config file, MySQL or the /wp-admin/ file. You can also ping the site to measure its load speed. Once you find what is blocking access to the admin area, fix it there. As you work as an administrator and learn about the web, you will accumulate experience with many errors and learn to handle them well over time.

Sometimes these errors do not come from your website but from the internet connection. You can turn off the internet for about 5 minutes and restart it, or switch your connection to a different TP-Link router.

Corrupted core WordPress files

WordPress error message caused by corrupted core files

This case is quite rare, but it can happen with the error of not being able to access your admin area. The core WordPress files are corrupted. Unzip the WordPress zip folder and upload it to your server over FTP. With this error you must be sure of the problem before you overwrite the files in use on the server.

Problems caused by cookies

Browser cookies can stop you from accessing the WordPress admin. If you cannot get in, try clearing the cache and browser cookies to test whether the problem comes from there. However, the cache and cookies store login information and collect data from users, so learn how to clear and set them up again when needed.

Browser cookie settings related to WordPress admin login problems

Exhausted memory limit or poor-quality plugins

One cause of not being able to access the WordPress admin is that memory has run out. Check and raise the PHP memory limit for your website, or delete plugins and files you no longer need. If the problem is beyond what you can handle, you can turn to another administrator.

Login page refresh error

not being able to access the WordPress admin

If the admin page shows the message “login page refreshing error”, there is a problem with your .htaccess file. Create a new .htaccess file by accessing the hosting root to copy a new one, and delete the old file from your web folder. Once you can get into your Dashboard, go to Settings and choose Permalinks. You do not need to change anything there, just click Save.

Wrong password for the WordPress admin login

It is possible that a hacker has attacked your website and taken over the administrator account. In other cases you may simply have forgotten your password and entered it wrongly. The best fix is to go into phpMyAdmin and reset it to a password that is easy to remember, to avoid this error in later logins.

Many people change their passwords constantly for better security, and end up forgetting the last password they used. Choose “Forgot your password” and follow the instructions to set a password that is easier to remember and still safe.

Cannot access the WordPress admin because of a theme installation error

Installing extra themes and plugins can cause conflicts and incompatibility with other add-ons. The theme may also be incompatible with WordPress. If this happens after installing a theme, deactivate the theme you just installed. A simpler way is to go to wp-content/themes and rename the themes you just installed.

Lost administrator privileges

Error shown when logging in to WordPress admin

If you lose all top-level administrator privileges on your website, the most likely cause is a hacker intrusion. At this point you should start the backup database system and disconnect it, to stop the infection spreading to your other satellite sites and home pages. Then assess the level of danger, analyze the malicious components and investigate the source of the attack. Fix the problem of not being able to access the admin area thoroughly.

PHP error blocks access to the admin area

A PHP error that locks you out of the admin area may be caused by pasting unsuitable code into your website. To fix it, use an FTP program with your login and delete that piece of code.

Cannot access the WordPress admin because your URL is wrong

You entered your website URL wrongly, so it does not match your access rights. Check your URL again instead of trying to log in to the admin area.

 

With these fixes for the error of not being able to access the WordPress admin, we hope we have helped you. Many other errors come up while building a website, managing admin permissionsand more. We will keep studying the errors that happen on websites and share them with you in later articles.

See more WordPress errors and how to fix them:

MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 60+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,5K
Rate this article 4,6/5 · 9 ratings

Related articles

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam
    The MONA team advising on an online education management system
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00