Fix 403 Error by Whitelisting in WordFence

If you're editing in WordPress, working with widgets, and get an error while saving, you're running into WordFence's firewall. It's meant to protect your WordPress site from outside attacks, but sometimes can get a bit over aggressive and block you as well! It has a learning mode that will allow more things in the first week after you set up, but if you don't add widgets in that time it will block the action because it doesn't recognize it.

If you're using Elementor, the error will look something like this. Similar errors may happen with other builders and the fix is the same.

To fix this, go to WordFence in your WordPress admin and whitelist the save request so it can include widgets.

Method 1 - whitelist admin-ajax.php

  1. Go to Wordfence > All Options
  2. Go down to the Whitelisted URLs section
  3. Enter /wp-admin/admin-ajax.php in the URL box
  4. Select Param Type: POST Body for the dropdown
  5. Enter actions for the Param Name
  6. Click the Add button
  7. Click Save Changes in the top right corner

Method 2 - whitelist by recent traffic

If the first method didn't work or there is a different request involved, you can find the traffic that happens at the time you receive the 403 and whitelist that.

  1. Go to WordFence
  2. Click on Tools inside the WordFence menu
  3. Click on Live Traffic. This view shows recent traffic to your site.
  4. Filter the traffic to "Blocked By Firewall".
  5. Click on the request you just made to save the page in your page builder -- it'll usually be the most recent request and from your general area
  6. Double check that it was actually you making the request
  7. Whitelist the request

That's it! Now you can go back to the page builder and add your widgets.