Elementor 500 Server Error
问题:用Elementor编辑一个比较复杂的文章,更新时报500 Server Error。
解决:根据这篇文章的介绍,Elementor 500 Server Error一般是由于服务器内存分配不足造成的,建议检查PHP的错误日志。这篇文章介绍了如何配置WordPress以产生PHP的错误日志。不过我这里不用,因为使用的宝塔面板可以轻松查看。在文件选项中,进入“/www/wwwlogs”路径,就可以看到以“.error.log”结尾的日志文件,打开一看就明确了错误。
20**/**/** 09:45:28 [error] 2200232#0: *62871 FastCGI sent in stderr: “PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /www/wwwroot/****.net/wp-content/plugins/elementor/includes/managers/controls.php on line 818” while reading response header from upstream, client: **.***.***.**, server: wangc.net, request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi-56.sock:”, host: “****.net”, referrer: “http://****.net/wp-admin/post.php?post=1596&action=elementor”
我这里也不用直接改PHP的配置文件,可以通过宝塔面板来解决。到软件商店——PHP————设置——配置修改中,找到memory_limit,将其由128M改高(我改成了256M)即可。