前言介紹
- 這款 WordPress 外掛「Fastly」是 2012-07-23 上架。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2025-04-11,距離現在已有 23 天。
- 外掛最低要求 WordPress 4.6.2 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
fastly |
外掛標籤
cdn | speed | Spike | fastly | performance |
內容簡介
安裝:
您可以從源代碼(您正在查看的)或 WordPress 外掛目錄進行安裝。
為了進行配置,您需要註冊 Fastly,並創建並啟用新服務(除非您已經有一個)。有關如何創建和啟用新服務的詳細信息,請參閱此處。您還需要找到您的服務 ID 並記錄該字符串。
您需要創建一個帶有全局 API 訪問選項的 API 令牌。 單擊此處以進入令牌管理屏幕。
在 WordPress 管理面板內設置 Fastly 外掛
在WordPress 網誌管理面板下,進入 Fastly->General,輸入並保存您的 Fastly API 令牌和服務 ID
按下TEST CONNECTION按鈕以驗證連接。
為了從 Fastly 中獲得最大的價值,我們建議您從 https://github.com/fastly/WordPress-Plugin/tree/master/vcl_snippets 上傳 VCL 片段,這些片段將添加以下代碼
- 強制某些路徑通過(不緩存),例如 wp-admin、wp-login.php
- 確保永遠不緩存已登錄的用戶會話
- 處理關於提供錯誤時請求陳舊資料
您可以手動上傳它們,或者在 UI 中按下Update VCL按鈕。
如需更多信息或者有任何問題,請發送電子郵件給我們。
注意:您可能需要禁用其他緩存插件,如 W3TotalCache 或 WP Rocket,以避免出現奇怪的緩存行為。
调用Fastly API
整合在发布文章/页面/分类法方面的清除程序
wp-admin 中包含一个管理面板
整合一些高级的清除选项 Fastly API
允许通过 webhooks 监视清除进度,以用于 Slack
使用此外掛意味着您不必在WordPress内容更改時清除 Fastly。清除將自動進行,無需手動干預。
自定義
邊緣模塊
邊緣模塊是一個框架,可以在快速邊緣上啟用特定功能,而不需要編寫 VCL。當前可包括的功能列表包括
啟用 Blackfire 指標和跟踪
設置 CORS 標頭
啟用用于機器人檢測合作夥伴的支持,如 Datadome/Netacea
將一個域名重定向到另一個域名,例如 domain.com => www.domain.com
重寫將要去往後端的 URL,例如 /sitemap.xml => /media/sitemap.xml
將外部後端/源進行網域遮罩
更多詳情可在 https://github.com/fastly/WordPress-Plugin/blob/master/EDGE-MODULES.md 找到。
圖片優化
圖像優化是一個單獨簽約的功能。請聯繫 [email protected] 選擇方案和啟用。
一旦在服務級別上激活,您就可以在 Fastly->Advanced 下啟用它。
IO 選項的分解:
啟用 Fastly 配置中的圖像優化- 該選項的啟用會上傳 VCL,將圖像流量引導到圖像優化服務
啟用圖像優化
原文外掛簡介
Installation:
You can either install from source (you\’re looking at it), or from the WordPress plugin directory.
To proceed with configuration you will need to sign up for Fastly and create and activate a new service (unless you already have one). Details of how to create and activate a new service can be found here. You will also need to find your Service ID and make a note of the string.
You will need to create an API token with the Global API access option selected. Click here for token management screen.
Set up the Fastly plugin inside your WordPress admin panel
In your WordPress blog admin panel, Under Fastly->General, enter & save your Fastly API token and Service ID
Verify connection by pressing TEST CONNECTION button.
In order to get the most value out of Fastly we recommend you upload VCL snippets from https://github.com/fastly/WordPress-Plugin/tree/master/vcl_snippets. These snippets will add code for following
– Force certain paths to be passed (not cached) e.g. wp-admin, wp-login.php
– Makes sure that logged in user sessions are never cached
– Handling for serving stale on error
You can upload them by hand or press Update VCL button in the UI.
For more information, or if you have any problems, please email us.
Note: you may have to disable other caching plugins like W3TotalCache or WP Rocket to avoid getting odd cache behaviour.
Pulls in the Fastly API
Integrates purging in post/page/taxonomies publishing
Includes an admin panel in wp-admin
Integrates some of the advanced purging options from Fastly API
Allows to monitor purging using webhooks for slack
Using this plugin means you won’t have to purge content in Fastly when you make changes to your WordPress content. Purges will automatically happen with no need for manual intervention.
Customization
Edge Modules
Edge Modules are a framework that enables specific functions to be enabled on Fastly Edge without
the need to write VCL. Current list of functions that can be included includes
Enable Blackfire metrics and tracing
Set CORS headers
Enable support for bot detection partners such as Datadome/Netacea
Redirect one domain to another e.g. domain.com => www.domain.com
Rewrite URLs going to a backend e.g. /sitemap.xml => /media/sitemap.xml
Domain masking an external backend/origin
More details can be found at https://github.com/fastly/WordPress-Plugin/blob/master/EDGE-MODULES.md
Image optimization
Image Optimization is a separately contracted feature. Please contact [email protected] to request
pricing and activation.
Once activated on service level, you will be able to enable it in your blog under Fastly->Advanced.
Breakdown of IO options:
Enable Image Optimization in Fastly configuration – Activating this uploads VCL that steers image traffic to the image optimization service
Enable Image Optimization in WordPress - Main switch to activate IO which is needed for all other options to work.
Enable adaptive pixel ratios - Switch for adaptive pixel ratios implementation. This replaces adaptive pixels srcset to format which Fastly IO can parse and replace. Initially works only on inserted attachments like featured images, but can be applied on content images if enabled.
Adaptive pixel ratio sizes - Select pixel ratios that will be generated when creating image srcset html.
Enable image optimization for content images - Safe switch for Image optimization of content images (due to difference from featured images, those are processed differently). To fully utilize, insert full size images in content.
WordPress Hooks
Available wordpress hooks (add_action) on:
Editing related (purging) keys for a given post
purgely_related_keys
Editing surrogate keys output
purgely_pre_send_keys
purgely_post_send_keys
functions: add_keys
Editing surrogate control headers output(max-age, stale-while-revalidate, stale-if-error)
purgely_pre_send_surrogate_control
purgely_post_send_surrogate_control
functions: edit_headers, unset_headers
Edit cache control headers output (max-age)
purgely_pre_send_cache_control
purgely_post_send_cache_control
functions: edit_headers, unset_headers
Example:
add_action(\’purgely_pre_send_surrogate_control\’, \’custom_headers_edit\’);
function custom_headers_edit($header_object)
{
$header_object->edit_headers(array(\’custom-header\’ => \’555\’, \’max-age\’ => \’99\’));
}
add_filter(\’purgely_related_keys\’, \’custom_related_keys\’, 10, 2);
function custom_related_keys($keys_array, $post_object) {
$keys_array[] = \’custom-key\’;
return $keys_array;
}
add_action(\’purgely_pre_send_keys\’, \’custom_surrogate_keys\’);
function custom_surrogate_keys($keys_object) {
$keys_object->add_key(\’custom-key\’);
}
Note: you may have to disable other caching plugins like W3TotalCache to avoid getting odd cache behaviour.
About Fastly
Fastly is the only real-time content delivery network designed to seamlessly integrate with your development stack.
Fastly provides real-time updating of content and the ability to cache dynamic as well as static content. For any content that is truly uncacheable, we’ll accelerate it.
In addition we allow you to update your configuration in seconds, provide real time log and stats streaming, powerful edge scripting capabilities, and TLS termination (amongst many other features).
License
Fastly.com WordPress Plugin
Copyright (C) 2011,2012,2013,2014,2015,2016,2017 Fastly.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Fastly」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.2 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 0.2b | 0.91 | 0.92 | 0.93 | 0.96 | 0.97 | 0.98 | 0.99 | 1.1.1 | 1.2.0 | 1.2.1 | 1.2.3 | 1.2.4 | 1.2.5 | 1.2.7 | 1.2.8 | trunk | 1.2.15 | 1.2.16 | 1.2.17 | 1.2.27 | 1.2.28 |
延伸相關外掛(你可能也想知道)
LiteSpeed Cache 》LiteSpeed Cache for WordPress(LSCWP)是一種全方位的網站加速外掛,包括獨家的伺服器層快取和一系列的優化功能。, LSCWP 支援 WordPress Multisite 及大多...。
Jetpack – WP Security, Backup, Speed, & Growth 》search engines, and grow your traffic with Jetpack. It’s the ultimate toolkit for WordPress professionals and beginners alike., , Customize and des...。
Image Optimizer – Optimize Images and Convert to WebP or AVIF 》外掛總結:, , - Image Optimizer 是一個易於使用的 WordPress 外掛,透過壓縮和調整大小的技術來減少圖像大小,同時保留最高的圖像品質。, - Image Optimize...。
WP Super Cache 》本外掛可以從您的動態 WordPress 部落格生成靜態 HTML 檔案。在產生 HTML 檔案後,您的網頁伺服器會傳送該檔案,而不是處理比較沉重、耗費更多資源的 WordPre...。
WP Fastest Cache 》han PNG or JPEG, which means faster downloads and less data consumption for your visitors, Database Cleanup – Detect and delete unnecessary d...。
ManageWP Worker 》, Want to clone or migrate your WordPress website to a new host or domain? No problem! With ManageWP, you can easily clone or migrate your website ...。
W3 Total Cache 》W3 Total Cache (W3TC) 透過整合內容傳遞網絡 (CDN) 和最新最佳實踐等功能,提高網站性能、減少加載時間,增進 SEO、核心 Web 主要指標和整體用戶體驗。W3TC ...。
Speed Optimizer – The All-In-One Performance-Boosting Plugin 》SiteGround Optimizer 插件是由 SiteGround 開發的,可以大幅提高任何托管環境下的 WordPress 網站性能。, 最初設計用於 SiteGround 的服務器,現在已經有近 ...。
Autoptimize 》Autoptimize 能夠輕鬆優化您的網站。它可以整合、縮小和快取腳本和樣式表,在默認情況下向頁面 head 中注入 CSS,但也可以內嵌關鍵 CSS 並延遲整合的完整 CSS...。
AMP 》「Page Experience」(PX)是一組排名訊號,包括「核心網頁素質」(Core Web Vitals,CWV),用來測量使用者與網頁互動的使用體驗。AMP 是一個強大的工具,能...。
WebP Express 》ch means less bandwidth usage and faster page load times., Easy to use - with little effort, WordPress site admins can have their site serving auto...。
Breeze – WordPress Cache Plugin 》Breeze是由Cloudways團隊開發的一款免費、簡單(卻功能強大)且使用者友好的WordPress快取外掛。它提供不同層級的WordPress效能優化選項,在WordPress、搭配W...。
Jetpack Boost – Website Speed, Performance and Critical CSS 》使用 Jetpack Boost 優化網頁性能加速你的 WordPress 網站。輕鬆啟用一鍵優化,提升核心 Web 重要指標。, 你是否知道,更快的網站可以:, , 在 Google 搜尋排...。
Custom Fonts – Host Your Fonts Locally 》此外掛能協助您輕鬆地在 WordPress 網站中嵌入自定義字型檔案 (woff2、woff、ttf、svg、eot、otf)。, 目前能與以下主題和外掛一起使用:, , Astra 主題, Beav...。
Redis Object Cache 》一個由 Redis 提供支援的持久化物件快取後端。支援 Predis、PhpRedis (PECL)、Relay、複寫、哨兵、叢集化和 WP-CLI。, 若要調整連線參數、前綴的快取鍵或設定...。