This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Try the fastest hosting platform with pay-as-you-go pricing & 24/7 expert support! MIGRATE NOW →

How to Fix the “405 Method Not Allowed” Error in WordPress (11 Easiest Methods)

Updated on June 29, 2022

6 Min Read
405 method not allowed error

Fixing the 405 Method Not Allowed error can be frustrating, as you need to perform multiple troubleshooting processes to resolve and find the cause. Here, we have covered nine simple ways to help you fix your WordPress site’s 405 Method Not Allowed error.

Before troubleshooting, it is recommended to back up your database and site. In case if something goes wrong while editing the files or folders, you’ll still be able to recover the whole site.

What Is the 405 Method Not Allowed Error?

A 405 Method Not Allowed error indicates that a web browser has requested access to one of the web pages, but the server has rejected the request; hence, the browser cannot access the requested web page. When this happens, your website will show 405 Method Not Allowed to your visitors.

Unlike most other HTTP response codes in the 4xx category (client-side), the 405 Method Not Allowed error is considered a server-side issue. Here are some of the common variations that indicate your site has been affected with 405 error:

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

Why Does 405 Method Not Allowed Error Occur?

The 405 Method Not Allowed is quite mysterious. It indicates what happened to your site but not why it happened, making it difficult for you to pinpoint its cause and fix the error. There are multiple reasons for this; poorly coded plugins or themes, browsing cache, not updated site, etc. Let’s read about more reasons for this error in the next section and how you can fix them easily.

Fix “405 Method Not Allowed” Error in WordPress

To help you fix the 405 Method Not Allowed error in WordPress, I’ve explained the problem and its most common fixes.

  1. Roll Back to Your Running Recent WordPress Site Version
  2. Check to See If You’ve Input the Correct URL
  3. Deactivate Plugins and Themes
  4. Check for Any Unexpected Database Changes
  5. Look Through the Server-Side Logs
  6. Confirm Your Server’s Configuration
  7. Set File Permission
  8. Debug Your Application Code or Scripts
  9. Clear Your Browser Cache
  10. Check A Records
  11. Contact Your Hosting Support

1. Roll Back to Your Running Recent WordPress Site Version

Backups play a vital role when it comes to any issues or errors. It’s an easy way to fix errors like 403, 404, and more.

Many good hosting companies, like Cloudways, offer automated backups for your applications. So if your hosting provider has automatic backups, roll back to your previous running version if you’re facing a 405 Method Not Allowed Error.

backup restore

2. Check to See If You’ve Input the Correct URL

It might be possible that you have entered an incorrect URL that causes the 405 Method Not Allowed Error on your WordPress site. Therefore, check your URL to confirm you haven’t spelled your visiting page/site/URL incorrectly. Many site owners don’t allow people to visit wrong pages and incorrect URLs for security reasons.

3. Deactivate Plugins and Themes

Plugins enhance the functionality and experience of your WordPress site, while themes improve their aesthetic value. However, if they conflict with each other or your WordPress site, it can lead to errors.

If you have recently installed or updated a plugin/theme and suspect this might be the core of your problem, deactivate them. For this, go to WordPress Dashboard > Plugins > All Plugins and Deactivate each plugin. Then re-visit your WordPress site. You found the culprit if the issue has been resolved for your URL by deactivating any plugin. If not, then perform the same for your WordPress theme.

WordPress theme

If you have no access to your WordPress Dashboard, you can do it via FileZilla. Open FileZilla and add your server credentials (IP, Username, and Password). Then go to public_html folder > wp-content folder > and change the plugins folder name to something like “xyzplugins”. Check to see if the issue is fixed.

If your URL starts working, revert the folder name from “xyzplugins” folder to “plugins”. Open your WordPress dashboard and activate each plugin to check which plugins were causing the issue.

plugins

4. Check for Any Unexpected Database Changes

Plugins update your database. Check whether your tables are modified after you’ve deactivated or removed the plugin in the previous step. You can check the DB tables through a database launch option on your hosting platform. After that, you can diagnose and manually look for the tables.

With Cloudways, you can easily check this from the Database Manager.

server

5. Look Through the Server-Side Logs

Analyzing your server/application logs is an excellent practice to find out more about any issue. It will help you analyze dynamic requests, problems you encounter, static assets, detailed process information, memory & CPU utilization, and more.

If you are running your application on Cloudways, you can view your logs with a few clicks. There’s a section available in the Application Management panel where you can check Access & Error logs.

error logs

The Access log is divided into Apache, Nginx, and PHP. From this section, you can view requests and process information.

The Error logs show information about the encountered errors and potential problems.

6. Confirm Your Server’s Configuration

Every WordPress application runs on a web server, and the ones recommended by WordPress.org are Apache and Nginx. If you are unsure which web server you’re using, check your application files. A .htaccess file means you are running your website on an Apache web server; on the other hand, an nginx.conf file means you’re with Nginx.

The .htaccess file is located in applications/<your site folder name>/public_html and the nginx.conf is located in  /usr/local/etc/nginx.

Next, open your web server config file (.htaccess for Apache & nginx.conf for Nginx) via text editor and look for the Rewrite directives. Create a copy of your web server file (for precaution), and if you see any “R=405” Rewrite Rule, then comment on that rule by adding “#” (beginning) to check if the issue is resolved or not.

7. Set File Permission

Sometimes, due to misconfiguration of the file permission, you may experience a 405 error. So you need to set your file permission to 755 for folders and 644 for files. You can set the file permission from the FTP client like FileZilla, or if you are a Cloudways user, then simply reset the file/folder permission from the Application Management panel > Application Settings.

8. Debug Your Application Code or Scripts

It might be possible that you have added any custom code that generates Error 405 on your website. You must create a staging website and start manually debugging it to find the cause of the 405 Method Not Allowed error.

9. Clear Your Browser Cache

If you performed all the above troubleshooting actions and still face the 405 Method Not Allowed error on your WordPress site, then clear your browser cache, cookies, and history. Or open your site URL in Incognito mode.

One of the above methods may have resolved your issue, but the cache might have you still encountering the 405.

10. Check A Records

One of the reasons that can cause 405 errors in your WordPress is improper details of your Domain Name System (DNS). You need to ensure that your A Records points your domain name and subdomains to a dedicated IP address. The settings of your DNS are dependent on the hosting provider you are using.

In case you are a Cloudways user, you can refer to the following video to Map Your Domain and Manage DNS Records.

11. Contact Your Hosting Support

If all the above troubleshooting process hasn’t helped you fix the issue then it’s a good step to share your query with your hosting support and fix the issue or find the cause of why you are facing the 405 Method Not Allowed Error. Most of the good hosting providers offer live chat or ticket assistance to help you resolve your site issues.

Summary

The ways to solve the 405 error are many and can vary from site to site. I have covered the 11 easiest methods to fix the 405 Method Not Allowed error and I hope this article helped you fix the issue. If you know another troubleshooting method, please share it in the comment section below.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Sarim Javaid

Sarim Javaid is a Digital Content Producer at Cloudways. He has a habit of penning down his random thoughts and giving words and meaning to the clutter of ideas colliding inside his mind. His obsession with Google and his curious mind add to his research-based writing. Other than that, he's a music and art admirer and an overly-excited person.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now