目前GegeHost的大部分主机的内存大小限制已经在我的争取之下,差不多都是64M以上的了,但仍然也有一两台主机还是32M。
无论您是否使用GegeHost,您可能会碰到类似以下问题:
”
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/marine/public_html/wp-includes/class-simplepie.php on line 4134
”
下面是我最喜欢的一个主机商提供给我的一个解决方案,分享给各位用户。
1. 在public_html 目录创建文件 php.ini , 里面添加分割线的内容如下:
—————————-
memory_limit = 64M
—————————-
其它的也是只要从 /home/hugegeor/public_html/复制 php.ini 文件即可
2. 添加下面分割线内容在 .htaccess 文件。
———————————————
suPHP_ConfigPath /home/username/public_html/
———————————————
提示: 用你所在的域名的用户名替换掉 username。
如果上面仍然解决不了你的问题,你可以采用下面的方法试试:
修改WordPress目录下面的wp-settings.php文件,将define(’WP_MEMORY_LIMIT’, ‘32M’);`中的32改成64