Enable Gzip Compress on Wordpress with WP-Cache 2.x启用gzip格式压缩的压缩与WordPress的可湿性粉剂缓存2.x中
WP-Cache is a page caching system plugin for可湿性粉剂缓存是页面缓存系统插件 Wordpress WordPress的 blog that cache Wordpress pages during the first load or after a page expired, and store each Wordpress page in a static HTML file which in turn used to serve future requests.博客,缓存WordPress的网页在第一负荷或之后到期的网页,并存储每个WordPress的网页在一个静态的HTML文件这反过来又用来提供未来的要求。 This process of web server serving the HTML pages directly from the file rather than building the page again by loading and compiling the whole PHP code, and retrieving the necessary data from the database where there is any page request significantly reduces the resource needed to run a responsive and fast website.这一进程的Web服务器服务的HTML网页直接从文件而不是网页建设,再次装载和编译整个PHP代码,并检索必要的数据从数据库中如果有任何网页的请求大大减少了资源的需要运行响应和快速的网站上。 Meanwhile, Gzip compression is an option provided by Wordpress that allows web server to serve the articles in compressed format if request by supported web browser, reducing bandwidth used and improving performance.与此同时, gzip格式压缩的压缩是一种选择提供了WordPress的,允许Web服务器提供服务的条款,如果压缩格式的请求支持的网络浏览器,减少带宽的使用和提高性能。
If you install WP-Cache version 2.0 or 2.1, you will be requested to turn off or disable Gzip compression in Options -> Reading tab.如果您安装可湿性粉剂缓存版本2.0或2.1 ,你将被要求关闭或禁用gzip格式压缩压缩选项-> “读标签。 Although WP-Cache2 is fast enough, however, you can still try to enable the Gzip compression to further speed up the web server, improve the overall performance of network and website, and save the network bandwidth, by using the following trick.虽然可湿性粉剂, Cache2是不够快,然而,你仍然可以尝试启用gzip格式压缩的压缩,以进一步加快网络服务器,全面提高网络和网站,并节省网络带宽,使用下面的伎俩。 The hack allows Gzip compression to be used with WP-Cache system, by making WP-Cache compress the page articles, instead of Wordpress.黑客可以gzip格式压缩的压缩,用于可湿性粉剂缓存系统,使可湿性粉剂缓存压缩的网页的文章,而不是WordPress的。
To turn on Gzip compression of web page while using WP-Cache 2, simply edit the wp-cache-phase1.php which is located in the WP-Cache plug-in folder inside the Plugins directory with text editor such as vi:要打开gzip格式压缩压缩网页,一边用可湿性粉剂缓存2 ,只需修改可湿性粉剂缓存phase1.php位于可湿性粉剂缓存插件文件夹内的插件目录文本编辑器,如六:
Add the following line:添加下面一行:
if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);如果( extension_loaded ( ' zlib ' ) ) ob_start ( ' ob_gzhandler ' ) ;
Before this line:在此之前行:
foreach ($meta-»headers as $header) { foreach ( $元»标题标题美元) (
Note that you still should not turn on or enable the Gzip compress article in Wordpress.请注意,您仍然不应该打开或启用gzip格式压缩的压缩在WordPress的文章。 If you do so, WP-Cache will not work.如果您这样做,可湿性粉剂缓存将无法工作。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明:这是一台机器翻译网页这是“原样”提供,无保修。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原文的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at共享和贡献或获得技术支持和帮助 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- Unzip or Decompress or Uncompress Gzip (.gz or .gzip) Files in Windows解压缩或解压缩或解压缩gzip格式压缩( 。 gz或。 gzip格式压缩)文件在Windows
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin)在运行WordPress的顶部快速的把物体和变数纳入XCache或eAccelerator高速缓冲存储器(插件)
- Download WordPress 2.3 Release Candidate 1 (RC1) with Tags Support下载WordPress的2.3候选发布版1 (一号)与标签支持
- Download Previous or Old Version of WordPress以前下载或旧版本的WordPress的
- WordPress WYSIWYG Visual Editor Not Working or Not Appearing WordPress的所见即所得的可视化编辑器不工作或不出庭
- WordPress 2.1.1 Critical Security Alert - Download Upgrade to 2.1.2 WordPress的2.1.1临界安全警报-下载升级到2 .1.2
- Hide or Disable Snap Preview Anywhere (SPA Site Preview) Bubble Pop Up隐藏或禁用提前预览任何地方(水疗中心网站预览)泡沫弹出
- Integrate WordPress including Comments with bbPress Forum using bbSync WordPress的整合,包括评论与bbPress论坛使用bbSync
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page如何改变频率或间隔WordPress的自动保存编辑后或网页
- Disable WordPress 2.3 Core and Plugins Update Check and Notification禁用WordPress的2.3核心和插件更新检查和通知

































September 20th, 2008 08:32二〇 〇八年9月20日8点32分
Thanks this code edit really increased my page load time由于此代码编辑确实增加了我的网页加载时间