广杰博客

  • 首页
  • IT资讯
  • IT运维
  1. 首页
  2. IT运维
  3. 正文

解决wordpress出现out of memory问题

03/29/2013 1383点热度 0人点赞 0条评论

wordpress最近wordpress博客出现out of memory,很明显是内存不足溢出造成。但是vps的内存是2G,应该是没有问题的,后来通过google搜索看到很多网友碰到类似的情况,并且尝试了一种解决方法:

在wp-includes/defaule-constants.php的wp_initial_constants方法中

function wp_initial_constants( ) {
global $blog_id;

// set memory limits
if ( !defined('WP_MEMORY_LIMIT') ) {
if( is_multisite() ) {
define('WP_MEMORY_LIMIT', '64M');
} else {
define('WP_MEMORY_LIMIT', '32M');
}
}

if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
}
......

从上面可以看到wordpress限制了最小内存32M 最大的内存256M,于是把 define('WP_MEMORY_LIMIT', '32M');中32M更改为了128M,更改大些看看效果!最近几天是没有出现之前的报错了。

标签: out of memory wordpree内存溢出 wordpress out of memory
最后更新:03/29/2013

guangjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论
最新 热点 随机
最新 热点 随机
Red Hat Enterprise Linux 9 发布,大量组件升级 windows10 家庭版添加hyper-v虚拟机组件 Red Hat Enterprise Linux 8.5 GA 发布 Rocky Linux 8.4 GA正式版发布下载 Rocky Linux 8.3 首个候选版本发布 CentOS 8.3 (2011) ISO镜像下载发布 CentOS Linux 落幕 CentOS Stream 上位 CentOS Linux 7.9 (2009) iso镜像下载 Windows 10 2020年10月更新ISO下载 ubuntu ssh通过密钥登陆服务器
Red Hat Enterprise Linux 9 发布,大量组件升级windows10 家庭版添加hyper-v虚拟机组件
Win10创意者更新正式版官方升级 flv网页播放器代码 roogoo清除 如何卸载和安装Wscript.Shell,FSO和stream对象 Oracle Linux 7.1 发布 nginx+php配置 微软ANI漏洞补丁的补丁(新) 查看mssql版本号命令 centos5.5y内核升级(2.6.18-194.e15-->2.6.36) CentOS 5.9 发布和下载地址
标签聚合
Hyper-V Windows Server 2012 nginx linux php_curl springboot redhat Windows Server 2012下载
友情链接
  • linux运维
  • 郑州SEO

COPYRIGHT © 2021 gjie.cn. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备07002435号-8