目前有些主机的内存大小限制是32M,在使用WordPress时可能会不够用,您可能会碰到类似以下问题:
”
Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home2/marine/public_html/wp-includes/kses.php(1030) : runtime-created function on line 1
”
”
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home2/free919/public_html/wp-includes/class-simplepie.php on line 4134
”
下面给出一个解决方案,分享给各位用户。
1. 下载这个php.ini.zip(见附件)的文件,然后在cpanel的“文件管理器”把这个文件上传到public_html目录,接着选中php.ini.zip文件,点右上角的“解压缩”。
我们可以看到在public_html有了一个php.ini的文件了。
2. 修改public_html目录下的.htaccess文件,添加下面分割线内容在 .htaccess 文件。
suPHP_ConfigPath /home/username/public_html/
提示: 用你所在的主机cpanel的用户名替换掉 username,home这个有些主机默认是home2的你可能也要改。
注意:本站长在调试完成后发现后台管理员不能登录,重装了WP后问题解决,所以,在使用本方法前请做好备份。
下载地址:php.ini.zip
- 本文固定链接: https://freekk.cn/2848.html
- 转载请注明: 漱石 于 最后的面包 发表