How to fix POST /wp-admin/admin-ajax.php 403 (Forbidden) error


I was working on a WP website and at some point I have noticed a weird error in console.

This error was not there a few days ago and suddenly it appeared.

When I was trying to submit a form, the submit button was not working.

Something prevented the form to be submitted.

When I checked the console, I have found this error: POST /wp-admin/admin-ajax.php 403 (Forbidden).

admin ajax php error 403 forbidden

About the 403 Forbidden Error

Since this error did not happen a few days ago, I started to check more.

As you can see in the above image, it is related to Cloudflare.

I have found out that, in the meantime, the customer activated Cloudflare cache on the website.

That appeared to be the cause.

Fix POST /wp-admin/admin-ajax.php 403 (Forbidden) error

The first step to fix this error was to disable Cloudflare cache.

After it was disabled, the problem was not solved. It was no way to submit the form. The Submit button had no reaction.

I have checked the WP cache plugins on the website.

There were no cache plugins like Autoptimize, WP Super Cache or others.

From what I have read, this admin-ajax.php 403 (Forbidden) error can happen because of cache plugins.

Some people explained that after they decreased cache timeout the problem was solved.

Since there ws no cache plugin, after checking more, I have found that there was LiteSpeed installed on server and that was causing the issue.

The problems persisted and the hosting company said that all is working fine, but it was not.

The server was changed, another web hosting company was chosen and the problem was solved.

You do not need to change the web host if you are facing this issue.

From what I have seen, this issue it is caused mostly by a cache solution used on your website. Once you find the right setting for it, the problem is solved.


Hopefully my solution for this 403 error will save you a lot of time and headache. Or at least I hope it will give you an idea about the cause of this problem. Please let me know if this is helpful for you and contact me if you need more info.

Comments closed

Please contact me, if you have any questions or suggestions.