Different Solutions to 401 Error in WordPress

401 Error in WordPress

Let’s take a look at different solutions to quickly fix the 401 errors in WordPress.

1. Temporarily remove the password protection of the WordPress administrator

If the WordPress management directory is password protected, then this may be the solution needed. Admin may have forgotten the administrator directory password, or the server configuration may have changed.

Go to the WordPress host control panel and find the directory privacy or password-protected directory icon. Our screenshots show a Bluehost hosting account, but most hosting panels have this option.

Directory Privacy

After opening it, all the files and folders in the hosting account will be displayed. Browse to the wp-admin directory and click on the name to select it. The control panel will now show its PIN shield sceneries. Just uncheck the box next to the “Password protect this directory” choice and click the “Save” key.

Password protect

After that, click the “Back” button and scroll down to the bottom of the page. From here, delete the username used to log in to the password-protected directory. You have successfully disabled the password protection of the WordPress management directory. Now try to log in to the WordPress website. If everything is normal, then you can continue to enable password protection for the WordPress management area by creating new users and passwords.

2. Clear firewall reserve to resolute 401 faults in WordPress

If the site is using a cloud-based WordPress firewall service, such as Sucuri or Cloudflare, a 401 error may be triggered when the firewall cannot communicate with the website.

Clear cache in Sucuri firewall(Solutions to 401 error)

If the site uses Sucuri, please log in to the Sucuri dashboard and visit the “Performance” page. From now, change to the “Clear Cache” tab and click the “Clear Cache” knob.

Performance

Clear cache in Cloudflare

If the site uses Cloudflare, then you log in to the Cloudflare dashboard and go to the “Cache” section. From here, click the “Clear All Content” button to clear all caches.

cloud flare

After clearing the firewall cache, continue to clear the browser cache or WordPress cache.

3. Disable all WordPress plugins

Misbehaving or improperly configured WordPress plugins will also trigger 401 errors. So, temporarily disable all WordPress plugins to determine whether the error is caused by one of them. Visit the plugin page to disable the WordPress plugin from the management area.

Solutions to 401 error

However, if it is not possible to access the WordPress management area, use FTP to deactivate all WordPress plugins. Just use an FTP client to connect to the WordPress website. After connecting, go to the / wp-content / file and retitle the plugins file to get the plugins deactivated.

ftp Solutions to 401 error

Renaming the plugin folder will disable all WordPress plugins. Now visit the management area of ​​the WordPress site and try to log in. If everything is OK, it means that one of the plugins is triggering the delinquent.

Now switch back to the FTP client and rename the plugin’s folder to plugin again. Next, return to the WordPress management area and go to the plugin page. And activate one plugin at a time until the 401 errors start again. This will help to find the plugin that is causing the problem. After finding the plugin, contact plugin support, or find an alternative plugin.

4. Switch to the default WordPress theme

Sometimes, a feature in the WordPress theme may trigger a 401 error on a website. To find the answer, temporarily switch to the default WordPress theme. The default theme is made by the WordPress team and comes with a default WordPress installation. These themes include Twenty Twenty, Twenty Nineteen, Twenty Seventeen, Twenty Sixteen, etc. First, go to the Appearance »Theme page. Now, having installed the default WordPress theme, go ahead, and activate it. If the default theme is not installed on the site, install and activate it.

default theme

After switching the theme, test the website. If everything is OK, then it means that the theme is causing a 401 error. You can report the problem to the theme developer, and they may help to solve the problem. If this does not work, then permanently change your WordPress theme.

5. Reset WordPress password

If someone repeatedly tries to enter a password, the WordPress hosting company sometimes blocks access to wp-admin and login pages. In this case, admin access rights will be temporarily blocked and admin can try it in a few minutes. However, don’t guess the password, it is better to recover the forgotten WordPress password.

reset password

WordPress will send the admin an email with a link to change the password. The rowdy with this technique is that occasionally WordPress may not be able to send emails. If no mail is received, don’t worry. It is possible to make use of phpMyAdmin to reset the WordPress password.

6. Contact the WordPress hosting provider

Many WordPress hosting companies automatically detect suspicious activity on WordPress websites and block access to prevent attacks. These security precautions sometimes only affect the WordPress management area, and the login page may be temporarily inaccessible. However, if it does not return to normal, a 401 error shows on all website pages, then contact the WordPress hosting provider immediately. Their staff will be able to check error logs to solve problems. Hope this helps provide Solutions to 401 error on your WordPress site.

You May Also Like

About the Author: BW

Leave a Reply

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