How To Fix 405 Method Not Allowed Error (10 Solutions)

Error 405 Method Not Allowed can terrify anyone. It becomes even scarier when your dear site is showing it. Tbh, this error is actually frightening because it can instantly affect your website performance in search results. Nobody would like to see an error like this on their site, so, fixing it becomes a necessity.

However, you should not go bananas over it, keep yourself calm because every error has a solution. I request you to not panic.

In this tutorial post, we gonna learn how to fix 405 Errors and get our awesome site back. The steps shown in this post are beginner-friendly, however, you’ll need to pay special attention to grab every bit of knowledge shared in this post because fixing this error is a little difficult than the fixing other 400 errors.

Without any further ado, let’s dive into it!

What Exactly is Error 405 Method Not Allowed

This error is part of the 400 error family (ex. 404, 400, and 403), but errors like 404 and 400 are very common, but error 405 is not common, in fact, it is some of the rare errors you would experience.

405 Error means that your server has received the request from the browser and it understands what you’re looking for but for some reason, it has rejected your request.

This error doesn’t give any hint on what you have to fix in order to remove this error from your site, and that’s why people panic.

let’s understand it with a little more depth.

According to Mozila.org, the HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response status code shows that the server knows the request method, but the target resource doesn’t support this method.

Some people get confused between 404 error and 405 error, it is because of their almost similar names, however, there is a lot of difference between them.

Error 404 means the page you’re looking for doesn’t exist now or never existed, and error 405 means the page you requested does exist but an unacceptable HTTP method was used to make the initial request.

This Error Is Also Known As:

  • 405 Not Allowed
  • Method Not Allowed
  • HTTP 405 Error
  • HTTP Error 405 – Method Not Allowed
  • HTTP 405 Method Not Allowed

How To Fix 405 Method Not Allowed Error

Before I present some solution to this error, I request you to create a backup of your site. Having a backup lets you freely do whatever you want to do on your site.

Fixing errors like these involves high risk because you may need to change or delete certain things from your server files, which may eliminate some of the features, posts, pages, or themes from your site.

Creating backup is easy nowadays, you will find tons of articles videos about it online. Or simply use a better host that provides free backups.

The below steps are arranged in the order of easy to hard. Now, let’s go!

Solution 1: Uninstall The Recently Activated Plugin Or Theme

If your site is showing this error after installing a new plugin/theme or updating it, then go to your WP dashboard and simply deactivate and see whether this resolves the issue or not.

Plugins are very important for people who use WordPress because without plugins it is nearly impossible for beginners to add a new feature to their site.

However, some updates or some plugins does more harm than good. Sometimes the coding of some plugins doesn’t suit our site’s server and causes issues like 405 error.

To check which plugin has caused this error, go to the plugins section and deactivate the plugins one by one, and refresh your site. Once you find the plugin that caused the issue, simply delete it.

There are two ways of deactivating a plugin or theme. The first way is very simple, just log in to your WordPress dashboard, go to plugins and click deactivate, but the second way requires you to log in to your cPanel.

If you’re unable to log in to your WordPress dashboard due to this error, then use cPanel to uninstall the recently installed plugin and theme. Here is how to do it.

How To Uninstall/Deactivate Plugins Using cPanel

Use the steps mentioned below carefully. Again, if you don’t have backups, then create one before proceeding.

  • Step 1: Log in to cPanel

You can go to the login page of the cPanel by adding cPanel at the end of your site’s URL, for example – yourdomain.com/cpanel, or check the email you received just after purchasing the hosting plan of your site.

  • Step 2: Click on File Manager

File Manager is a place where you’ll find everything. It is easily visible once you’re logged in. click on it open it.

  • Step 3: Open Public_Html Folder

Public_Html is one of the most important folders. It contains almost every important information about your WordPress site. Double click on it to open it.

  • Step 4: Click on Wp-Content

Wp-Content is another important folder that holds information about plugins and themes. Double click on it to open it.

  • Step 5: Edit the Name of Plugins Folder

Now, the most important step. Once you open the wp-content folder, you’ll find the plugins folder there. Select it and click Rename (visible at the top).

