WordPress缓存加速优化插件 - WP Fastest Cache安装及配置Nginx

我们都知道,WordPress程序随着数据的增加网站打开速度会变慢,我们一般会使用WP Super Cache插件提高缓存优化速度。今天老蒋有看到有网友博客提到WP Fastest Cache插件,根据反馈的信息看据说很不错。WP Fastest Cache这款插件有免费和付费版本,对于普通用户来说免费版本够用。

看到介绍,WP Fastest Cache插件设置还是比较简单的,还支持看到简体中文语言,原理是把页面生成静态页面缓存在服务器目录中,然后用户访问直接读取静态文件,这样速度就得到提高。

第一、WP Fastest Cache插件下载安装

插件地址:https://wordpress.org/plugins/wp-fastest-cache/

我们可以直接在WP网站后台搜索"WP Fastest Cache",然后激活安装。

第二、WP Fastest Cache插件配置

WP Fastest Cache插件配置

可以根据提示选择简体中文,然后设置选项。

第三、首页重命名静态化

看到有网友在使用的时候可以将WP首页重命名,直接调用缓存的首页。

location / {
if (-f $request_filename) {
break;
}
set $caches 1;
set $request_file $document_uri;
set $cache_file '';
if ($request_method = POST) {
set $caches 0;
}
if ($query_string) {
set $caches 0;
}
if ($caches = 0) {
set $request_file '';
}
if ($request_file ~ ^(.+)$) {
set $cache_file /wp-content/cache/all/$1/index.html;
}
if (-f $document_root$cache_file) {
rewrite ^ $cache_file last;
}
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

这里可以将默认首页重命名丢在那边,然后使用这个伪静态规则设置。需要检测看看是否可以。

本文出处:老蒋部落 » WordPress缓存加速优化插件 - WP Fastest Cache安装及配置Nginx | 欢迎分享( 公众号:老蒋朋友圈 )

公众号 「老蒋朋友圈」获取站长新知 / 加QQ群 【1012423279】获取商家优惠推送