This likely isn't exactly an issue caused by WordPress, but due to server configurations and/or settings. 500 errors are pretty generic and can have a variety of origins, so it is hard to give the one directive that will solve it. By the way, the returning of JSON and HTML seems to be common when this happens, not sure where and it gets mixed up, might be here . I'm fairly certain this happens due to some memory issue.
Although it likely has to do with the memory, I can't know for sure, because there isn't enough information available to be 100% certain. So here is a little, not necessarily comprehensive, check list for you to process:
- memory limit - your PHP memory might be just on the verge of being not enough, increase it; put
define( 'WP_MEMORY_LIMIT', '128MB' );
into wp-config.php
- .htaccess - corruption/issue; check it; possibly back it up and regenerate it
- PHP5 - some hosts had problems with that, although I haven't seen it some time; try putting
AddType x-mapp-php5 .php
into your .htaccess
- file permissions - make sure they are correct, if you are unsure, then re-set them up with the correct ones; codex article: changing file permissions
- folder permissions --
- WP - check an if needed correct them; codex article: changing file permissions
- server - sometimes there are e.g. problems with the permissions of the temporary upload folder
- re-uploading WP core files - although that shouldn't be necessary if the last two steps are done correctly, but sometimes there are other corruptions, so it might be an additional step to take
- apache setup - make sure your apache is set up correctly on your server, so to your needs and actual requirements; e.g. one common culprit seems to be
mod_security
- check WP custom code - so what you wrote or been installing via plug-ins; you know the routine, test by deactivating and/or switching to default theme and so on
All the list items are pretty much well known and documented, so you will, if needed, find more information out there.
Last but not least, much success!