描述
LiteSpeed Cache for WordPress(LSCWP)是一款多功能网站加速插件,具有独一无二的服务器级缓存和一系列优化功能。
LSCWP 支持 WordPress Multisite,并兼容大多数流行插件,包括 WooCommerce、bbPress 和 Yoast SEO。
WordPress的LiteSpeed Cache与ClassicPress兼容。
必备条件
通用功能适用于任何网络服务器(LiteSpeed、Apache、NGINX 等)。
LiteSpeed 独家功能需要以下条件之一:OpenLiteSpeed、商用 LiteSpeed 产品、LiteSpeed 支持的主机或 QUIC.cloud CDN。为什么?
插件细节
常规功能
- 免费QUIC.cloud CDN缓存
- 对象缓存(Memcached / LSMCD / Redis)支持+
- 图片优化(无损/无损)
- 最小化CSS、JS和HTML
- 最小化内联 & 外部 CSS/JS
- 结合 CSS/JS
- 自动生成关键CSS
- 懒加载图像/框架
- 响应式图像占位符
- 支持多个 CDN+
- 异步负载 CS
- 推迟/延缓 JS 加载
- 浏览器缓存支持+
- 数据库清理和优化
- 优化 PageSpeed 分数(包括 Core Web Vitals
- OPcode缓存支持+
- 针对 CSS/JS 的 HTTP/2 推送(在支持该功能的网络服务器上)
- DNS 预读取
- Cloudflare API
- 单站点和多站点支持
- 导入/导出设定
- 界面美观、易于理解
- WebP图片格式支持
- 心跳控制
+此服务不是由LSCache插件提供的,也不保证由您的服务提供商安装。但是,如果您的站点正在使用该插件,则该插件与该服务兼容。
LiteSpeed 独家功能
- 自动清除页面缓存来极大的改善站点性能
- 基于特定的事件自动清除相关页面
- 登录用户的私有缓存
- WordPress REST API 呼叫的缓存
- 桌面和手机彼此独立的缓存
- 为指定 URL 制定清除计划的功能
- WooCommerce和bbPress支持
- WordPress CLI命令
- 便于集成缓存的 API 系统
- 按 URI、类别、标签、Cookie、用户代理从缓存中排除
- 智能预读取爬虫,支持搜索引擎优化站点地图
- 用于缓存的多个爬虫各不相同
- HTTP/2支持
- 支持HTTP/3 和 QUIC
- ESI(边缘包括)支持*
- 小工具和简码作为 ESI 块*(需要 WP 5.8 以上版本的经典小工具插件)
*OpenLiteSpeed中未提供此功能
LSCWP 资源
- 加入我们的 Slack 社区,与其他 LiteSpeed 用户交流。
- 在我们的支持论坛上提问。
- 查看详细文档。
- 在我们的博客上阅读 WordPress 周三教程。
- 帮助翻译 LSCWP。
- LSCWP GitHub。
第三方兼容性
绝大多数插件和主题都与 LSCache 兼容。对于那些不兼容的插件和主题,我们也提供了应用程序接口。使用 API 可自定义智能清除、自定义缓存规则、创建缓存变量,以及使 WP nonce 可缓存等。
隐私
该插件包含一些建议文本,您可以通过 WordPress 隐私设置中的指南将其添加到网站的隐私政策中。
供您参考:LiteSpeed Cache for WordPress可能会存储您网站上显示的每个网页的副本。这些网页存储在安装LiteSpeed服务器软件的本地系统中,不会以任何方式传输给LiteSpeed员工或由LiteSpeed员工访问,除非在您要求时提供必要的日常技术支持。所有缓存文件均为临时文件,如有必要,可通过 “全部清除 “命令在其自然到期前轻松清除。各个网站管理员可以制定自己的缓存过期规则。
除缓存外,我们的 WordPress 插件还具有 QUIC.cloud 提供的在线功能,用于图像优化、CSS 优化和低质量图像占位符服务。当请求这些优化时,数据会被传输到远程 QUIC.cloud 服务器,处理后再传回您的网站使用。如果使用QUIC.cloud CDN,它将使用LSCache技术访问您的网站,然后将您的网站托管给全球其他网站,您的数据也不会以任何方式传输给QUIC.cloud员工或被QUIC.cloud员工访问,除非在提供维护或技术支持时有必要。QUIC.cloud 最多会保留数据副本 7 天,然后将其永久删除。同样,WordPress插件具有报告功能,网站所有者可将环境报告发送给LiteSpeed,以便我们更好地提供技术支持。这些功能都不会收集任何访客数据。只涉及服务器和网站数据。
请参阅 QUIC.cloud 隐私政策,了解我们完整的隐私/GDPR 声明。
屏幕截图
安装
在没有LiteSpeed Web服务器的情况下进行优化
- 安装LiteSpeed WordPress缓存并激活它。
- 从 WordPress 控制面板,导航到LiteSpeed Cache > 页面优化。启用各个选项卡中的可用优化功能。
使用LiteSpeed Web服务器进行缓存和优化
- 安装带LSCache的 LiteSpeed 网页服务器企业版, LiteSpeed Web ADC,或者带缓存模块的 OpenLiteSpeed [免费]。
- 安装LiteSpeed WordPress缓存并激活它。
- 从WordPress仪表盘中,前往LiteSpeed 缓存 -> 设定,确定选项启用 LiteSpeed 缓存被设置为
启用
。 - 在各个选项卡中启用所需的缓存和优化功能。
LiteSpeed网络服务器商业版备注
- 请确保您的授权包含 LSCache 模块。一个 含LSCache 的 2-CPU 试用授权 可以免费试用15天。
- 服务器必须配置为启用缓存。如果您是服务器管理员,请单击此处获取说明。否则,请要求服务器管理员配置服务器的缓存根目录。
OpenLiteSpeed备注
- 整合使用了OpenLiteSpeed的缓存模块。
- 如果OLS被安装,最简单的迁移方法时使用 ols1clk。如果使用已有的 WordPress 安装,请使用
--wordpresspath
参数。 - 如果已经安装了OLS和WordPress,请按照中的说明进行操作 如何为WordPress设置LSCache。
常见问题
-
为什么缓存功能需要LiteSpeed Server?
-
该插件可与您的 LiteSpeed Web Server 及其内置页面缓存 (LSCache) 通信,为您的 WordPress 网站提供卓越性能。该插件的缓存功能可向服务器指示页面是否可缓存以及缓存时间,或使用标签使特定缓存页面失效。
LSCache 是服务器级别的缓存,所以比其它 PHP级别的缓存快。效能对比: 同其它
PHP级别的缓存性能对比。页面缓存允许服务器跳过PHP和数据库查询。LSCache因为能和服务器更加紧密的交互,可以记住缓存的入口信息,这是其它缓存做不到的。同时它可以记录依赖关系。它可以使用标签来管理智能清除,同时使用vary来提供不同缓存内容的版本,诸如电脑版,手机版,物理定位和货币。查看我们的Caching 101 博客系列。
如果这些听起来很复杂,也不必担心。LSCWP 开箱即用,默认设置适合大多数网站。请参阅《新手指南》。
没有 LiteSpeed 服务器?试试我们的 QUIC.cloud CDN 服务。它允许任何服务器(包括 NGINX 和 Apache)上的网站体验 LiteSpeed 缓存的强大功能!单击此处了解更多信息或试用 QUIC.cloud。
-
LSCache的优化功能如何?
-
LSCWP包括其他优化功能,例如数据库优化,CSS和JS文件的缩小和组合,HTTP / 2推送,CDN支持,浏览器缓存,对象缓存,用于图片和图片优化!这些功能不需要使用LiteSpeed Web服务器。
-
LiteSpeed WordPress缓存插件免费吗?
-
是的,LSCWP 将始终免费开源。不过,缓存功能需要 LiteSpeed 服务器,而且某些 LiteSpeed 服务器版本需要付费。QUIC.cloud 提供的一些高级在线服务(CDN 服务、图片优化、关键 CSS、低质量图片占位符等)在达到一定使用级别时需要付费。您可以在QUIC.cloud 面板上了解更多有关这些服务的费用,以及哪些级别的服务是免费的。
-
这个插件支持哪些服务器软件?
-
要使用此插件的 LiteSpeed Exclusive 功能,必须使用 LiteSpeed 解决方案。以下任何一种解决方案均可使用:
- 包含LSCache模块的LiteSpeed网页服务器 (v5.0.10+)
- OpenLiteSpeed (v1.4.17+)
- LiteSpeed WebADC (v2.0+)
- QUIC.cloud CDN
通用功能可用于任何网络服务器。无需使用 LiteSpeed。
-
这个插件支持集群环境吗?
-
缓存入口将储存在LiteSpeed服务器级别。最简单的解决方案时使用LiteSpeed WebADC,这样缓存入口可以储存在服务器级别。
如果使用其它的负载均衡,缓存入口将被储存在后台节点,而不是负载均衡中。
清除将不能在不同节点同步,所以不推荐这样做。
如果需要定制方案,请联系 LiteSpeed Technologies
info@litespeedtech.com
注意:该插件创建的重写规则必须被复制到负载均衡中。
-
缓存文件存在哪里?
-
实际缓存的页面被LiteSpeed服务器存储和管理。
在WordPress的文件结构中不会存储任何文件。
-
LiteSpeed缓存WordPress插件可以在OpenLiteSpeed上使用吗?
-
是的,它在OpenLiteSpeed运行良好,只是有些功能不能支持。参考这段描述上面的插件功能。任何可能改变
.htaccess
文件的设定修改都需要从启服务器。 -
支持WooCommerce 吗?
-
简短而言,是的。然而,对于有些 woocommerce 主题,购物车可能不能正常更新。请访问我们的博客以得知如何检测和修正这个问题的信息。
-
我的图片被优化了吗?
-
除非您将LiteSpeed Cache > Image Optimization(图像优化)> Image Optimization Settings(图像优化设置)> Auto Request Cron(自动请求 Cron)设置为
ON
,否则图像不会自动优化。您也可以手动优化图像。了解更多信息。 -
如何在第三方插件中缓存 WP nonce?
-
我们的应用程序接口(API)包括一个使用 ESI 在缓存页面上为 nonce “打洞 “的功能。这样,无论页面的 TTL 如何,nonce 都能被单独缓存。更多信息,请参阅API 文档。我们也欢迎用户向我们预定义的已知第三方插件 nonce 列表提供信息,用户可以通过插件的 ESI 设置选择性地包含这些 nonce。
-
我怎样激活爬虫?
-
爬虫默认被禁用,并且必须首先经由服务器管理员启用。
服务器端启用爬虫后,导航至 “LiteSpeed 缓存”>”爬虫”>”常规设置“,将爬虫设置为
"开启
“。有关爬虫设置的更多详细信息,请参阅爬虫文档。
-
有哪些已知的兼容插件和主题?
-
- WPML
- 登录安全
- bbPress
- WooCommerce
- Contact Form 7
- 一体化搜索引擎优化
- Google XML Sitemaps
- Yoast SEO
- Wordfence Security
- NextGen Gallery
- ShortPixel
- Aelia CurrencySwitcher
- Fast Velocity Minify – 鸣谢 Raul Peixoto!
- Autoptimize
- Better WP Minify
- WP Touch
- Theme My Login
- WPLister
- WP-PostRatings
- Avada 5.1 RC1+
- Elegant Themes Divi 3.0.67+
- 优雅的 Divi 生成器
- Caldera Forms 1.5.6.2+
- 使用AJAX登录
- Ninja Forms
- Post Types Order 1.9.3.6+
- BoomBox – 病毒杂志 WordPress 主题
- FacetWP (LSWS 5.3.6+)
- 海狸网页编辑器
- WpDiscuz
- WP-Stateless
- Elementor
- WS表格
- WP统计
绝大多数插件和主题都与 LiteSpeed Cache 兼容。最新的兼容性信息可在我们的文档中找到
-
How can I report security bugs?
-
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.
评价
贡献者及开发者
更新日志
6.5.4 – Dec 16 2024
- Page Optimize Fixed Google Fonts broken with the Async option. (HivePress #787)
6.5.3 – Dec 4 2024
- Misc Quote escaped in attributes when building HTML.
6.5.2 – Oct 17 2024
- Crawler Removed barely used Role Simulator from Crawler, to prevent potential security issues.
- Misc Removed
mt_srand
function in random hash generation to slightly improve the hash result.
6.5.1 – Sep 25 2024
- Security This release includes two security updates to enhance the post validation of the editor (CVE-2024-47373), and to secure the GUI queue display from malicious vary input (CVE-2024-47374).
- Media Sanitized dimensions for the images when replacing with placeholders. (TaiYou)
- Page Optimize Sanitized vary value in queue list. (TaiYou)
- Cloud Silent API error when failing to retrieve news updates.
6.5.0.2 – Sep 6 2024
- Debug Compatibility improvement for WP installations w/o
AUTH_KEY
defined inwp-config.php
.
6.5.0.1 – Sep 4 2024
- 🔥Debug Fixed a corner case fatal error when Object Cache is ON but failed to connect, and
wp-content/litespeed
directory is not writable, and debug option is ON.
6.5 – Sep 4 2024
*❗Security This release includes several debug log improvements for improved security, as listed below. Update strongly recommended.
* Debug Moved debug log to litespeed individual folder /wp-content/litespeed/debug/
.
* Debug Disallowed visits to /litespeed/debug/
folder log files in .htaccess.
* Debug Dropped const LSCWP_DEBUG_PATH
support.
* Debug Renamed debug.purge.log
to purge.log
.
* Debug Added dummy index.php
for debug folder.
* Debug Used random string for log filenames.
* Debug Removed cookies-related info. (Thanks to Rafie)
* Debug Dropped Log Cookies
option.
* Report Escaped report content to protect it from potential XSS attack. (Islam R alsaid #505746)
* ESI Added nonce for Advanced Custom Fields + Advanced Forms. (David Lapointe Gilbert #439)
* Purge Run ACTION_PURGE_EMPTYCACHE even if cache is disabled in network admin. (Philip #453)
* Page Optimize Disable UCSS exclusion when UCSS is inactived. (#640)
* 3rd Fixed undefined warning in WooCommerce Widgets. (Lolosan #719)
* 3rd Correct the integration with User Switching. (John Blackbourn #725)
* 3rd Fixed Admin Bar Missing issue on DIVI + Elementor frontend. (thyran/robertstaddon PR#727)
6.4.1 – Aug 19 2024
- ❗Security This release patches a security issue that may affect previous LSCWP versions since v1.9.
- 🐞Page Optimize Fixed HTML minification returning blank page issue. (#706)
- 🐞CDN Fixed a bug when Cloudflare status option is empty. (#684 #992174)
- Core Minimum required WP version escalated to WP v4.9.
6.4 – Aug 13 2024
- Cache Corrected QC and LSADC cache hit status.
- Cloud Allow partner info removal in QUIC.cloud notification.
- Crawler Separated CSS preparation validation from crawler validation.
- GUI Moved
WordPress Image Quality Control
setting fromImage Optimization
menu toPage Optimization
menu. - 3rd Add Elementor Edit button back in ESI. (PR#635)
- 3rd Fixed Instant click potential conflict w/ other plugins.
6.3.0.1 – Jul 29 2024
- 🔥🐞Rest Disabled WP default Editor cache for REST requests to fix editor errors. (Shivam)
- Cache Supported
cache_nocacheable.txt
predefined settings.
6.3 – Jul 22 2024
- 🌱Page Optimize HTML Keep Comments: When minifying HTML do not discard comments that match a specified pattern. (#328853)
- 🌱Cache Cache POST requests. Now can configure POST/GET AJAX requests to be cached. (#647300)
- Cache Bypass admin initialization when doing ajax call. (Tim)
- Cache Better control over the cache location #541 (Gal Baras/Tanvir Israq)
- Cloud Added nonce for callback validation to enhance security. (Chloe@Wordfence)
- Cloud Fixed an error message for daily quota.
- Cloud Display error message when communicating with QUIC.cloud causes a token error.
- ESI Bypass ESI at an earlier stage when getting
DONOTCACHEPAGE
. - ESI Added ESI nonce for Events Calendar and jetMenu mobile hamburger menu. (#306983 #163710 PR#419)
- ESI Added WP Data Access nonce (PR#665)
- ESI Added WP User Frontend ESI nonce (PR#675)
- Media Ignored images from JS in image size detection (PR#660)
- GUI Moved Preset menu from network level to site level for multisite networks.
- GUI Suppressed sitemap generation message if not triggered manually.
- GUI Added CloudFlare purge to front end menu.
- GUI Allowed customized partner CDN login link on dash.
- Page Optimize Cleaned up litespeed_url table when clearing url files. (PR#664)
- Page Optimize Updated Instant Click library to version 5.2.0.
- Page Optimize Added Flatsome theme random string excludes. (PR#415)
- Page Optimize Exclude Cloudflare turnstile from JS optimizations. (Tobolo)
- Page Optimize Fixed Cloudflare Turnstile issues. (Contributolo PR#671/672)
- Object Improved debug log for object cache status. (PR#669)
- Object Added brief parseable header comments to the drop-in file. (OllieJones)
- Debug Trimmed debug log.
- Misc Improved compatibility and sped up resolving for JSON functions
json_encode/json_decode
. (hosni/szepeviktor #693) - Misc Fixed typos in params and comments. (szepeviktor #688)
- Image Optimization Fixed an issue which suppressed new requests when there were no new images in the library but there were unprocessed images in the send queue.
- Image Optimization Improved Cloud side quota check by disallowing new requests if notified but not pulled.
- Image Optimization Keep image attributes when replacing dimensions. (PR#686 #381779)
6.2.0.1 – Apr 25 2024
- 🔥🐞Page Optimize Fixed the image display issue that occurs with Elementor’s
data-settings
attribute when the WebP image is not yet ready. (kanten/cbwwebmaster/reedock #132840 #680939 #326525)
6.2 – Apr 23 2024
- 🌱Crawler Added Crawler hit/miss filter. (#328853)
- 🌱CLI Image optimization now supports
wp litespeed-image batch_switch orig/optm
. (A2Hosting) - 🌱VPI Auto preload VPI images. (Ankit)
- Object Added support for username/password authentication for Redis (PR#616 Donatas Abraitis/hostinger)
- Page Optimize Now supporting Elementors data-settings WebP replacement. (Thanks to Ryan D)
- Cache Send
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
when page is not cacheable. (asafm7/Ruikai) - Cache Cache control will respect
X-Http-Method-Override
now. (George) - Cache No cache for
X-Http-Method-Override: HEAD
. (George) - Cache Specified LSCWP in adv-cache compatible file.
- Cache Fixed redirection loop if query string has tailing ampersand (#389629)
- Cache Dropped “Cache Favicon.ico” option as it is redundant with 404 cache. (Lauren)
- Cache Fixed deprecated PHP v8 warning in page redirection. (Issue#617 dcx15)
- Cloud REST callback used ACL for QC ips validation.
- Cloud Fixed a typo in parsing cloud msg which prevented error messages to show.
- Cloud Carried on PHP ver for better version detection purpose.
- Cloud Escaped token to show correctly in report.
- Cloud Fixed a QC cloud ip verification setup failure in PHP 5.3.
- 🐞Cloud Fixed a continual new version detection.
- 🐞Image Optimize Fixed a summary counter mismatch for finished images. (A2Hosting)
- CDN Auto CDN setup compatibility with WP versions less than 5.3.
- 🐞CDN Fixed wrong replacement of non image files in image replacement. (Lucas)
- GUI Further filtered admin banner messages to prevent from existing danger code in database.
- REST Fixed a potential PHP warning in REST check when param is empty. (metikar)
6.1 – Feb 1 2024
- 🌱Database New Clear Orphaned Post Meta optimizer function.
- Image Optimize Fixed possible PHP warning for WP requests library response.
- Image Optimize Unlocked
noabort
to all async tasks to avoid image optimization timeout. (Peter Wells) - Image Optimize Fixed an issue where images weren’t being pulled with older versions of WordPress. (PR#608)
- Image Optimize Improved exception handling when node server cert expire.
- 🐞Image Optimize The failed to pull images due to 404 expiry will now be able to send the request again.
- Crawler CLI will now be able to force crawling even if a crawl was recently initiated within the plugin GUI.
- Page Optimize Fixed a dynamic property creation warning in PHP8. (PR#606)
- Page Optimize Fixed an issue where getimagesize could cause page optimization to fail. (PR#607)
- Tag Fixed an array to string conversion warning. (PR#604)
- Object Cache Return false to prevent PHP warning when Redis fails to set a value. (PR#612)
- Cache Tag Fixed an issue where $wp_query is null when getting cache tags. (PR#589)
6.0.0.1 – Dec 15 2023
- 🐞Image Optimize Grouped the taken notification to regional center servers to reduce the load after image pulled.
6.0 – Dec 12 2023
- 🌱Image Optimize Parallel pull. (⭐ Contributed by Peter Wells #581)
- 🌱Cache CLI Crawler.
- 🌱Cache New Vary Cookies option.
- 🌱Media New Preload Featured Image option. (Ankit)
- Core Codebase safety review. (Special thanks to Rafie Muhammad @ Patchstack)
- Purge Purge will not show QC message if no queue is cleared.
- Purge Fixed a potential warning when post type is not as expected. (victorzink)
- Conf Server IP field may now be emptied. (#111647)
- Conf CloudFlare CDN setting vulnerability patch. (Gulshan Kumar #541805)
- Crawler Suppressed sitemap generation msg when running by cron.
- Crawler PHP v8.2 Dynamic property creation warning fix. (oldrup #586)
- VPI VPI can now support non-alphabet filenames.
- VPI Fixed PHP8.2 deprecated warning. (Ryan D)
- ESI Fixed ESI nonce showing only HTML comment issue. (Giorgos K.)
- 🐞Page Optimize Fixed a fatal PHP error caused by the WHM plugin’s Mass Enable for services not in use. (Michael)
- 🐞Network Fix in-memory options for multisites. (Tynan #588)
- Network Correct
Disable All Features
link for Multisite. - 🐞Image Optimize Removing original image will also remove optimized images.
- Image Optimize Increased time limit for pull process.
- Image Optimize Last pull time and cron tag now included in optimization summary.
- Image Optimize Fixed Elementors Slideshow unusual background images. (Ryan D)
- 🐞Database Optimize Fix an issue where cleaning post revisions would fail while cleaning postmeta. (Tynan #596)
- Crawler Added status updates to CLI. (Lars)
- 3rd WPML product category purge for WooCommerce. (Tynan #577)
5.7.0.1 – Oct 25 2023
- 改进管理横幅信息的图形用户界面。(#694622)
- CDN设置的改进。(#694622)
- 图像优化改进检查图像识别的过程。(#694622)
5.7 – Oct 10 2023
- 页面优化新选项可用:预连接。(xguiboy/Mukesh Patel)
- 🌱Woocommerce的迷你购物车选项的第 3 个新变量。(瑞凯)
- 云 如果重新启用 CDN,则强制将配置同步到 QUIC.cloud。
- 云如果已读取域密钥,则强制将配置同步到 QUIC.cloud。
- 在发布到 QC 时,云限制多行字段。
- 缓存将 HEAD 请求与 GET 请求一样视为可缓存请求。(George Wang)
- 🐞ESI已修补一个可能的漏洞问题。(István Márton@Wordfence #841011)
- 🐞ESI重写 SCRIPT_URI,防止 ESI 子请求导致重定向。(Tobolo)
- 🐞图像优化当图像只进行了部分优化时,绕过不必要的图像处理。(瑞凯)
- 访客模式将不再直接启用 WebP。(迈克尔-海曼)
- CDNURL 无效时自动禁用 CDN。(瑞凯)
- CDN修复了 PHP v8.1 的空参数警告 (#584)
- API添加
litespeed_media_add_missing_sizes
过滤器,允许绕过媒体的 “添加缺失尺寸 “选项(用于访客优化和其他)。(PR #564) - 访客已修复 guest.vary.php 的软 404 和 robots.txt 报告。
- Vary为 LSWS Enterprise 启用
litespeed_vary_cookies
。 - 图形用户界面停止在访客模式关闭时错误显示 WebP 提示。
- 图形用户界面在仪表板页面上添加了 QUIC.cloud 推广信箱。
- 3rd Added
pagespeed ninja
to blocklist due to its bad behavior.