Fix Error 405 Method Not Allowed on WordPress
Has your website ever experienced an error with the message ” Error 405 Method Not Allowed?”. This error message is certainly not good news. Because Error 405 Method Not Allowed will make your visitors unable to open website pages.
Then, how to overcome it? Quiet. You’ve come to the right place! This article will discuss it thoroughly, starting with the error 405 Method Not Allowed, why it can happen, and of course, a solution to overcome it. So, make sure you listen to the end, yes!
What is Error 405 Method Not Allowed?
When a user accesses a website, the browser will send an HTTP request to the webserver. Error 405 Method Not Allowed occurs when the web server has received an HTTP request, but he refused.
This condition is indeed quite complex compared to the 404 Not Found error or Error 429 Too Many Request, which also often occurs.
Error 404 Not Found is usually triggered due to incorrect URL writing. Instead, the error 405 Method Not Allowed error confirms that the inputted URL is correct, but the webserver still does not allow users to open the page.
Most of these errors appear as follows:
However, this error can also appear in various variations depending on the browser or operating system used. Here we provide a list of 405 Method Not Allowed errors that often occur:
- 405 Method Not Allowed
- Method Not Allowed
- HTTP 405 Error
- HTTP Error 405 – Method Not Allowed
- HTTP 405 Method Not Allowed
What are the Main Causes of Error 405 Method Not Allowed?
In general, error status coded 4xx is usually caused by an issue on the client-side (website visitors). Another case with the error status coded 5xx, which usually occurs because there are issues on the server-side.
So it should, the Error 405 Method Not Allowed error occurred because of an error from the user himself. But unfortunately, there is no definite reason that triggers an error 405 Method Not Allowed.
But, calm down. Not finding the cause, does not mean there is no solution to overcome it. After this, we will immediately explain to you some ways to resolve the Error 405 Method Not Allowed error. Especially for those of you who run websites with WordPress. So, see carefully, yes!
How to Overcome Error 405 Method Not Allowed on WordPress
Oh yes, before proceeding to the discussion, we recommend you to backup WordPress files first precaution to be alert, such as an error occurs that makes your data lost.
You can freely choose any way to back up files, either with the help of plugins, using Dropbox, or manually through cPanel. If so, let’s get to the point of the discussion below:
1. Downgrade WordPress to the Previous Version
Having the latest version of WordPress is important. The benefits can affect many things. Starting from the use of smoother, overcome bugs or annoyances, and support a variety of new features that are qualified.
However, despite its many benefits, updating can sometimes cause problems.
If you have just updated WordPress and the error 405 Method Not Allowed error issue appears, the root might be in your latest version of WordPress. So the steps you can take are to downgrade WordPress to the previous version.
Although you can do this manually, it will be more effective if you use a plugin.
Of all the plugins available, the WP Downgrade plugin is still an effective choice. This plugin automates each process, so it is less likely for you to make a mistake. But, don’t forget to keep backing up all your files first, yes!
If after WordPress downgrade and the error is lost, it means that the root is indeed in the new version of WordPress. However, if you already downgrade and the error still appears, it means the cause of the error is not the WordPress version. You can follow the next solution.
2. Disable Some Plugins
Plugins can also be the cause of this error. Just like updating the latest version, plugins that have been installed are sometimes vulnerable to cause problems. This is because every time a new function is added to the site, the way the system operates will also change.
Or it could also be a result of the default plugin, which does not match your current WordPress version. So, as a solution, try to deactivate some of your plugins in the way below:
- Open your WordPress admin dashboard.
- Select Plugins from the menu in the left sidebar, and check each plugin to be deactivated.
After that, click Deactivate from the Bulk Actions dropdown menu.
- Refresh the web page again and see if the issue is resolved.
If all plugins have been deactivated and an error still appears, it means that the cause of the error did not come from the plugin. It could be the cause is the theme you are using. For that, you can follow the next solution to deactivate the theme.
3. Disable Themes
Similar to what happens in plugins, these changes can sometimes trigger errors on your website. Therefore, try to change your theme in the following ways:
- Open your WordPress admin dashboard.
- Select Appearance from the menu in the left sidebar, then click Themes.
- Choose another theme by clicking Activate.
- Refresh your website and see if the error still appears or not.
If the plugin or theme is the trigger for the error 405 Method Not Allow error, you can delete it or replace it with another option. We also recommend that you report this issue to their developers so that it can be resolved immediately.
4. Check if there are any accidental changes to the database.
Although the steps above should have been quite effective, that does not fully guarantee that the error will instantly disappear.
Because installed plugins have access to enter your database, this means that it is possible that the plugin can change database settings without your knowledge. As a result, this database change is the cause of error 405 Method Not Allowed.
Finding out the location of database changes will be very troublesome. This requires considerable time-consuming efforts. You need to access the database in your WordPress, check one by one, and make sure if the plugin has changed anything.
If you find it difficult to do it yourself, you can ask for help from developers or professionals to overcome them.
In the future, you can also use security plugins like iThemes Security. This plugin can give you notifications when you find changes in the database.
Or you can also install other security plugins that have a database logging feature. This feature will usually help you to find obstacles in the database quickly and easily.
5. Check Website Server Configuration Settings
The next way is to check the configuration settings on your web server. Most websites use a web server from two popular softwares, Apache or Nginx. Below, we will guide you to check the webserver configuration settings of both software.
5.1. Check the Configuration File in Apache
If your website server uses Apache, you will find a file with the format. Htaccess. Next, you can check the configuration settings in the file. Here is how:
- Open your website’s root directory via cPanel.
- Open the File Manager folder.
- Search for the file with the format. Htaccess in the search field. If you use a shared hosting service, you can search for files with the format: /home/public_html/.htaccess.
- Open the file using a text editor such as Notepad.
- Look for a line of code that says Rewrite. Rewrite is here that serves to direct visitors to the right website page according to the URL address.
- Check whether there is a sequence of Rewrite codes ending in code [R = 405]. For example, like this.
- If you find the code, add the # fence character in the row.
- Restart your webserver again. Then refresh the web page again whether the error has successfully disappeared or not.
5.2. Check the Configuration File in Nginx
How to check configuration files with the Nginx web server will be the same as Apache. It’s just that you need to look for files in the nginx.conf format.
- To easily find the nginx.conf file format , you can check in several directory folders such as: / usr / local / nginx / conf , / etc / nginx , or / usr / local / etc / Nginx .
- If you have found, open the file with a text editor.
- Find the line of code that includes the 405 number like the following example.
- The code above shows that there is a error 405 Method Not Allowed error at the URL. To overcome this, you can add the # fence character at the beginning of the code line.
- Restart your web server. And refresh the page in question, check whether the error has successfully disappeared or not.
Well, that’s the tutorial to check web server configuration settings. If you have trouble solving yourself, you can ask for help directly to your hosting service support team.
6. Debugging WordPress Code or Script
If all of the above methods do not work to resolve the error, the only last solution you can do is debug the code/script from your WordPress installation. Debugging is the process of finding and reducing bugs (annoyances).
This method will be the best solution to find the error location of each of your WordPress installation code. Unfortunately, not all users can do this alone. I need direct help from an expert alias developer.
So in this step, we recommend that you contact the support of your hosting service directly to resolve it.
Closing
When running a website, there are many loopholes for users to be attacked by various problems (errors). From minor problems, even complex ones like error 405 Method Not Allowed. Although this problem is a bit troublesome, this should not need to make you panic.
No matter how small the type of error, you should resolve as soon as possible so as not to disturb website visitors.
In this article, we have also provided several solutions to resolve the error 405 Method Not Allowed, starting from:
- Downgrade WordPress to the Previous Version
- Disable Some Plugins
- Non-Activate Theme
- Check For Database Accidental Changes
- Check Website Server Configuration Settings
- Debugging WordPress Code or Script
However, if the above solution has not been able to completely resolve the error, we recommend that you ask for help directly to the developer team of your hosting service.
We hope that the information in this article can be useful, and if there are comments or questions, feel free to include them in the comments column, yes. Good luck!