Archive for the 'WP插件' Category

WordPress2.5.1问题:No Sidebars Defined

星期三, 六月 18th, 2008

今天安装了一个Gallery Widget的插件,可以方便的在主页显示媒体库里的图片。可是现在用的主题似乎不支持Sidebar Widget,出现了“No Sidebars Defined”的错误提示。

解决办法如下:

在该主题下sidebar.php里加入:

< ?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>

< ?php endif; ?>

然后添加文件:functions.php,内容如下:

< ?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>

终于装好了WP-Cache

星期四, 十二月 7th, 2006

今天终于有空装好了WP-Cache,速度明显快了很多。先把安装步骤及遇到的问题记录如下:

1、下载 WP-Cache,解压上传到wp-content/plugins下面

2、按照提示先做个软连接,链接到wp-conent/advanced-cache.php。

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

3、登陆后台,激活WP-Cache插件。进入:选项 -〉WP-Cache的管理界面,提示出错。
4、进行配置前确定wp-content目录可以被写,在wp-content目录下创建cache目录,确保cahce目录属于宿主,并且可写。编辑根目录下wp-config.php,  在 require_once(ABSPATH.’wp-settings.php’);  前面加上

define(’WP_CACHE’, true);

require_once(ABSPATH.’wp-settings.php’);

5、配置完成,就可以无错的打开选项 -〉WP-Cache的管理界面,  点击enable it,WP_CACHE就可以正常使用了。

6、 如果遇到如下错误:

Warning: GZIP compression is enabled in Wordpress, wp-cache will be bypassed until you disable gzip compression.
WP-Cache is Disabled

可以在选项 -〉阅读里面关闭GZip。如:

如果浏览者需要,WordPress可以使用压缩格式(gzip)发送文章

WP-Cache 2.0:为你的wordPress提速

星期四, 九月 21st, 2006

由于Wordpress默认是动态程序展示的blog,大部分文字资料都保存在数据库里面,当你的博客访问人数太多时,你的wordPress就会更多的访问数据库,造成效率降低,博客的访问速度也下降。WP-Cache正是为了解决这个问题,利用缓存原理,高效缓存你的wordpress文档,这样访客访问时,wordpress就减少了链接数据库的时间,直接提取缓存的文件,所以你的博客的访问速度也就提高了。