Cyber Monday Bonus:
50% OFF on all new
Domain registrations
Grab One

Troubleshooting REST API Errors in WordPress

Having to work on your website and constantly update it is a handful, especially when that is combined with unexpected errors. We will review one of the more rare ones in this article where we aim to go through the possible causes and fixes that can apply to your WordPress website.

How does “REST API Error” occur and what does it mean?

To start off, we need to understand what REST API is and it stands for Representational State Transfer Application Programming Interface. Very hard to deconstruct such terminology but in simple words, this allows you and various developers around the world the key to program and customize every WordPress installation. Every action that is made on your website such as installing a plugin or configuring a theme is part of it. 

Like any other platform, WordPress has its pros and cons and sometimes the REST API does not work correctly and that will hinder the work on your website.

Possible common denominators for REST API Errors

We will go through the more popular issues that can cause these errors and later on tackle them with fixes and alternative solutions.

  • Incorrect Permalink Structure

This error is commonly known and can happen if you have custom pages that are created on your WordPress site and later on migrated somewhere else. For example, when you move to a different hosting provider, you go with your website files and database. If the alternative provider has a different server setup and configuration, when migrated, the structure can be changed and your website will throw errors such as 404 Page Not Found or REST API ones.

  • Conflicting Plugins/Themes configuration on your website

Another common issue is a conflict between two or more plugins installed on your website. Same goes for different themes and page builders that may bump heads with each other.

  • Current WordPress and Plugins Versions

If you are using an outdated WordPress version on your website or plugins that haven’t been touched in a long time, then that would also cause multiple security issues since it leaves an opportunity for potential hacking attacks through backdoor code or REST API errors.

  • RAM or PHP Memory Limit on your website

All servers have resource limitations, depending on their setup and type of hosting provider. If your allocated memory limit is low or constantly reaches a threshold, then that would lead mainly to 503 Errors or REST API Errors.

It is important to note that REST API Errors are not displayed directly as such on your screen, like for example Error 500. The reason for that is because as discussed at the start of the article, the integrated developer interface is not part of the server side. The server is a separate entity and the type of Error codes such as 500, 404, 503 are directly connected to it. So in this sense, it is possible that these issues hide behind other codes or errors.

How to fix REST API Errors and go through all the possible issues

Starting in order, the first and most common issue is connected to the permalink structure of your website. To put it in simple terms, permalink structure stands for your website internal links map. Think of it as a map where everything is organized, same goes for your WordPress installation, where every page you make goes somewhere specifically, even if you do not categorize it. When that structure is incorrect or broken, it leads to potential issues such as the one we are discussing.

To fix it, you would need to first login your WordPress Dashboard. Afterwards, you would need to navigate to Settings (1) and choose Permalinks section (2):

fix rest api errors

Once you are in, you can see the structure that is set by default from WordPress. If you have just made changes and encountered an issue with missing pages and 404 errors, then you would need to revert them back to what they were. 

Sticking to the topic at hand, if you haven’t made any actual changes in this section, then you would simply need to Save them again. That will basically reset the Permalink Structure of your site and fix any possible REST API issues. You will simply need to scroll down the page and select Save option:

rest api issues

The next issue would be possible conflicting plugins or themes that might be causing an issue. Sometimes these conflicts don’t directly affect your website with a server error or downtime, rather stop functionalities such as uploading images, editing through page builders and more.

The fix unfortunately is a bit annoying but is connected to trial and error. You would need to deactivate all of your plugins and see if that fixes the issue. If that is the case, then you would need to activate them one by one to determine which would be the culprit. You can do that from your WordPress Dashboard by navigating to the Plugins section:

plugins

Once that is done, you need to click on the Select Box (1) to mark all of the existing plugins you have on your website, use the DropDown Menu to select bulk action Deactivate (2) and confirm it through the button Apply (3):

plugins

That’s it! Now you need to test out what went wrong and activate them one by one manually in order to determine which one is causing the issue.

When all the hard work is done and you know which plugin is conflicting with your current setup, you can try to re-install it or if you do not plan to use it, delete it. To re-activate all of your plugins from scratch, you can do the same action as before, however, choose bulk action Activate in order to reverse everything:

activate plugins

Next step would be to check common issues with old versions of both WordPress and currently installed and active plugins/themes. To do that, you would need to login your WordPress Dashboard and navigate to section Updates:

updates

As you can see from the screenshot, there is a highlighted number next to the section. That indicates that there are three things that have newer versions and can be updated. It is highly recommended to regularly check this section and make sure everything on your website is up to date to avoid these issues and keep your security in check.

The last issue is connected to not having enough memory for the website. This one is tricky since it will require some assistance from support. Once you experience an issue where certain actions in the back end slow down drastically or just do not work and you get a constant loop, then most likely the allocated memory has reached its limit.

It is important to note that there is a difference between WordPress Memory Limit and Server Memory Limit. The first one is connected to the WordPress installation itself by enabling different limits for tasks in the back end, however, the second one is connected to the server that allocates the resources to your website. It is fixed and can not be changed, unless you upgrade your plan.

There are two ways to go from here. The first step is to determine if the memory is the culprit to be completely sure. Here at WPX, you can contact our Support 24/7 and they will help you out with that. Afterwards you will get escalated to a dedicated Security and Optimization Team which will determine what is causing it exactly and how to fix it. Depending on the solutions, it could be solved easily or an upgrade would be required for you to go on a higher plan with more RAM, since the website has outgrown the current one.


That pretty much sums it up! REST API Errors are more generic and can mean a lot of things, they are not specific with a code or coming from the server side where you can easily determine them through the error logs. The important thing here is to go through the entire list that we mentioned and apply all possible fixes. If you still feel that something is up, do not hesitate to contact our WPX Support for further technical assistance.

Share Your Love
Svetlozar Todorov
Svetlozar Todorov

Svetlozar Todorov is a Team Lead in the Support Team at WPX. Having over 7 years of experience with handling various clients issues, fixing and offering solutions has helped him gain a lot of knowledge. Managing different support teams and sharing expertise is essential in order to develop and maintain a high level of customer satisfaction.

Articles: 15