admin管理员组文章数量:1391928
I'm having a really frustrating issue whereby I can't seem to upload any images to Wordpress in a post content or via the browser uploader, multi-file uploader.
When uploading a single image directly into Gutenberg I get the loading animation for ages and then a "The response is not a valid JSON response" error. The AJAX response is an error 500. The same thing happens when trying to upload images via the browser uploader in the Wordpress media tab.
The server logs are as follows at the time of the 500 response:
2020-02-12 12:42:27.626436 [INFO] [-Q:CB9E669F502E857E-215#wordpress] [REWRITE] detect external loop redirection with target URL: .php, skip.
2020-02-12 12:42:38.421757 [INFO] [-Q:CB9E669F502E857E-163#wordpress:lsapi] Connection idle time too long: 301 while in state: 6 watching for event: 8452, close!
2020-02-12 12:42:38.422072 [INFO] [-Q:CB9E669F502E857E-163] Content len: 288523, Request line:
POST /wp-json/wp/v2/media?_locale=user HTTP/1.1
2020-02-12 12:42:38.422211 [INFO] [-Q:CB9E669F502E857E-163] Redirect: #1, URL: /index.php
This problem seems to have cropped up very recently as I have previously uploaded images without any issues whatsoever. My Wordpress installation is using a custom theme and several plugins but reverting to a default theme and disabling all plugins doesn't seem to resolve the issue. I have also tried reverting my Wordpress installation itself to an earlier version which again, has no effect in solving the issue.
This is leading me to believe the problem must lie with the server however I'm not particularly sure what the issue could be there either.
The server is a Digital Ocean OpenLiteSpeed WordPress "pre-set" () running on a 2GB droplet.
I'm having a really frustrating issue whereby I can't seem to upload any images to Wordpress in a post content or via the browser uploader, multi-file uploader.
When uploading a single image directly into Gutenberg I get the loading animation for ages and then a "The response is not a valid JSON response" error. The AJAX response is an error 500. The same thing happens when trying to upload images via the browser uploader in the Wordpress media tab.
The server logs are as follows at the time of the 500 response:
2020-02-12 12:42:27.626436 [INFO] [-Q:CB9E669F502E857E-215#wordpress] [REWRITE] detect external loop redirection with target URL: https://domain/wp-admin/admin-ajax.php, skip.
2020-02-12 12:42:38.421757 [INFO] [-Q:CB9E669F502E857E-163#wordpress:lsapi] Connection idle time too long: 301 while in state: 6 watching for event: 8452, close!
2020-02-12 12:42:38.422072 [INFO] [-Q:CB9E669F502E857E-163] Content len: 288523, Request line:
POST /wp-json/wp/v2/media?_locale=user HTTP/1.1
2020-02-12 12:42:38.422211 [INFO] [-Q:CB9E669F502E857E-163] Redirect: #1, URL: /index.php
This problem seems to have cropped up very recently as I have previously uploaded images without any issues whatsoever. My Wordpress installation is using a custom theme and several plugins but reverting to a default theme and disabling all plugins doesn't seem to resolve the issue. I have also tried reverting my Wordpress installation itself to an earlier version which again, has no effect in solving the issue.
This is leading me to believe the problem must lie with the server however I'm not particularly sure what the issue could be there either.
The server is a Digital Ocean OpenLiteSpeed WordPress "pre-set" (https://marketplace.digitalocean/apps/openlitespeed-wordpress) running on a 2GB droplet.
Share Improve this question edited Feb 19, 2020 at 13:58 al.tron asked Feb 11, 2020 at 13:36 al.tronal.tron 1396 bronze badges 2- If you use https, it could happen because of mixed content. – Roman Commented Feb 11, 2020 at 18:41
- Thanks for the response, I'm not sure how it would be to do with mixed content though, everything will be https. – al.tron Commented Feb 12, 2020 at 11:59
1 Answer
Reset to default 0It looks like I've managed to solve this issue myself.
The issue seems to have been with the .htaccess file, I reset the .htaccess file to default and then deactivated and re-activated all the Plugins. Since doing that everything seems to be working fine once again.
I'm not sure specifically what bit of code was actually causing the issue however.
本文标签: Can39t upload Images to WordpressError 500 Response
版权声明:本文标题:Can't upload Images to Wordpress - Error 500 Response 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744734252a2622228.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论