Visitors who hit a 405 Method Not Allowed error often leave for another site, so the site owner loses visits and sales. Both the visitor and the owner end up stuck. This guide explains what the error means, what causes it and how to fix it, starting with the quickest checks.
What the 405 Method Not Allowed error is
A server sends status 405 when it recognizes the HTTP method used in a request but the target resource does not support that method. The current HTTP standard, RFC 9110 (section 15.5.6), defines it. The standard also says the server must send an Allow header that lists the methods it does accept. Most servers explain very little beyond that. The error is not common, but it can stop you from logging in, sending a form or finishing a checkout.
The sections below cover the usual causes first, then fixes in order from quickest and safest to most involved.
How the 405 error shows up
The 405 error appears when a web server receives a request from a browser or app but rejects the HTTP method attached to it. It belongs to the 4xx family of client error responses, the same group as Status Code 400 Errors, 403 Forbidden and 404 Not Found.
The server sends a 405 whenever a browser or script tries to load a page, or act on it, with a method that resource does not support. The message can look different from site to site:
- 405 Not Allowed
- Method Not Allowed
- HTTP 405 Error
- HTTP Error 405, Method Not Allowed
- HTTP 405 Method Not Allowed
A 4xx code technically points at the request. In practice, a 405 usually comes from how the site is built or configured: a form, script or rewrite rule sends a method the server was never set up to accept. A visitor can rule out a mistyped address. Everything else is up to the site owner.
The fixes are the same in Chrome, Edge, Firefox and Safari, because the browser only shows what the server sent back.
Reasons behind the 405 Method Not Allowed error
You need to know where the 405 comes from before you can fix it properly. These are the most common causes.
Wrong HTTP method
HTTP defines a set of standard methods that a client, usually a web browser, uses to talk to a server. They include GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS.
The server returns a 405 when a client asks for a resource with a method that resource does not support. For example, a script might try to update data with GET instead of POST or PUT. A form might also post to a static HTML file. On Nginx, sending a POST to a static file is a classic cause of a 405.
Server configuration problems
The server may simply not be set up to accept the method the client uses. Common culprits are a rewrite rule in .htaccess on Apache or LiteSpeed, a limit_except block in an Nginx configuration, or a handler in IIS that only allows certain verbs.
Cross-origin requests
When a script on one site sends certain requests to another domain, the browser first sends an OPTIONS “preflight” request to ask for permission. This is part of the CORS (Cross-Origin Resource Sharing) rules that browsers enforce on top of the same-origin policy. If the receiving server or API does not handle OPTIONS, or does not allow the method the script wants to use, it can answer with a 405. The real request then never goes through.
Web application firewall restrictions
Many sites sit behind a Web Application Firewall (WAF), either from the host or from services such as Cloudflare, Sucuri or a WordPress security plugin. A WAF can block methods it considers risky or unnecessary, such as PUT, DELETE or TRACE.
When a request uses one of those blocked methods, the WAF stops it and returns a 405 before it ever reaches your site.
Access control and permissions
Wrong permissions or access rules on the server can also produce a 405. Some servers and applications answer with a 405 instead of a 403 when a user or script tries an action on a resource it is not allowed to change.
How to fix the 405 Method Not Allowed error
The exact cause can be hard to pin down, so start with the quick checks below and move down the list only if the error stays. Take a full backup of your site’s files and database before you change anything from fix 2 onward.
1. Check the URL
Start with the address itself. The most common cause of a 405 is a mismatch between the method a request uses and the methods the server or endpoint accepts, such as a POST sent where only GET is allowed. A mistyped URL usually produces a 404 instead, but it is still the quickest thing to rule out.
Many servers are set up to refuse requests that do not match a real page or endpoint. A missing character, an extra slash or a wrong file extension can send the request to a resource that does not accept that method.
Check the URL carefully for missing characters, typos and anything that does not match. Then load the corrected address in the browser and check that the page you want appears. If the error came up after you sent a form, go back to the form page, reload it and submit it again rather than refreshing the error page.
2. Undo any recent updates
Updates bring bug fixes and security patches to your WordPress site. Sometimes, though, an update causes new problems, including a 405 error.
- Find recent updates: If the 405 error started right after an update, that update is the first suspect. This applies to WordPress core updates as well as theme and plugin updates.
- Consider a rollback: If you think a core update caused the problem, consider going back to the previous WordPress version. Take a complete backup of your files and database first, so you can undo any change.
- Use a plugin for the rollback: You can roll back by hand, but a plugin is faster and less error-prone. The WP Downgrade | Specific Core Version plugin from the WordPress.org directory makes the built-in updater install a release you choose instead of the latest one. Its listing warns that it has not been tested with the three most recent major WordPress releases, so take a backup before you use it.
- Run the rollback carefully: Go to Settings > WP Downgrade, enter the exact version number you want to go back to, and save. Then open Dashboard > Updates and run the update. WordPress downloads that release from WordPress.org and installs it like a normal update.
- Monitor and move on: Check that your site is stable and that the 405 error is gone. Older releases stop getting security fixes, so treat the downgrade as a short-term test. Once you know which update caused the problem, report it to the developer, wait for a fixed release, and then update to the current version again. If the downgrade did not help, restore your backup.
3. Deactivate plugins and themes
Plugins and themes add features and set the look of your WordPress site. A theme controls the design, and plugins add features or handle complex tasks.
Spotting possible problems: Plugins and themes can cause problems just like core updates can. Every new feature changes how the site behaves. Security, caching, form and REST API plugins are the usual suspects for a 405, because they decide which requests reach WordPress. Two plugins can also conflict with each other, or a plugin may not yet work with your WordPress version.
Finding the problem plugin: Start with deactivation, not deletion. Deactivating keeps a plugin’s settings, so you can switch it back on if it turns out to be innocent. To see every installed plugin:
- Log in to your WordPress admin dashboard.
- Go to Plugins > Installed Plugins.
Test plugins one at a time: Work through the list one plugin at a time and check the site after each change. This tells you exactly which plugin causes the error:
- Deactivate a plugin.
- Check your website for the error.
- If the error is still there, reactivate the plugin and move on to the next one.
If you are locked out of the dashboard, open your hosting file manager and rename the wp-content/plugins folder (for example to plugins-off). That turns off every plugin at once. Rename it back once you can log in.
Checking the theme: If no plugin is to blame, test your current theme the same way:
- Go to Appearance > Themes in your WordPress dashboard.
- Activate a default theme such as Twenty Twenty-Five, the default theme since WordPress 6.7.
- Check whether the error is still there.
Deciding what to do: If the faulty plugin or theme is essential to your site or business, contact its developer with the details. If it is not essential, remove it or find an alternative. Choose a plugin or theme that keeps the features you need without causing errors.
4. Review database changes
Database changes can also lead to a 405 error. Plugins and themes often get permission to write to your database, and some of those changes stay after you remove the plugin or theme.
So deleting an extension does not always fix the 405 error. You may also need to find and undo the changes it made in the database.
Opening the database and the SQL tab: The steps depend on your host and database. On a typical cPanel host:
- Log in to cPanel with your account details.
- Scroll down to the Databases section and click phpMyAdmin.
- Select your site’s database in the left-hand column of phpMyAdmin.
Run a query on the SQL tab: This query lists your tables with the most recently changed ones first.
- Select the SQL tab for your database.
- Enter the following query, replacing
dbnamewith your database name:
SELECT table_name, update_time FROM information_schema.tables WHERE table_schema = 'dbname' ORDER BY update_time DESC;
On some MySQL and MariaDB setups, update_time is empty or resets when the server restarts. Treat the result as a pointer, not a complete history.
- Look for suspicious tables and records: Check tables that changed around the time the error started, and any tables a removed plugin left behind (they often carry the plugin’s name). Look for options or rules that rewrite or block requests.
- Undo unwanted changes: Reverse changes you did not intend, either by restoring a database backup from before the problem started or by editing the specific records. If you are not sure what a table does, ask a developer or your host before deleting it.
Working through these checks one by one often clears a 405 error caused by leftover plugin data.
5. Check your server’s configuration
You can open your server configuration files from cPanel and check whether a recent change is causing the 405 error. These steps apply to Apache and LiteSpeed servers, which use .htaccess files:
- Open cPanel: Log in to the cPanel account your host provides. From here you can manage many parts of your site, including the server setup.
- Find File Manager: Go to the Files section of cPanel and choose File Manager. It lets you browse and edit the files in your site’s folders.
- Open the root folder: Open your site’s root folder. It is usually called
public_html, or it matches your domain name. If you cannot see.htaccess, click Settings in the top-right corner of File Manager and turn on “Show Hidden Files (dotfiles)”. - Open and edit.htaccess: Find the
.htaccessfile in the root folder, right-click it and choose Edit. Download a copy of the file first so you can put it back if something breaks.
Find and comment out rewrite rules: Look for lines that start with RewriteRule or RewriteCond. These directives control how URLs are changed and redirected.
Look for any rule that could produce a 405, especially one with the flag [R=405,L]. To turn a rule off without deleting it, add a # at the start of the line. Anything after the # is ignored.
- Save your changes: Save the edited
.htaccessfile. Change only the lines you are testing, so you know exactly what made the difference. - Test the site: Load your site and repeat the action that caused the error. If the 405 is gone, the rule you commented out was part of the problem. Fix it properly, or ask the plugin or developer that added it.
If your host runs Nginx, there is no .htaccess. Method rules live in the server configuration, which usually only the host can change. Contact them with the URL and the time of the error.
6. Look at the server-side logs
Most web applications keep logs of what they do. Application logs record what the program did, such as the pages requested and database results.
- Know the difference between application and server logs: Server logs cover the infrastructure that runs the application. They show the health, status and performance of the server. Application logs show what your site’s own code did.
- Read the server logs: In cPanel, open the Metrics section and use Errors for recent error entries and Raw Access for the full access log. Many hosts also keep files such as
access.loganderror.login alogsfolder, which you can reach over SFTP or through File Manager. The exact location depends on your host. In the access log, search for lines with the status code 405. Each one shows the URL, the method and the time. - Turn on the WordPress debug log: Add
define( 'WP_DEBUG', true );,define( 'WP_DEBUG_LOG', true );anddefine( 'WP_DEBUG_DISPLAY', false );towp-config.php. WordPress then writes errors towp-content/debug.logwithout showing them to visitors. Turn debugging off again when you are done. - Read through the entries: Go through the entries in time order, starting just before the error. Look for anything unusual, such as a plugin file name, a blocked method or a firewall rule ID.
- Ask a developer if needed: If entries look strange or need expert reading, share them with a developer or your host. They can usually tell from the logs what is causing the 405.
7. Check the A records
Check your DNS (Domain Name System) settings, especially the A records. An A record links a domain or subdomain to an IP address. A wrong A record does not cause a 405 by itself. But if your domain points to an old server or a different host, that server may reject requests your real site would accept. Here is how to check A records in cPanel.
Log in to cPanel: Sign in to the cPanel account from your hosting provider so you can see your DNS records.
Open the Zone Editor: In cPanel, scroll down to the Domains section and click Zone Editor. Click Manage next to your domain to see and edit its DNS records.
Check the A record details: Check these details for each A record:
- Type: The record type is set to A.
- Name: The name matches your domain (shown as
example.com.in cPanel) or the subdomain you are checking, such aswww.example.com. - Record: The domain or subdomain points to the correct IP address for your current server. Your host lists this IP in cPanel or in your welcome email.
- TTL (Time to Live): This is how long DNS resolvers cache the record, in seconds. 14400 seconds (4 hours) is a common value on cPanel hosts, though yours may differ. After you fix a wrong A record, allow up to the TTL period for the change to reach everyone.
If your DNS is managed somewhere else, such as Cloudflare or your domain registrar, check the A records there instead. The Zone Editor in cPanel is not the one in use in that case.
8. Reset file and folder permissions
Wrong file permissions can also lead to a 405 error, so it helps to reset them to the standard values. Here is how to do it in cPanel:
- Log in to cPanel.
- Go to the Files section and click File Manager.

- Select the files or folders whose permissions you want to reset.

- Right-click a file or folder and click Change Permissions.
- The Change Permissions window shows checkboxes and a number for the owner (User), Group and World (public).
- Set the permissions to the standard values for a WordPress site:
- Folders: 755 (drwxr-xr-x)
- Files: 644 (-rw-r, r, )

Do not apply 755 to files or 777 to anything. Many security guides set wp-config.php stricter still, such as 440 or 400, if your host supports it.
9. Contact your hosting provider
If none of the fixes above removed the 405 error, the problem probably sits in a part of the server you cannot reach. That might be the main web server configuration, a host-level firewall or a security module. These are hard to fix yourself without risking your site’s data.
At this point, contact your hosting provider. Most offer 24/7 live chat or a ticket system. Send them the exact URL, the method if you know it (for example, a contact form that sends POST), the time the error happened, and any matching lines from your logs. That helps them find the cause much faster.
How to stop the 405 error from coming back
Most 405 errors trace back to a change, so the best prevention is controlling changes and keeping records. These habits help:
- Check your server logs and web server configuration regularly, especially after updates.
- Install themes and plugins that are kept up to date and tested with your WordPress version.
- Keep every URL on your site, including form actions and API endpoints, accurate.
- Allow only the HTTP methods each resource actually needs, and reject everything else.
- Use strong user logins so only authorized users can take sensitive actions.
- Use a WAF to block unwanted method requests before they reach the server, and review its rules after you add new features.
- Review code regularly to catch scripts that send the wrong HTTP method.
Take a backup before every update, then test your forms, login and checkout afterwards. Then if a 405 appears, you will know what changed and can undo it in minutes.
FAQ
Is a 405 error my fault or the website’s fault?
Usually it is the website’s. If the address is typed correctly and reloading does not help, the server is set up to reject that kind of request. All you can do is try again later or contact the site owner.
What is the difference between a 405 and a 403 or 404 error?
A 404 means the server cannot find the page. A 403 means the page exists but you are not allowed to access it. A 405 means the server recognizes the method but the address you requested does not support it, such as sending a form to an address that only accepts page views.
Can clearing the browser cache or cookies fix a 405 error?
Sometimes. If a cached page has an old form pointing at an address that has since changed, clearing the cache and loading the page fresh can help. If the server itself rejects the method, clearing the cache changes nothing.
Why does my WordPress contact form or REST API call return 405?
The most common causes are a security plugin or firewall blocking POST, PUT or DELETE requests. Another is a rewrite rule in .htaccess, or a form that sends its data to a static file. Turn off security and caching plugins one at a time, check the firewall logs at your host or CDN, and look for rules with [R=405,L] in .htaccess.
Is a 405 error the same as an app or game error code?
No. A 405 is a standard HTTP status code that any website or API can return. Codes such as Roblox Error Code 279 are the app’s own error numbers. Error 279 points to a connection problem between the Roblox client and a game server, and it has its own fixes.
Should I roll back WordPress to fix a 405 error?
Only as a short test, and only with a full backup. Older WordPress releases stop getting security fixes, so once you have confirmed which update caused the error, return to the current version as soon as a fix is available.
Sources
- RFC 9110, HTTP Semantics (IETF), section 15.5.6 on 405 Method Not Allowed
- MDN Web Docs: Allow header
- WordPress Developer Resources: Debugging in WordPress
- WordPress.org Plugin Directory: WP Downgrade | Specific Core Version
- WordPress.org Documentation: Twenty Twenty-Five
- cPanel Documentation: ZoneEdit API functions












