• Resolved dobstotev

    (@dobstotev)


    Hello,

    3 days ago, for some reason, my WordPress REST API started giving Error 500. I caught this via Tools > Site Health because I noticed that plug-ins like Google Sitekit started showing an error in my dashboard so I started investigating the issue.

    The REST API encountered an unexpected result
    
    The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.
    
    When testing the REST API, an unexpected result was returned:
    
    REST API Endpoint: https://MYSYTE.com/wp-json/wp/v2/types/post?context=edit
    REST API Response: (500) Internal Server Error

    Now after investigation I found that when I disable Yoast plugin the issue gets resolved and I don’t get that error anymore.

    I troubleshoot the site with only Yoast plugin active and the error is there, which made my conclusion that Yoast is causing the issue.

    I saw in another thread that it could be that Yoast is overloading the memory_limit of my site hence the API error and I checked – my website’s memory limit in the php.ini file is 128M and I am working with my host to increase that 1GB to see if it will solve the issue.

    Other than that I am not sure why this issue started suddenly happening as it was working fine for so many years + none of my other sites on the same host are having that issue and they are running Yoast.

    On another note before that Issue started happening my website did crash and had to restore the files and database from a back-up from the previous day and this is when I caught the API error. But again I’ve done this many times, never had issues.

    If you have any insights on what to check/try to solve the issue would be great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @dobstotev,

    Thanks for using the Yoast SEO plugin. Can you confirm if you have the REST API endpoint turned ON/OFF in WordPress > Yoast SEO > Settings > General > Site Features > APIs? Does having it ON/OFF make a difference?

    Thread Starter dobstotev

    (@dobstotev)

    Hello, I tried that – didn’t make a difference.

    Resolution Update:

    Now my host has increased the memory_limit of the PHP v7.4 of my site from 128M to 1GB and the REST API is no longer erroring.

    In the end that was the issue – Yoast needed more memory to operate I guess.

    Plugin Support Maybellyne

    (@maybellyne)

    Thanks for sharing the resolution, will keep this in mind for other users

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Yoast suddenly affected my site’s API – REST API Error 500’ is closed to new replies.