An AJAX 500 error message can appear in the WordPress Admin section, worrying administrators and encouraging a quick solution. Since there’s no one-size-fits-all solution we can suggest, we can only reveal that it’s similar to the HTTP 500 Internal Server error, meaning the server unexpectedly closed a connection because something prevented it from executing the request your browser sent. That one is far harder to solve since it doesn’t refer to any root cause or specifics. In our case, while seeking how to fix WordPress Admin AJAX 500 error, we know something went awry within the Dashboard or server files. With your hopes up, let’s dive into common solutions.
1. Revert recent AJAX actions or calls
Though it sounds like a no-brainer, the simplest explanation may also be the solution. When the error has ties to AJAX (Asynchronous JavaScript and XML) it makes sense to go back on any changes you make related to AJAX, JavaScript, or XML (Extensible Markup Language). We propose looking into and inside any .php files, you edited recently. If you haven’t done so, see if others administrators, especially developers, have. If you’re sure that isn’t the case, feel free to skip this method, as many other things may affect it.
2. Check for WordPress plugin or theme conflicts
Plugins and themes make AJAX calls all the time, and are the most common source of the WordPress Admin AJAX 500 error, and therein lies the fix. We propose starting slow and disabling the most recent plugin you added by:
- Accessing the WordPress Admin section.
- Going to Plugins.
- Looking through the list, finding the latest one you added, and selecting Deactivate.
- Choosing Apply and checking whether the issue is still there.
- If that doesn’t work, you can:
- Click the empty box at the top to select all plugins. Select “Bulk Action” and choose Deactivate. Click Apply.
- Accessing your site via FTP (guide in the method below). Going to “root/wp-content/plugins/” and renaming the plugins folder to something like plugins-old.
How do I determine which plugin or theme is problematic?
Step 5 will ensure that all plugins are disabled. The consequences of this action will determine what to do next. If that:
1. Disabling plugins solved the AJAX 500 error concern
If the error is gone, you know a plugin is the culprit. Thus, enable them one by one until you see the WordPress Admin AJAX 500 error, and when that happens, deactivate it to fix the problem. For method 2, you have to revert the name change, then change individual plugin folders (example: plugin-name to plugin-name-old) until the error disappears. The one you renamed is the problem.
2. Deactivating plugins did not affect the AJAX 500 message
You concluded plugins are not the issue. Move on to check the theme by going to Appearance → Themes in the WordPress Admin section and deactivating the active one. Alternatively, go to “root/wp-content/themes/” and rename the folder for the active theme as we suggested above. If deactivating the active theme and going to the default one eradicates the message, then the theme was the problem. Consider removing recent changes to the functions.php file, or the child theme code. If that doesn’t produce results, seek alternatives, contact your hosting provider or hire a developer.
3. Fix WordPress Admin AJAX 500 error by examining .htaccess rules
Another frequent reason the AJAX 500 error appears in the WordPress Admin dashboard is a restrictive rule in the .htaccess file. That file controls the configuration of your server on a per-directory basis, and its permissions may forbid access to resources on your server, causing the message. Thus, do the following:
- Get to the root of your site via FTP.
- Find the .htaccess file. If it’s missing, it may be hidden, so look into ways to reveal it. In cPanel, that happens by going to Files → File Manager, then selecting Settings. Choose Document Root and then put a checkmark in front of Show hidden files before clicking Save.
- Rename the .htaccess file to .htaccess-old, then save changes. Alternatively, open it, copy the contents for safekeeping, and replace it with the default .htaccess file.
- If the error no longer shows, a setting inside the file is the cause. Start with the latest additions and slowly remove sets of settings one by one, returning them to the text after confirming they aren’t the issue.
4. Adjust your WordPress memory limit
We talked about the WordPress “Memory Exhausted” error, and how fixing it requires an increase in PHP memory limit. Well, the same thing applies here, as a low PHP limit can be a common culprit. Keep in mind that this can be a temporary fix, as something demands so much memory, and we suspect a plugin or a theme. It’s also common for the hosting provider to forbid users from going over a certain limit, say 32 MB or 64 MB.
Thus, if this worked, it’s best to reach out to Customer Support and have them analyze the source of the memory drain. If you’re a hands-on person, install a WordPress plugin that will inform you. Consider updating PHP or downloading a WordPress version update.
5. Check WP error logs to fix the WordPress Admin AJAX 500 error
If you still cannot pinpoint the problem, our last recommendation involves accessing WordPress error logs. These should let you know which file is causing the error, and can even specify the line in code and a problematic syntax. Though you may not need to, our guide on debugging in WordPress can help equally.