How to deal with WordPress errors

Hey Makers :waving_hand:

Running into Wordpress errors and don’t know how to resolve them? Here’s a guide with the most common errors and how to fix them! :hammer:


:loudspeaker: First of all, make sure your credentials are correct, especially the URL. It should contain wp-json at the end: https://my-wordpress-site.com/wp-json/


Status 403

Generally, the 403 error appears when there’s an issue with the server’s firewall, as the server understands the request but can’t fulfill the request because of client-side issues.
This issue typically happens when CloudFlare blocks the request or sends a captcha which Make cannot complete, resulting in the 403 error.

Solutions

:white_check_mark: Disable the (Super) Bot Fight Mode enabled in your CloudFlare settings.
:white_check_mark: Whitelist Make IP addresses


Body is not a valid JSON. Unexpected token in JSON at position 0

Also: Function 'fixBOM’finished with error! Unexpected token ‘<’, “<!doctype”… is not valid JSON

This error usually occurs when there is a plugin conflict with Make plugins.

Solutions

:white_check_mark: Disable the plugins one by one and test creating the connection
:white_check_mark: Double-check the credentials, especially the URL. It should end in /wp-json/
:white_check_mark: Ensure that Pretty Permalinks are being used
:white_check_mark: Ensure that Make IP addresses are whitelisted in:

  • WP settings
  • Security plugins’ settings
  • CloudFlare or other proxy settings - (Super) Bot Fight Mode, WAF (Web Access Firewall), Region blocking, etc.

:white_check_mark: Disable ALL other plugins or investigate individual enabled plugins to see if any of them restrict the access or modify the behavior of the WordPress API in any way (additions, changes, blocks)


Status code: 401

This is a plugin conflict issue, and the error means something is interfering with the processing of the WordPress REST API. One of the plugins causing this issue is the Advanced Acess Manager, which has wide-reaching effects on your privileges and REST API access.

Solution

:white_check_mark: Disable the plugins and enable them one by one. This may lead to the root cause.


ETIMEDOUT: Service is temporarily unavailable

The request is blocked at the web application firewall stage and does not reach Make. ETIMEDOUT indicates an issue before WordPress, meaning the request is being made from Make.
The host needs to investigate this situation, as the request is likely to be blocked at WAF.

Solution

:white_check_mark: Disable proxy services like CloudFlare


Status code: 404

The most common reason for this error is your WordPress permalink settings.

Solution

:white_check_mark: Use the Postname option for your permalink setup. If you have set the permalink to Plain or Custom and have nothing filled out in the Custom box, your links may result in a 404 error.


404 (error code: rest_no_route)

This issue occurs when an incorrect connection setup causes the API endpoint to be missing from the WordPress installation.

Solution

:white_check_mark: Look into the Dev Console at the logs. For example, here, you can notice the wp/v2 twice, which in this case is due to an incorrect connection setup.


Function ‘fixBOM’ finished with error! Unexpected token ‘<’, '<!DOCTYPE '… is not valid JSON

The problem originates from the WordPress platform. Although the error message lacks specificity (we are in the process of improving the message), the underlying issue is that an invalid connection to WordPress results in HTML code being returned instead of the JSON response, and it likely happens due to security plugins.

This error typically occurs when the WordPress REST API returns an HTML response instead of JSON.

Solution

:white_check_mark: Switch from the Astra theme to a different one and test the connection again.
:white_check_mark: Ensure your server or security plugins aren’t blocking Make’s requests. Whitelist Make’s IP addresses (belongs to your Make account zone) and check .htaccess rules to allow access to the /wp-json/ endpoint.

For more details, refer to this community thread

:white_check_mark: Temporarily deactivate security and caching plugins that might interfere with the REST API.
:white_check_mark: Ensure you’re using Pretty Permalinks for your WordPress site.


Helpful Resources
:make: WordPress guide in our Help Center

5 Likes