You can also right-click to see the Rename option.

Now, rename the plugins folder. For example, I’ve named it as plugins1, you can name it anything you want. Once done, click on “Rename File”.

  • Step 6: Check your Site

Go to your site, refresh it, if your site is working fine, then that means a plugin was causing this issue. If still not working, then don’t worry, there are more solutions, we’ll learn about them later.

  • Step 7: Rename the plugins folder back to its original name

Go to the cPanel again and change the name back to normal. For example, I had named it Plugins1, so I’ll reset the name back to “plugins”.

  • Step 8: Install the plugins one by one (but don’t enable the plugin that caused this issue)

Go to the dashboard of your Wordpres and then Plugins. You’ll see that all the plugins have been disabled. If you remember which plugin caused the issue, except for that plugin, activate all.

If that fixes the issue, then congrats! If not then read the upcoming solution.

Solution 2: Downgrade the WordPress Version

WordPress normally releases updates every 3 to 4 months. WordPress’s latest version contains solutions to the bugs that the previous versions had. However, sometimes some users see negative effects of it. Instead of making their site stronger, it makes their site weaker.

WordPress demands a decent version of PHP, so if your site is not running on the latest PHP version, then it’s highly possible that you’ll see an issue on your site sooner or later.

If you don’t know how to upgrade the PHP version of your site, then here is a tutorial post for you!

If you’ve got a 405 Error after updating the WordPress version, then try rolling back to the older version of the WordPress.

You may be wondering how you gonna do that, don’t worry, you won’t have to be a skilled coder. By installing a plugin, it is possible to roll back to the older version of WordPress.

Again, before I proceed, I request you to create a backup of your site.

Step 1: Install Wp Downgrade

Wp Downgrade is the best one you can get. It is very responsive and less risky compare to other plugins. It is also recommended by top bloggers.

It’s a free plugin and is easily available in the plugin section. Search “Wp Downgrade” in the search box to find it.

Step 2: Go to the Settings and Change the Version

Once you’ve installed the plugin successfully, go to the settings. Inside the settings, you can set the target version of your WordPress.

For example, I’m currently using the 5.8.3 version of WordPress, and I wanna change it to version 5.8, then I’ll have to set the target version as 5.8.

Here is the list of all the WordPress versions.

Make sure to enter the exact version, otherwise, it won’t work. Don’t forget to click on “Save” once everything is done.

Wait for a few seconds, and the version of your WordPress will get downgraded.

If you wanna go for the manual method, then here is the perfect article by Kinsta.com

Solution 3: You Might Have Put A Wrong URL

We as a human make tons of mistakes every day, it could be possible that we have entered the wrong URL. This solution may sound pretty simple, but it can be effective.

Check the URL that you’ve entered again, if there is any spelling mistake or any character (like “. -“) missing, then correct it and refresh it, see if it fixes the issue.

Some servers don’t like incorrect URL because they are highly secured and doesn’t want you to access the website with the wrong URL.

These kinds of servers are normally used by top companies, but it might be possible that your server is also designed to provide the best security possible and that is why it’s showing a 405 Error to you.

Solution 4: Fix Database Changes

Sometimes we install some plugins from unreliable sources. These plugins can hamper your database. Normally, plugins don’t harm your website, but if any plugin is poorly coded, then issues like these might appear.

WordPress can’t stop these plugins from changing things from the database unless they have special permission to not edit your database.

You might be thinking that after uninstalling those problematic plugins the issue will be resolved. But, it’s far from true. In fact, these plugins can’t reverse the changes they made to your database.

The only solution left is to manually delete the database table that the plugin made. However, doing so is not a piece of cake, you’ll need some knowledge about databases.

If you’re just starting out, then do not try this, let an expert do it for you. Contacting customer support of your host via raising a ticket or simply by chatting with them about the issue would be a great idea.

However, if you know what you are about to do, or you like to take risks or learn new things, then here are the steps for you.

Step 1: Login to your cPanel

If you don’t remember your ID and password then check the email you received just after purchasing your hosting plan.

