Wordfence Plugin Error 403 Forbidden Ajax

Suppose you are trying to run WP Staging (or any other WordPress plugin), and it immediately stops before the cloning process can be started. In that case, it might be worth checking if you have the Wordfence security plugin installed on your website.

If Wordfence is blocking Ajax requests, you will get an error like the one below when you open the browser console with F12 Or Press Ctrl + Shift + I:

wordfence error 403 ajax

It gets worst. Blocking of the file admin-ajax.php can even happen on sites where Wordfence is disabled as long as it is activated on the main website. The reason is Wordfence scans through all files in an iterating way, no matter if those belong to the site where Wordfence is installed or not.

If there is one instance of Wordfence running in the parent WordPress installation, it affects all the WordPress sites that are located below that particular website, e.g.

  • ​Domain1: /home/sites/public_html/
  • Domain2: /home/sites/public_html/domain1
  • Domain3: /home/sites/public_html/domain2

To prevent the issue, Wordfence must be adequately configured in the parent WordPress and reconfigured in the child WordPress installations.

​Long story short, setting the Wordfence firewall option to learning mode on the parent site will resolve the Ajax error for all of your other websites:

wordfence web application learning mode to fix the error 403 ajax - solution

In the sample above, the Wordfence plugin, which is installed in the parent WordPress located in ​ home/sites/public_html/ must have the training mode activated.

This will fix the 403 forbidden error on all other WordPress that are inside this folder, as well.

Updated on June 15, 2023