加速Wordpress的加载


当我们使用除了english的其他语言时,Wordpress转换到这种语言时通常会降低加载的速度!我看了一下其他使用了本地化方案的wordpress果然有这样的现象(就是使用了mo文件的wordpress,加载普遍在1-2sec.而没用mo文件的可以在1sec.内),下面的这个hack就可以解决这个问题了!!
我们到Here下载这个压缩包-php-gettext-1.0.3.tar.gz,解压缩后,用gettext.php和streams.php覆盖在wp-includes文件夹中的原文件即可!
另外,用$input = new CachedFileReader($mofile)代替wp-l10n.php(在 function load_textdomain 函数中)中的$input = new FileReader($mofile),也可以节省几毫秒的时间!
原文地址:
http://www.m-e-x.de/blog/index.php/archives/2005/03/01/wordpress-15-speedup/
As anyone who uses foreign language support in WordPress 1.5 may have noticed, switching to language to something other than english slows down WordPress. On my server, no request was finished in under 2 seconds.

So I had a look at the “gettext.php” and optimized it a little bit (pushes request time down to 0.1 secs again), and Danilo Segan (the author and maintainer of php-gettext) made a new release with these changes:

https://savannah.nongnu.org/projects/php-gettext/

1. Download the package
2. Replace gettext.php and streams.php (in wp-includes)

Additionally you can replace
$input = new FileReader($mofile)
in function load_textdomain (wp-l10n.php) with
$input = new CachedFileReader($mofile)
which also saves a few microseconds.

收藏到: 收藏到del.icio.us | 收藏到baidu搜藏 | 收藏到diglog | 收藏到饭否 | 收藏到Google | 收藏到新浪vivi | 收藏到mister wong | 收藏到挖客 | 收藏到qq书签

在comment中拥有你的“个性签名”

gravatar-globally recognized avatar(我就叫它“个性签名”)

你只要注册后就可以上传一个任意大小的图片(jpg、gif或png格式,会自动帮你调整到80×80),经过他们的审核后(审核时间大概要一天,分为四个级别,只要没有sex、暴力内容都可以评上g,表示可以在任何地方显示,其他级别显示就有一些限制),你在支持gravatar的站上留言都会显示出你的“个性签名”了!

注册你的个性头像-signup
Read the rest of this entry »

收藏到: 收藏到del.icio.us | 收藏到baidu搜藏 | 收藏到diglog | 收藏到饭否 | 收藏到Google | 收藏到新浪vivi | 收藏到mister wong | 收藏到挖客 | 收藏到qq书签

用手机发blog??

这位仁兄就有了这个想法,他也试着去实现了!!
WordPress是可以通过email来发blog的,他正是应用了这个方式来实现的,用sms发到邮箱,然后就能发到blog上了!!就是这么简单!!(不过,我用email发blog还没试验成功过,看什么时候再搞搞它!因为这样太方便啦!)
在这里查看全文:http://georgewalkley.com/index.php?p=39

收藏到: 收藏到del.icio.us | 收藏到baidu搜藏 | 收藏到diglog | 收藏到饭否 | 收藏到Google | 收藏到新浪vivi | 收藏到mister wong | 收藏到挖客 | 收藏到qq书签

Top 10 Posts/Views

自己成功装了第一个(以前安装过一些插件,但还没成功过0_o!!)wordpress plugin-Top 10 Posts/Views,其实,WordPress的Plugin是很容易安装的,只要把Pluin放到特定的目录下,在后台激活就搞定的了.但这个Plugin需要改模板,改模板还没什么,但他写的安装指南有点模糊,而且有一点bug,故也花了一点时间.安装过程如下: Read the rest of this entry »

收藏到: 收藏到del.icio.us | 收藏到baidu搜藏 | 收藏到diglog | 收藏到饭否 | 收藏到Google | 收藏到新浪vivi | 收藏到mister wong | 收藏到挖客 | 收藏到qq书签

WordPress正式升级到1.5版

是一个简洁的blog。支持插件,可以弄自己的模板。你也不用担心自己不会弄,因为已经有大把现成的插件和模板供你使用了!!

刚用这个网上工具制作了一个header的图片,还不错吧!!

收藏到: 收藏到del.icio.us | 收藏到baidu搜藏 | 收藏到diglog | 收藏到饭否 | 收藏到Google | 收藏到新浪vivi | 收藏到mister wong | 收藏到挖客 | 收藏到qq书签

Page 18 of 18« 第一页...«1415161718