Are you trying to fix the 400 bad request error on WordPress? You are in the right place!
In this article, I’ll show you how to troubleshoot this common WordPress error.
Without further ado, let’s get started!
Table of contents
The 400 Bad Request Error indicates that the server was unable to process the request due to invalid syntax. It falls into the Client Error category. So, the 400 Bad Request error happens before it is even processed by the server.
In this article, I’ll show you how to quickly fix this common WordPress error.
Let’s get started!
Errors 400 can have a multitude of reasons, but here are the most common ones:
To protect bandwidth, many web servers (almost all of them) limit by default the size of the files your visitors can upload. When such an upload occurs, the server returns a 400 Bad Request error. Anyway, it’s best for security not to allow your user to upload heavy files on WordPress websites.
Sending a request to an invalid URL (ie: with erroneous characters, malformed syntax, or illegal characters) can return a 400 Bad Request Error. This can happen so easily if you don’t encode your URL correctly.
Sometimes your browser can store invalid or expired cookies. The server may perceive this cookie as dangerous and return the 400 Bad Request Error code.
Sometimes Elementor users encounter the 400 error. Don’t worry, the solutions we propose in this article also work for Elementor users.
Nota bene: Before trying to fix any HTTP error on WordPress, you should ALWAYS make a backup of your WordPress Website (FTP + Database).
Although it’s categorized as a client error, the 400 bad request error code is often at a crossroad between, the client, the server, and/or a web application. Determining the cause and fixing the 400 bad request error code on WordPress can thus be challenging.
This being said, the 400 bad request error designates that the request sent by the client was invalid for some reason, so here is what you should do first if you are using WordPress: Make a backup!!! 🙂
Daily Automatic Backups
You’re better safe than sorry!Try WP Umbrella for free
Wrong URL strings are the most common reasons for a 400 Bad Request error. Check that there are no unwanted or illegal characters in the URL you typed in your browser. You also need to make sure they’re separated with adequate slashes.
Sometimes, the URL has special characters such as %%%, which can lead to the 400 error. If this happens, you have to check that your WordPress website is encoded properly.
If you struggle with this, check out this amazing free URL Encoder & Decoder Tool for WordPress. When you think that you have a good URL structure, try to refresh the page. If it doesn’t work, go to the next step!
You may be surprised, but most 400 errors in WordPress can be fixed by clearing your browser’s cache and cookies.
Browser caches temporarily store images, scripts, and other parts of websites you visit to speed up your browsing experience. Some of the data stored can be expired and thus responsible for the 400 Bad Request Error. Clearing your browser cache and cookies might troubleshoot the 400 HTTP error code.
In Chrome, enter this address in your browser’s URL field: chrome://settings/clearBrowserData
You will directly access the clear browsing data dashboard.
Here, make sure that the “cached images and files“, and “cookies” boxes are ticked. Then click on the Clear data button. Refresh your page, if it doesn’t work, go to the next step!
Nota bene: On a Mac, you can refresh a web page and automatically clear its cache with the shortcut: SHIFT+CMD+R
Click the menu button and select “Preferences” > Privacy & Security panel. You will lend here:
Tick the “Cookies and Site Data” and “Cached Web Content” boxes and click “clear data”
If you are not using Google Chrome or Firefox, check out these guides (I don’t have IE, Edge or Safari on my laptop):
If you have emptied your browser cache and cookies, you have automatically been logged out of WordPress. Try to log in again.
By doing so, you will refresh your credential and maybe get rid of the 400 Bad Request Error Code. If it doesn’t work, let’s go to the next step!
Many servers limit the size of files for security reasons. If you’re facing the bad request error while uploading a file, try again with a much smaller file to see if this resolves the 400 error.
It’s highly unlikely, but the 400 Bad Request Error can also be triggered by your cache plugin. You might want to purge your cache to troubleshoot this error.
To clear the cache on WP Rocket you need to click here:
To purge the cache on WP Super Cache you need to click there:
Plugins and themes can enhance your WordPress website functionalities, but they can also generate PHP errors and trigger the 400 Bad Request Error Code.
Monitoring WordPress PHP error logs is a good way to detect the plugins that can slow and jeopardize your website. Removing one by one the last plugins you installed, might be a good way to fix the 400 bad request error.
If you want to see which plugins generate PHP errors look at WP Umbrella.
If you have updated WordPress just before the 400 bad request error showed up – and if none of the solutions we suggested you before worked – you may want to consider rolling back to the previous WordPress version you had installed when things were working just fine.
If you don’t know how to downgrade your WebPress website, check out this article from Kinsta!
In most cases, the 400 Bad Request error is coming from the client side and is thus easy to fix. However, from time to time, this error can shed light on more problematic generic server issues.
If none of our tips and fixes worked, you should suspect the bad request error to be a server side issue. In such a situation, you have to contact your web host provider.
You may also want to see my article on how to fix the 500 internal server error on WordPress.
Fixing the “link you followed has expired” error is easy. All you need to do is to increase the maximum upload size and execution times for your website. In order to do this, you’ll have to edit a core WordPress file and copy a few lines of code.
Are you receiving an error message saying “This site contains harmful programs” on your WordPress […]
The 500 internal server error on WordPress is probably one of the worst you can get because your entire site is down. The 500 internal server errors are very often the consequence of an error in the PHP code.