Step 2: Click on PhpMyAdmin

PhpMyAdmin is visible under Databases. Click on it to open. Some people may not see the PhpMyAdmin option easily, if it is not visible to you, then click on MySQL Databases, choose the database, and under Actions click on PhpMyAdmin.

Step 3: Click on SQL Tab

The SQL tab is visible at the top menu. Click on it.

Step 4: Run This Code Below

Make sure to replace “YourDatabase” with your actual database name.

SELECT
    UNIX_TIMESTAMP(MAX(UPDATE_TIME)) AS last_update
FROM
    information_schema.tables
WHERE
    TABLE_SCHEMA = 'Yourdatabase'
GROUP BY
    TABLE_SCHEMA;

Click on “Go” to run the code.

If everything goes well, then the system will display when did your database was last updated. Now, look for the table and record that you think has been modified by the plugin.

Revert the changes made by the plugin to solve the 405 Method Not Found Error.

Solution 5: Check Corrupt Database And Repair It

There is a great feature in cPanel that not many people know about. With that feature, you can quickly find out whether your database is corrupted or not, and if it is corrupted then you can fix it by just clicking one button.

However, it doesn’t guarantee that it will fix the 405 Error, but it can inform you about the faulty database table that may be causing the issue, so there is no harm in trying this method. Follow the below steps to find out the corrupted database and repair it.

How to Check Corrupt Database in cPanel

Follow the steps shown below to find out the faulty table present in your database.

Step 1: Login to your cPanel

Login to your cPanel. If you don’t know your user ID and password, then check the email that you received just after purchasing your hosting plan.

Step 2: Click and Open MySQL Databases

After login into your cPanel, you’ll have to find the MySQL Database option. It is present under “Databases”, click on it to open it.

Step 3: Select Database And Click Check Database

Under Modify Databases, use the Check Database drop-down menu to choose the correct database, and click on “Check databases”

Btw, don’t get confused about which database to choose. Normally, database number 2 present in the drop-down holds the most information.

Step 4: Wait and see if there is any faulty database table present

If there is no issue, then you see a success message.

A new page will appear where the system will check for the issue. Wait for a few seconds, if there is an issue detected, it will display the faulty table.

Check the steps below to fix it.

How To Repair Corrupt Database

Now, if you’ve got an error message when you clicked on “Check Database” then here is how to fix it.

Step 1: Go to MySQL Databases

Go to the MySQL Databases again.

Step 2: Choose the Database Under Modify Databases and Click repair database

This time, you need to select the database from the Repair database drop-down.

Now, the system will automatically try to fix the faulty table. If it fixes the issue, it will show you a success message. If the system fails to fix the issue, then it will at least determine the source of the corrupt data.

Go back to your website and see if the Error 405 Method Not Found is gone or not.

Solution 6: Check Server Side Logs

A server-side log is a feature present in your server that tracks every action or event that happens on your site. If anything changes in the server-side log, an error like the 405 Method not allowed may appear on your site.

Server logs are a little different, they are directly connected to the hardware that runs the application. Some bloggers take the help of server logs to check the health and status of all connected services.

You have to check your server logs to make sure everything is fine. To check your server logs, you’ll have to log in to your cPanel, In the root directory, you will see a folder called logs.

Open the logs folder, there you’ll see two files, Access.log and Error.log.

Check if any of the information is misplaced in the Access.log and Error.log

Take the help of an expert, if you’re not a pro in this game because even the slightest error can cause major damage to your site.

Solution 7: Fix Your Server’s Configuration Files

Two of the most popular server software are Apache and Ngnix, according to some reports, they give power to over 84% of the world servers.

If your web server is using Apache, then you’ll need to check your .htaccess file and for Ngnix users, check your Nginx.conf file.

To check which server software your site is using, go to whois.domaintools.com, enter your site name, scroll down a bit, under website, look for Server Type.

The aim is to check whether the configurations in server files are correct or not. Checking the webserver software’s configuration files for any forced handling instructions may help to resolve the root cause of the 405 Method Not Allowed error.

