Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the math-captcha domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/xzgzscom/public_html/xzgzs.com/wp-includes/functions.php on line 6170

Warning: Undefined array key "woocommerce_login" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 313

Warning: Undefined array key "woocommerce_register" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 330

Warning: Undefined array key "woocommerce_reset" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 347

Warning: Undefined array key "woocommerce_checkout" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 364

Warning: Undefined array key "wpforms" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 386

Warning: Undefined array key "formidable_forms" in /home2/xzgzscom/public_html/xzgzs.com/wp-content/plugins/wp-advanced-math-captcha/includes/class-core.php on line 402
WP Super Cache静态缓存插件简明使用教程 - 小志工作室 WP Super Cache静态缓存插件简明使用教程 – 小志工作室

WP Super Cache静态缓存插件简明使用教程

WordPress静态缓存插件众多,孰优孰劣,这里不予评判,只说一说使用率最高的静态缓存插件WP Super Cache的基本使用方法,包括插件安装设置与停用删除缓存。

该插件在Wordpress后台插件安装页面,一直处于首页推荐位置,可知其是官方极力推荐的插件之一。

 

安装WP Super Cache插件

这里约100字略过….

 

插件设置

一、准备工作

保证wp-content目录有读写权限,因为之后生成的缓存文件会存放在这个目录中。使用Ftp客户端登录空间,右键wp-content目录属性设置许可权限为755。

同时,保证Wordpress根目录的wp-config.php和.htaccess文件也有写入权限,最好将wp-config.php和.htaccess文件作一下备份。

二、插件设置

进入插件设置页面,插件支持多语包括简体中文。

直接进入插件“高级”设置选项卡页,勾选所有标有“推荐”字样的选项,另外包括“当某页面有新评论时,只刷新该页面的缓存”这项。

缓存超时时间建议设置为“ 0”,有必要时手动清理缓存。

其它选项卡设置页面,无需设置。

如果你不清楚其它未推荐的选项功能是什么,就不要尝试了。

需要说明的是缓存模式有三种:

  • mod_rewrite 缓存模式。 (推荐)
  • PHP 缓存模式。
  • 传统缓存模式。

缓存效果最好的是默认推荐的 mod_rewrite 缓存模式,PHP缓存模式次之。

三、更新规则

设置完毕后,点击更新按钮,会提示你点击“更新 Mod_Rewrite 规则”按钮,向下滚动找到该按钮并点击。

插件会自动向Wordpress根目录的wp-config.php和.htaccess文件写入相关规则。

同时默认缓存目录的中.htaccess也必须有规则。

 

 清理缓存及停用插件

1、清理缓存

可以定期手动清理缓存文件,打开WP Super Cache插件设置页面,点击“内容”选项卡,点击“删除缓存”。

如果你与我一样在不停地折腾主题,这时就需要随时手动清理缓存,才能查看修改调整后的情况,否则显示的还是之前的静态缓存内容。

2、停用插件

重复上一步(必须),之后点击“高级”选项卡,取消“启用缓存以便加快访问。 (推荐)”勾选,并点击下面的“更新”按钮,

3、完全删除插件

重复上面两步(必须),然后进入插件页面停用WP Super Cache插件,并删除。

正常情况下删除WP Super Cache插件时,会将之前插件所修改和创建的缓存文件夹一并删除,但也可能有例外。所以,登录Ftp客户端,用之前备份的wp-config.php和.htaccess文件覆盖Wordpress根目录的同名文件,并删除wp-content目录的cache文件夹,这样才能完全卸载并彻底删除缓存文件。

另外,建议安装网页压缩插件:Autoptimize与WP Super Cache配套使用,可以进一步加快网页打开速度。

设置Autoptimize插件时,只需要勾选“优化 HTML 代码和优化 CSS 代码”,其它默认即可,不要勾选“优化 JavaScript 代码”否则可能造成主题部分功能不可用,切记!

正文完
 0

Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in /home2/xzgzscom/public_html/xzgzs.com/wp-includes/functions.php on line 5493

Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in /home2/xzgzscom/public_html/xzgzs.com/wp-includes/functions.php on line 5493