Wordpress LScache Plugin: Cache REST API Returns 500
Last Updated on: Wed, 15 Apr 2026 00:00:02 When fetching data from the REST API of an Open LiteSpeed + WP one-click droplet on digital ocean, I receive back a valid response from the server, but it has a 500 Internal Server error status code. Regular pages (non-Rest API) pages are behaving as expected and go from miss to hit. REST API pages, while Cache REST API is turned on, always 500. Here is log snippet from a time this happened. 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] ??GET HTTP/1.1 (HTTPS) /wp-json/wp/v2/posts 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] Query String: 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] User Agent: Mozilla/5.0 (X11 Linux x86_64 rv:75.0) Gecko/20100101 Firefox/75.0 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] Accept: text/html,application/xhtml+xml,application/xml q=0.9,image/webp, / q=0.8 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] Accept Encoding: gzip, deflate, br 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] Cookie _lscache_vary: admin_bar:1 logged-in:1 role:99 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] X-LSCACHE: true 05/05/20 06:43:33.899 [47.28.78.170:46678 1 QVa] LSCACHE_VARY_COOKIE: wp-postpass_0e6245e7b40fe69e590480a2976a124f 05/05/20 06:43:33.900 [47.28.78.170:46678 1 QVa] [Ctrl] X Cache_control -> stale 05/05/20 06:43:33.901 [47.28.78.170:46678 1 QVa] [Ctrl] X Cache_control -> private ( logged in user ) 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [Router] get_uid: 1 => LiteSpeed Debug2::debug()@354 => LiteSpeed Router::get_uid()@232 => LiteSpeed Router::get_role()@251 => LiteSpeed Conf->in_optm_exc_roles()@643 => LiteSpeed LSC->after_user_init()@192 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [Router] get_role: administrator 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [Media] init 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [Placeholder] init 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [CDN] init 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] Task init 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [Router] LSCWP_CTRL bypassed empty 05/05/20 06:43:33.904 [47.28.78.170:46678 1 QVa] [GUI] init 05/05/20 06:43:33.905 [47.28.78.170:46678 1 QVa] [Ctrl] X Cache_control init on 05/05/20 06:43:33.905 [47.28.78.170:46678 1 QVa] [Vary] Rest API init disabled vary change 05/05/20 06:43:33.907 [47.28.78.170:46678 1 QVa] [REST] Internal REST ON [filter] rest_request_before_callbacks 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [REST] Internal REST OFF [filter] rest_request_after_callbacks 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Core] CHK html bypass: miss footer const 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Vary] role in vary_group [group] 99 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Vary] show_admin_bar_front: true 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Vary] admin bar : true 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Vary] no custimzed vary 05/05/20 06:43:33.912 [47.28.78.170:46678 1 QVa] [Core] Silence Comment due to REST/AJAX 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] X-LiteSpeed-Cache-Control: private,max-age=1800 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] X-LiteSpeed-Tag: fc6_tag_priv,public:fc6_HTTP.200,public:fc6_default,public:fc6_URL.098f7bd299dfabbad722a5b88f686a9d,public:fc6_REST,public:fc6_ 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] [Core] CHK html bypass: miss footer const 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] [Media] bypass: Not frontend HTML type 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] GUI bypassed by no counter 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] [Optm] bypass: Not frontend HTML type 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] CDN bypass 05/05/20 06:43:33.913 [47.28.78.170:46678 1 QVa] End response Hi, If you dont cache it , does that REST respond 200 ? Best regards, That is correct. If I turn off the Cache REST API option, it returns 200. Here is an example response hitting the same endpoint with the option OFF and a 200 response. 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] ------GET HTTP/1.1 (HTTPS) /wp-json/wp/v2/posts 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] Query String: _fields=id,date,slug,title,featured_media 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] HTTP_REFERER: http://localhost:3000/ 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] User Agent: Mozilla/5.0 (X11 Linux x86_64 rv:75.0) Gecko/20100101 Firefox/75.0 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] Accept: application/json 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] Accept Encoding: gzip, deflate, br 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] X-LSCACHE: true 05/06/20 05:04:39.515 [47.28.78.170:39832 1 yFX] LSCACHE_VARY_COOKIE: wp-postpass_0e6245e7b40fe69e590480a2976a124f 05/06/20 05:04:39.516 [47.28.78.170:39832 1 yFX] [Ctrl] X Cache_control -> stale 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] [Router] get_uid: 0 => LiteSpeed Debug2::debug()@354 => LiteSpeed Router::get_uid()@232 => LiteSpeed Router::get_role()@251 => LiteSpeed Conf->in_optm_exc_roles()@643 => LiteSpeed LSC->after_user_init()@192 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] [Router] get_role: 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] [Media] init 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] [Placeholder] init 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] [CDN] init 05/06/20 05:04:39.519 [47.28.78.170:39832 1 yFX] Task init 05/06/20 05:04:39.520 [47.28.78.170:39832 1 yFX] [Router] LSCWP_CTRL bypassed empty 05/06/20 05:04:39.520 [47.28.78.170:39832 1 yFX] [GUI] init 05/06/20 05:04:39.520 [47.28.78.170:39832 1 yFX] [Vary] Rest API init disabled vary change 05/06/20 05:04:39.522 [47.28.78.170:39832 1 yFX] [REST] Internal REST ON [filter] rest_request_before_callbacks 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [REST] Internal REST OFF [filter] rest_request_after_callbacks 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Core] CHK html bypass: miss footer const 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Ctrl] not cacheable before ctrl finalize 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Router] get_role: 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Vary] role id: failed, guest 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Router] get_role: 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Router] get_role: 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Vary] no custimzed vary 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Core] Silence Comment due to REST/AJAX 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] X-LiteSpeed-Cache-Control: no-cache 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Core] CHK html bypass: miss footer const 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Media] bypass: Not frontend HTML type 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] GUI bypassed by no counter 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] [Optm] bypass: Not frontend HTML type 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] CDN bypass 05/06/20 05:04:39.525 [47.28.78.170:39832 1 yFX] End response Expand Hi, I am unable to reproduce this issue. Do you see anything in PHP log and server log when that 500 happens ? Do you have any plugin that interacts with REST ? Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference