Title: REST API returns 500 error code
Last modified: January 3, 2019

---

# REST API returns 500 error code

 *  Resolved [jtuinstra](https://wordpress.org/support/users/jtuinstra/)
 * (@jtuinstra)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/rest-api-returns-500-error-code/)
 * We have updated to WordPress 5.0.2 and as many we can no longer publish nor update
   pages and posts. The classic editor works with us, but we realize that REST API
   is the way forward, so we would it to get working.
    With the Health Check plugin
   the following error is given after “REST API availability”: The REST API call
   gave the following unexpected result: (500)
 * When searching for a solution to this the WordPress documents are deafening silent
   about any problems with this regard. Recreating the permalinks did not solve 
   the issue. We’ve created a clean .htaccess file, did not solve the issue.
 * We are kind of at a loss right now. I don’t know where to look for suggestions
   or solutions. If anyone can help.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [7 years, 5 months ago](https://wordpress.org/support/topic/rest-api-returns-500-error-code/#post-11048140)
 * 500 error is a server error.
 * Look in the server error logs and find the actual error message.
 *  Thread Starter [jtuinstra](https://wordpress.org/support/users/jtuinstra/)
 * (@jtuinstra)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/rest-api-returns-500-error-code/#post-11048988)
 * I have found out what the problem was. There was an error in my .htaccess file.
   I didn’t replace one of the /my-subdir/ with actually my subdir name.
    So this
   500 error had to do with redirecting that didn’t go well. I only discovered this
   when we saw another error repeating in our error logs:
 * Request exceeded the limit of 10 internal redirects due to probable configuration
   error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘
   LogLevel debug’ to get a backtrace.
 * Because of the error in the .htaccess file the request limit was continually 
   reached. After googling for this error and how to solve it I realized our mistake(
   which had been there for many months, without a problem, the website functioned
   just fine).
 *  [laihlau](https://wordpress.org/support/users/laihlau/)
 * (@laihlau)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/rest-api-returns-500-error-code/#post-11661811)
 * Hi There,
 * I want to use WordPress REST API to post a jpeg/gif file to our GMEDIA library.
   When we try to do a post with media, we received this error:
    { “code”: “rest_upload_sideload_error”,“
   message”: “Sorry, this file type is not permitted for security reasons.”, “data”:{“
   status”: 500 }
 * We changed our htaccess and added the following:
    RewriteEngine on RewriteCond%{
   HTTP:Authorization} ^(.*) RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
 * **
    Any suggestion, please?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘REST API returns 500 error code’ is closed to new replies.

## Tags

 * [error 500](https://wordpress.org/support/topic-tag/error-500/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [laihlau](https://wordpress.org/support/users/laihlau/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/rest-api-returns-500-error-code/#post-11661811)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
