Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Fix the WordPress Admin Ajax 400 (Bad Request) Error

Running into WordPress errors is frustrating, especially when the message doesn’t give you a clear hint.

The admin Ajax 400 (Bad Request) error usually means your server couldn’t understand a browser request. It often happens due to a plugin, theme, or even a typo in the URL.

We’ve seen it triggered during file uploads, when running custom code, or while browsing the admin area. Thankfully, it’s usually easy to fix.

In this guide, we’ll show you what causes the 400 error and how to fix it quickly.

Fixing the admin-ajax bad request error in WordPress

What Causes the 400 (Bad Request) Error?

The 400 (Bad Request) error usually happens when a browser sends a request that the server can’t understand.

It’s a common WordPress error, but the message itself doesn’t give much context. That can make it confusing for beginners to troubleshoot.

You might see it as a simple ‘400 Bad Request’ message in the browser. The exact look can vary depending on your hosting provider.

400 bad request generic error

It can also show up in your browser’s developer tools under the ‘Console’ tab.

This is especially true if the request involves the admin-ajax.php file.

Admin ajax 400 bad request error in browser console

Here are the most common reasons we’ve seen this error:

1. Invalid or Malformed URL

A small typo or extra character in the URL can cause the server to reject the request. Even a space or symbol in the wrong place can lead to this error.

2. Browser Cache and Cookies

Outdated or corrupted browser data is another common trigger. We’ve seen this fixed many times just by clearing the cache and cookies.

3. Large File Uploads

Trying to upload files that are too large for the server limits can also lead to a 400 error. This often happens when uploading high-resolution images or videos.

4. Plugin or Theme Conflicts

New or recently updated plugins or themes may contain code that clashes with your setup. This can result in a 400 error after activation.

5. Server-Side Issues

Sometimes, the problem lies with the server itself. A corrupted .htaccess file or misconfigured settings can trigger this error, but restoring a clean version usually helps.

Now that you know what might be causing it, let’s walk through how to fix the error step by step.

How to Fix the 400 (Bad Request) Error in WordPress

Now that we’ve covered what can cause the 400 (Bad Request) Error, let’s walk through the steps to fix it. These solutions are simple and effective, even if you’re not a tech expert.

Here is the list of steps we will show you in this guide:

Check the URL

The first thing to check is the URL you’re trying to visit. Even a small typo, like a missing character or space, can break the request and trigger a 400 error.

Make sure the link is correct and doesn’t contain extra symbols or spaces. If it looks fine and the error still shows up, move on to the next step.

Clear Browser Cache and Cookies

Outdated or corrupted browser data can also cause a 400 Bad Request error. Clearing your cache and cookies is a quick way to fix it.

For Chrome: Click the three-dot menu at the top right and select ‘Delete browsing data.’

Clear cache in Google chrome

In the popup, check both ‘Cookies and other site data’ and ‘Cached images and files.’

Set the time range to ‘All time,’ then click ‘Delete data.’

Delete cookies and site data chrome

For Firefox: Click the menu icon at the top right corner of the screen.

From here, you need to choose ‘Settings.’

Firefox settings

This will open the browser settings.

Next, go to the ‘Privacy & Security’ tab, scroll to ‘Cookies and Site Data,’ and click ‘Clear Data.’

Clear data in Firefox

Select ‘Cookies and site data’ and ‘Cached web content.’

For ‘When,’ choose ‘Everything’ and then click ‘Clear.’

Delete browse cookies in Firefox

For other browsers, you can follow our guide on clearing the cache in all major browsers.

After clearing the cache, refresh your site to see if the error has been resolved.

3. Reduce File Upload Size

If the error appears during a file upload, the file may be too large for your server to handle.

Here are a few ways to fix this:

define('WP_MEMORY_LIMIT', '256M');

After making changes, try uploading again to see if the error is resolved.

4. Deactivate All Plugins

Another common reason for the admin Ajax 400 error is a conflict between plugins or a poorly coded plugin.

To find the culprit, you’ll need to deactivate all your plugins first.

Go to the Plugins » Installed Plugins page in your WordPress dashboard. Check all the plugins, choose ‘Deactivate’ from the Bulk Actions dropdown, and click ‘Apply’.

Deactivating all your WordPress plugins

After that, visit your site to see if the error is gone. If it is, then one of the plugins was the issue.

Start reactivating your plugins one at a time. After each activation, check your site until you find the plugin that triggers the error.

Note: If you can’t access your admin area, you can deactivate plugins using FTP or the File Manager in cPanel.

5. Switch to a Default Theme

Sometimes, your WordPress theme can cause the 400 error, especially if it includes custom code or doesn’t follow WordPress coding standards.

To check if the theme is the issue, try switching to a default WordPress theme like Twenty Twenty-Four or Twenty Twenty-Three.

Go to the Appearance » Themes page in your dashboard. If you already have a default theme installed, hover over it and click ‘Activate’.

Activate theme

If you don’t have one installed, see our guide on how to install a WordPress theme.

After switching, check your site again. If the error disappears, your theme was likely the cause.

You can contact the theme developer for support or switch to a more reliable alternative. Check out our list of the best WordPress themes for some great options.

Bad permalinks can also cause a 400 Bad Request error, especially if the URL structure is misconfigured or corrupted.

Thankfully, WordPress makes it easy to reset your permalinks. Just go to Settings » Permalinks and click the ‘Save Changes’ button without modifying anything.

Reset permalinks

This action will refresh your permalink settings and regenerate your .htaccess file, which often clears up the error.

7. Hire Expert WordPress Help

Fixing a 400 Bad Request error can feel overwhelming, especially if you’re not comfortable digging into technical details.

If you’d rather skip the hassle, then you can use our Premium WordPress Support service to get expert help from real WordPress pros.

WPBeginner Pro Services

Our team will diagnose the problem and fix it for you. It’s a one-time, on-demand service—no contracts, no monthly fees.

👉 Click here to connect with a WordPress expert.

More Helpful Resources to Fix WordPress Errors 🎁

Still having trouble? Here are some additional guides that can help you diagnose and fix related WordPress errors:

We hope this guide helped you fix the admin Ajax 400 – Bad Request error in WordPress. You may also want to check out our list of must-do WordPress maintenance tasks or explore ways to improve your WordPress admin area.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

Comments

  1. Congratulations, you have the opportunity to be the first commenter on this article.
    Have a question or suggestion? Please leave a comment to start the discussion.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.