[WordPress] 外掛分享: Fast Velocity Minify

首頁外掛目錄 › Fast Velocity Minify
WordPress 外掛 Fast Velocity Minify 的封面圖片
40,000+
安裝啟用
★★★★
4.6/5 分(194 則評價)
134 天前
最後更新
問題解決
WordPress 5.6+ PHP 7.2+ v3.5.4 上架:2016-06-20

內容簡介

這是一款針對開發人員和進階使用者優化 HTML、CSS 和 JS 的外掛程式。注意在安裝完畢後需要查看 HELP 標籤,手動設定適合你的網站的設定。每個網站都不同,因此預設建議可能適用或不適用於你的網站,你需要進行測試並找到如何調整你的設定。

在第一個未緩存請求期間進行縮小,縮小是在前端進行的。處理完第一個請求後,任何其他需要相同的 CSS 和 JS 文件的頁面都可以重複使用相同的生成靜態 CSS 或 JS 文件。

如果你的快取正在大幅增長,這可能意味著你的某個 CSS 或 JS 文件是動態的,每次頁面查看時都會發生變化。在這種情況下,你需要將該文件添加到忽略列表中,否則快取將無限增長(因為明顯地原始文件本身是動態的,當你進行最小化時,外掛程式會看到不同的文件)。

安裝完插件後,請仔細閱讀 HELP 欄目,瞭解可能出現的問題以及如何解決。

其他優化

我可以為你提供基於此插件的定制製作的其他優化方案。如果你想聘請我,請訪問我的個人資料鏈接瞭解更多信息。

WP-CLI 命令

清除所有快取: wp fvm purge
在網絡站點上清除所有快取: wp --url=blog.example.com fvm purge
在整個網絡上清除所有快取(Linux): wp site list --field=url | xargs -n1 -I % wp --url=% fvm purge

如何自定義快取路徑?

你需要一個公共目錄來存儲和提供縮小的快取文件。如果你需要自定義路徑和 URL,需要編輯你的 wp-config.php,添加 define('FVM_CACHE_DIR', '/absolute/path/to/example.com/your/public/directory'); 和 define('FVM_CACHE_URL', 'https://example.com/your/public/directory');。

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.5.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Fast Velocity Minify」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

HTML, CSS & JS optimization plugin for developers and advanced users. Note you need to look into the HELP tab after installing the plugin and manually configure it for your site. Each site is different, so the default recommendations may or may not work for you and you will need to test and find out how to adjust your settings.
Minification is done on the frontend during the first uncached request. Once the first request is processed, any other pages that require the same set of CSS and JS files will be able to reuse the same generated static CSS or JS file.
If your cache is growing significantly, this could mean one of your CSS or JS files is dynamic and changes on every pageview. In that case, you would need to add the file to the ignore list, else the cache would grow indefinitely (because obviously the original files themselves are dynamic and when you minify, the plugin sees a different file).
Kindly read the HELP section after installing the plugin, about possible issues and how to solve them.
Additional Optimization
I can offer you additional custom made optimization on top of this plugin. If you would like to hire me, please visit my profile links for further information.
WP-CLI Commands

Purge all caches: wp fvm purge
Purge all caches on a network site: wp --url=blog.example.com fvm purge
Purge all caches on the entire network (linux): wp site list --field=url | xargs -n1 -I % wp --url=% fvm purge

How to customize the cache path ?
You need a public directory to store and serve minified cache files. If you need to customize the path and url, you need to edit your wp-config.php and add both define('FVM_CACHE_DIR', '/absolute/path/to/example.com/your/public/directory'); and define('FVM_CACHE_URL', 'https://example.com/your/public/directory'); .

延伸相關外掛

文章
Filter
Mastodon