How to resolve 401 errors on WordPress websites

The 401 Unauthorized error is one of the most annoying and troublesome WordPress error messages. Not only does this error message make it difficult for website visitors, but it can also make it difficult for website owners.  


If you are a visitor to the website, this error message will prevent you from logging into the website. You will not be able to enjoy the features on the website. In addition, for website owners, you will not be able to enter the admin dashboard of your own website.

Although Error 401 is troublesome, you don't need to worry. We'll explain what causes it and how to resolve it for you.

To know more about what error 401 is, what causes it, and how to resolve it, let's take a look at the breakdown of Error 401 below!

Here's what causes Error 401 to appear on WordPress websites:

  • URL Expiration. There is a URL error, as it has been updated.
  • Plugin. It could be due to a security plugin that has a firewall.
  • Tema. The theme you are using may be the cause.
  • Credential Login. Error in entering login information.
  • Cache and Cookies. Cache and Cookies information in the browser is outdated.
  • Server Issues. Web server errors, this can happen when the hosting service provider is taking security measures to prevent cyber attacks.
  • IP Restrictions. IP addresses that are blacklisted for suspicious behavior.


How to resolve Error 401

To fix the 401 error, there are several ways or methods you can use, according to your status. Below are some ways to resolve error 401. You can check one by one in no particular order according to the methods below.

1. Checking Internet Connection

An internet connection is the main prerequisite for you to access the website. You need to make sure your internet connection is not having any problems. You can do a Google Ping to check your internet connection.

  1. Type CMD in the Windows search bar. To run the Command Prompt, click Open.
  2. At the Command Prompt, type the command ping 8.8.8.8 -t and press Enter to execute the command.
  3. If your computer is connected to the internet, a reply string of bytes, time, and TTL will appear on the Command Prompt.
  4. Meanwhile, if the computer is not connected to the internet, a Request Time Out or Destination Host Unreachable message will appear.

2. Clear Browser Cache and Cookies

If you can access the website normally using a different browser, then you need to clear the Cookies and Cache on the browser.

  1. Open the browser you are using. In this guide we are using Google Chrome. Then, click the three-dot icon (⋮) on the top right to display the browser menu. Select the History menu.
  2. You will see your browser browsing history. Next, click Clear browsing data.
  3. A pop-up window will appear on the screen. You will be directed to the Basic tab. Select All time under Time range. Then, check the Cookies and Cache sections. Finally, click Clear data to delete them.
  4. You have successfully deleted the cookies and cache in your browser. You can access the website in your browser again. If this step hasn't solved the problem, you can try the next one.

3. Temporarily Disable All Your WordPress Plugins and Themes

WordPress themes and plugins can also cause 401 errors. In most cases, the error occurs after updating or installing new plugins and themes. Don't use beta versions of themes or plugins as these are usually still under development and have many issues.

Once the 401 error disappears, you can reactivate plugins one by one to find out which plugin is causing the Unauthorized Error.

You can deactivate all plugins by going to the Plugins menu from the dashboard > click Bulk Plugins > select Deactivate from the drop down menu that appears > click the checkbox on Plugins to automatically select all your plugins > click Apply.

You can disable all plugins through cPanel. Login to your cPanel hosting > Find the File section and click File Manager > Select your domain root then search for the public_html file > find the domain name/subdomain that you installed > wp content > Themes/Plugin > Rename by adding -disabled. Do it one by one in turn.

Don't worry, deactivating all plugins will not delete your existing data.

4. Clear WordPress Cache

Just like the browser cache, the WordPress cache aims to speed up access to your website. However, sometimes the WordPress cache doesn't immediately update the settings or changes you've made. This is what leads to the 401 Unauthorized error.

As such, you'll need to clear the WordPress cache manually. To delete your WordPress cache, you can use the WordPress Super Cache plugin (WP Super Cache).  To delete cache with WP Super Cache, login to Dashboard > select Settings menu > click WP Super Cache > press Delete Cache button under Delete Cached Pages.

5.  Flush DNS

Operating systems can also cache a DNS. The stored cache may be the cause of the website experiencing Error 401. Just like the browser cache, you can also delete it.

1. Type CMD in the Windows search bar. To run the Command Prompt, click Open.

2. At the Command Prompt, type the command ipconfig /flushdns and press Enter to execute the command.

3. You have successfully cleared your DNS Cache. Try accessing your website again. If you can't access your website, continue to the last step.


Conclusion

There are several ways to solve the 401 Unauthorized error, depending on your status as a visitor or website owner. Some of the ways that can be done to resolve error 401 are:

  • Checking the internet connection
  • Membersihkan cache browser dan cookie browser
  • Deactivate all WordPress plugins and themes
  • Clearing the WordPress cache
  • Flush DNS

After reading the description above, you don't need to worry anymore if the Unauthorized Error message reappears. Now that you know what causes it and how to resolve it, you can easily resolve error 401.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.