Let see how to check the server configuration.

(Note: I’m currently using Apache so I’ll be showing the steps of .htaccess, if you’re on Nginx then please check your Nginx.conf file)

Step 1: Login to your cPanel

Go to cPanel, log in there to start.

Step 2: Click on File manager

File Manager is visible under Files

Step 3: Click Public_html Folder and Find .htaccess File

Double click on the Public_html folder to open it. Under public_html, you’ll see a lot of files, and one of them would be .htaccess

Note: If you’re unable to see the .htaccess file, then click on the settings option present at the top right and click on “Show hidden files”, you’ll find the .htaccess file.

Step 4: Open .htaccess File in Text Editor

To open the .htaccess file in a text editor, right-click on it and then click Edit.

Once you’ve opened the file in the text editor, look for lines that use Rewrite directives.

Rewrite directives are part of the mod_rewrite module in Apache. They describe a text-based pattern that will be matched against all entered URLs. So, if a user requested a matching URL to your site, the RewriteRule will redirect the user properly.

let’s take an example to understand it better:

here is a simple RewriteRule example that matches all incoming requests to https://hostinggrow.com and responds with a 405 Error Method Not Allowed.

As you can see, at the end of the rule marked R=405. This indicates that the response code is 405, which means the server understands the request made by the user and the resource exists, but the provided HTTP method was not allowed.

So, if you’re also noticing strange Rewrite directives in the .htaccess file, then add a # character prefix at the end of the line. Once done, restart your server and check your website.

Solution 8: Restore your Complete Website from a Backup

Backups can save your day! If you have got a complete backup of your site, then use it to solve this issue. Sometimes 405 HTTP error appears because of compatibility issues. 

If nothing has worked for you so far, try this out. However, steps to restore a backup can be different on a different platform.

Here is how to do it in cPanel

Remember this guide is for cPanel users, however, the steps for FTP users are almost similar.

  • Step 1: Log in to your cPanel
  • Step 2: Click on PhpMyAdmin

PhpMyAdmin option is present under Databases.

  • Step 3: Click on Import

At the top menu, the Import option is available.

  • Step 4: Click on choose file

Now, click on choose file to upload the backup you’ve downloaded.

Solution 9: Fix File Permissions 

Misconfigured permissions could bring this error to your site.

File and folder permissions inform the server that can read, run, or modify files in your account. WordPress needs permissions to execute files and create folders on the server.

Wrong file permissions can block WordPress from forming folders, uploading images, or running some scripts.

The right set of file and folder permissions permits WordPress to create folders and files. The following settings are suggested for most users.

755 for all folders and sub-folders.
644 for all files.

Here is a great blog post published by cPanel itself.

Solution 10: Contact Your Host

Let your host do the job for you because fixing this issue on your own involves risk, your host knows how to manage these errors, they face them on a regular basis. You’re a content creator and your main job should be publishing quality content on the web. Raise a ticket or live chat with them about the issue. They’ll help you!

HostGator – 0824 661 4102

Bluehost – 00 1 801-765-9400

Godaddy – 040 6760 7600

SiteGround – Chat Support 24/7 – Read How To Contact SiteGround Customer Support

Hostinger – Live Chat Support 24/7 – Contact Now

Kinsta – 24/7 Live Chat Support

Cloudways – +35635500106

A2Hosting – 888-546-8946

DreamHost – 24/7 Live Chat Support

It’s A Wrap!

I hope this article was helpful to you. Check out my other works:

How To Permanently Fix 404 Error (Not Found Error)

400 Bad Request Error (Fixed) 7 Easy Ways

How To Reduce Server Response Time (TTFB) 14 Terrific Ways

How To Permanently Fix A 403 Forbidden Error (Screenshots)

12 Plugins To Make Your WordPress Site Faster Than Yesterday

Sumit
Sumit

Sumit is a regular contributor to Hostinggrow.com. He has 6 years of experience in blogging, and he loves football, his favorite player is - Lionel Messi (GOAT), but he has no hate for Ronaldo.

Articles: 54

Leave a Reply

Your email address will not be published.