Jun 29 2007

wp-cache install

Posted by neio

by Neio.Zhou

(for bloggers)

Today, I had some problems in instaling wp-cache plugin for WrodPress. Now I succeeded.

Share my experiment:

When I install wp-cache plugin for WordPress, I always found it that although it’s activated, I couldn’t config in Options.

That’s because My website is run in Windows system. and the command:

ln -s wp-content/plugins/wp-cache/wp-cache-phase1.php wp-content/advanced-cache.php

could not be executed.

The solution is

1.Activate the plugin .

2. Copy wp-cache-phase1.php to /wp-content directory and rename it into advanced-cache.php.

3.Edit the file wp-content/plugins/wp-cache/wp-cache.php. and find “function wp_cache_check_link()”

and change it into:

function wp_cache_check_link() {
      return true;
/*global $wp_cache_link, $wp_cache_file;

if ( basename(@readlink($wp_cache_link)) != basename($wp_cache_file)) {
@unlink($wp_cache_link);
if (!@symlink ($wp_cache_file, $wp_cache_link)) {
echo "<code>advanced-cache.php</code> link does not exist<br />";
echo "Create it by executing: <br /><code>ln -s $wp_cache_file $wp_cache_link</code><br /> in your server<br />";
return false;
}
}
return true;*/
}

4. In Options ,you will find wp-cache option. Now you can click it. And Turn Cache Mode on.

Chinese Version:

中文版本:

当点击WordPress后台管理,”选项”里面WP-Cache选项的时候,会提示 一条命令没有执行,是因为该空间运行与Windows 之下。

解决方法是:

1. 激活 wp-cache 插件

2. 将 wp-cache-phase1.php 复制到 /wp-content 目录下,并且重命名成 advanced-cache.php.

3. 编辑插件文件: wp-content/plugins/wp-cache/wp-cache.php.

找到”function wp_cache_check_link()”,的地方,将函数改成如下方式:

function wp_cache_check_link() {
         return true;
/*global $wp_cache_link, $wp_cache_file;

if ( basename(@readlink($wp_cache_link)) != basename($wp_cache_file)) {
@unlink($wp_cache_link);
if (!@symlink ($wp_cache_file, $wp_cache_link)) {
echo "<code>advanced-cache.php</code> link does not exist<br />";
echo "Create it by executing: <br /><code>ln -s $wp_cache_file $wp_cache_link</code><br /> in your server<br />";
return false;
}
}
return true;*/
}

4.在 选项栏里面,点击 Wp-cache 的选项, 就可以激活 cache (缓存) 功能了。

Visits : 519 visited
Rating :
Bad oneNot good EnoughJust so soI like itPerfect !!! (1 votes, average: 5 out of 5)
Loading ... Loading ...
Filed under : English, Software, 汉语 |

3 Responses to “wp-cache install”

  1. neio Says:

    网上有挺多答案都不尽如人意,还是自己搞比较清楚。
    有问题的朋友可以回复问我。

    [Reply]

  2. Cialiskt Says:

    Please,continue

    [Reply]

  3. Comprar Cialis Says:

    Excellent post. good luck.

    [Reply]

Leave a Reply