wp-config.php一般都是配置数据库什么才用到的,其实wp-config.php也可以开启一些函数,当然,也可以对wordpress进行优化提速。
设置地址而不是服务器检查,这将减少服务器查询。
define('WP_HOME', 'http://ihuan.me'); define('WP_SITEURL', 'http://ihuan.me');
启用wordpress自带的缓存功能,并设置缓存时间,是非常必要的事情
define(‘WP_CACHE’, true); // enable the cache define(‘ENABLE_CACHE’, true); // enable the cache define(‘CACHE_EXPIRATION_TIME’, 3600); // in seconds
时间为秒3600秒 为一个小时,当然这种缓存肯定不能与静态缓存相比啦
Post-revision也许是最恼人的特性,不仅会导致臃肿的mysql数据库在几个月的时间里,它创造了大量的冗余的条目和占用了宝贵的数据库空间。
define('WP_POST_REVISIONS', false);
如果你使用的是虚拟主机,这个方法很不奏效。通常64M就绰绰有余了
define('WP_MEMORY_LIMIT', '64M'); define('WP_MEMORY_LIMIT', '96M'); define('WP_MEMORY_LIMIT', '128M');
文章翻译自geckoandfly 当然,也有自己的修改
Fantastic blog you have here but I was wondering if you knew of
2018年7月25日 06:14any forums that cover the same topics talked about in this article?
I’d really love to be a part of group where I can get advice from other knowledgeable individuals that share
the same interest. If you have any suggestions, please
let me know. Cheers!