I believe I was having a similar error. So I opened my .htaccess file on my server (not a local copy) and found the following:
ErrorDocument 403 /errordocs/error403.html
ErrorDocument 404 /errordocs/error404.html
ErrorDocument 500 /errordocs/error500.html# BEGIN WordPress
# END WordPress
And what appeared to be happening is that WordPress would add “# BEGIN WordPress # END WordPress” at the tail end of line 3 (which was my customized error doc paths).
So, I simply changed the file like so:
ErrorDocument 403 /errordocs/error403.html
ErrorDocument 404 /errordocs/error404.html
ErrorDocument 500 /errordocs/error500.html
# BEGIN WordPress
# END WordPress
..and I ran several tests and it appears to no longer give me the 500 error when I try to add or edit a “page” I created.
No… I’m unsure why this would fix it, but it has so far worked for me.