WordPress.org

Plugin Directory

WP-Optimize – 快取、壓縮圖片、最小化 & 清理資料庫,提升頁面速度與效能

Image
Image

WP-Optimize – 快取、壓縮圖片、最小化 & 清理資料庫,提升頁面速度與效能

外掛說明

不只是快取外掛

WP-Optimize 獲得超過 100 萬名 WordPress 網站擁有者的信賴,可提升效能縮短頁面載入時間,改善網站的使用者體驗Google 中的 SERP 排名。

它透過四種巧妙方式做到這一點:

1. 它會為您的網站建立快取

快取是將網站的暫時性 HTML 版本儲存在伺服器上的程序,讓使用者可以更快地擷取該版本。

這是確保網頁以閃電般的速度載入的可靠方法。只要按一下即可啟用。

2. 它會壓縮圖片

大型圖片可能會大幅影響頁面的載入速度。WP-Optimize 讓你只需點幾下,就能輕鬆找出圖片,並依偏好的有損/無損設定進行壓縮。

3. 清理資料庫

你的 WordPress 資料庫會儲存你需要的所有內容,也會儲存一些你不需要的內容。WP-Optimize 會清理並最佳化資料庫,讓網站速度更快並節省伺服器資源。

4. 它會進行最小化

除了三項主要功能外,WP-Optimize Cache 還提供更進階的最小化功能。

搭配快取,最小化作業可大幅改善效能並縮短頁面載入時間。

1. 為網站啟用快取

只要按一下即可啟用快取:

WP-Optimize 會自動為您的 WordPress 網站完成最佳設定。您可以按一下將其啟用,或依偏好微調其設定。

更多快取功能:

  • 快取預載: 此功能會模擬造訪您的網站,這表示快取檔案會立即提供給訪客,讓您的網站從第一次造訪開始就能加快速度。

  • GZIP 壓縮:如果伺服器未設定執行此作業,WP-Optimize 會將 HTML、CSS 和 JS 檔案以較小的壓縮檔案形式傳送至使用者的瀏覽器,讓頁面和樣式表的大小最多減少 90%!

  • 預載關鍵請求:Google 建議使用此功能改善頁面載入速度。關鍵資源(例如字型檔案)會先載入,讓頁面載入速度快得多 [Premium]

使用快取設定即可進行下列操作:

  • 為登入使用者提供快取內容:如果登入使用者看到的內容維持不變,請啟用此功能(或者啟用此功能,並排除內容確實會變更的網址,例如「我的帳號」區域)。

  • 將內容排除在快取之外:可以依 URL、條件式標籤、瀏覽器代理字串排除,也可列出設定後應防止快取的 Cookie(進階使用者設定)。

  • 提供裝置專用快取:為桌面與行動裝置提供個別的快取檔案。如此可確保回應式功能(例如桌面版與行動版選單)分別建立快取並正確提供。

  • 依使用者角色提供快取:如果網站會為不同使用者角色提供不同內容,這項功能就很實用。例如,電子商務網站會向轉售商或消費者顯示不同內容 [Premium]

  • 使用者專屬快取:為個別使用者提供獨立的快取檔案。適用於含有個人化內容的網站,例如學習管理系統 [Premium]

  • 清除快取權限:選取哪些使用者角色可以清除快取,例如僅限管理員,或是在 LMS 設定中僅限「teacher」角色[Premium]

2. 壓縮圖片

  • 有損或無損壓縮選項:可在節省最多空間、維持最佳圖片品質,或介於兩者之間的選項中選擇。

  • WebP 轉換:Google 建議使用 WebP;與 JPEG 相比,檔案大小最多可減少 34%,與 PNG 相比則最多可減少 26%。

  • 自動壓縮:勾選核取方塊後,你上傳的每張新圖片都會依照你偏好的有損/無損設定自動壓縮。

  • 批次壓縮:只要按一下按鈕,即可壓縮網站上現有的所有圖片。

  • 還原原始圖片:做得太過頭了嗎?只要按一下即可將圖片還原為原始狀態。

  • 保留 EXIF 圖片資料:壓縮期間勾選核取方塊即可保留 EXIF 圖片資料。

  • 延遲載入:網頁會在需要時逐步載入網頁元件,而不是一次同時載入所有內容,因此載入速度快得多 [Premium]

  • 刪除孤立圖片:在你的 WordPress 網站中找出並刪除未使用的圖片,節省磁碟空間 [Premium]

  • 刪除未使用的圖片尺寸:WordPress 會為每張上傳的圖片建立多種尺寸,導致 uploads 資料夾變得臃腫。掃描未使用的圖片尺寸並將其移除,以進一步節省磁碟空間[Premium]

3. 清理並最佳化資料庫

清理資料庫資料表、內容修訂、自動草稿文章、垃圾桶中的文章、垃圾內容、垃圾桶中的留言等項目。您可以選擇要最佳化的項目,也可以按一下清理全部內容。

  • 排程清理:設定後即可放心交由系統執行。您可以選擇每日、每週、每兩週或每月執行。

  • 彈性的清理排程: 您可能希望比移除未核准留言更頻繁地最佳化資料庫資料表(例如)。選擇工作應執行的特定時間與日期 [Premium]

  • 在清理期間保留指定週數的資料:以防日後需要取回資料。

  • 清理前先備份: 如果您刪除了不該刪除的項目,只要按幾下即可使用 UpdraftPlus 將其還原。

  • 效能調校 – WooCommerce 渦輪加速:WP-Optimize 專屬的這項效能調校,會以兩個效率高出許多的查詢取代 WooCommerce 中的一個緩慢查詢,藉此提升效能。處理大量訂單的電子商務網站可從中受益 [Premium]

  • 強效調整 – 透過建立 postmeta 資料表索引提升效能:這項獨特的強效調整可讓 WordPress postmeta 資料表建立索引,進而改善效能 [Premium]

4. 最小化並合併 HTML、CSS 與 JAVASCRIPT

  • 只需按一下即可最小化:將 HTML、JavaScript 與 CSS 最小化。您可以在「設定」中分別切換開啟或關閉,或進行自訂。

  • 自訂最小化:僅進行最小化(移除不必要的程式碼,例如換行和空白),或進行最小化並合併。針對 HTML、CSS 和 JavaScript 套用相同或不同的設定。

  • 非同步載入:選擇要在背景中載入的非必要 CSS 和 JavaScript 檔案,且獨立於其他資源之外,例如分析工具或像素追蹤指令碼。非同步載入會消除轉譯阻塞,並改善頁面載入速度。

  • 排除不進行最小化的檔案:指定要排除在最小化作業之外的 CSS 和 JavaScript 檔案。

  • 最佳化字型:最佳化 Font Awesome 和 Google Fonts。將字型檔案內嵌、繼承 CSS 設定,或改為非同步載入 CSS/Javascript。

  • 預載資源:WP-Optimize 會造訪網站上的每個網頁,讓程式碼完成最小化並預先載入,真實使用者從第一次造訪起就能享有這項效果。

  • 預載關鍵請求:這是 Google 建議用來改善頁面速度的做法。重要資源(例如字型檔案)會優先載入,因此頁面載入速度會快得多。

為什麼選擇 WP-OPTIMIZE?

  • 這項外掛由 TeamUpdraft 提供,該團隊打造了全球最受信賴的備份、移轉與還原外掛。
  • 簡單易用。
  • 這款免費外掛的功能十分強大。

WP-Optimize 將最佳的快取與最佳化技術整合為單一且無縫運作的外掛,讓你的 WordPress 網站快速、精簡且有效率。

PREMIUM 功能一覽

我們的 WP-Optimize Cache 免費版本很棒,但我們還提供功能更強大的 Premium 版本,其額外功能帶來極致的自由度與彈性:

  • 多網站支援:擴充資料庫最佳化功能,使其可同時套用於多個 WordPress 網站。如果您管理超過一個網站,則需要 WP-Optimize Cache Premium。
  • 彈性與控制:讓你能在一個或多個 WordPress 網站上,選取個別資料表或特定的資料表組合進行最佳化,而不必對所有資料庫資料表進行最佳化。
  • 刪除未使用及不需要的圖片:從你的 WordPress 網站移除孤立圖片,以及具有預先定義的特定尺寸的圖片。
  • 進階排程:提供多種自動排程最佳化的選項。指定確切時間,並每日、每週、每兩週或每月執行清理作業,也可以額外執行任意次數的一次性最佳化作業。
  • 順暢的圖形化使用者介面:讓多網站最佳化的排程與管理一目瞭然。
  • WP-CLI 支援:若你有許多網站,可透過命令列介面管理最佳化作業
  • 延遲載入:只有在使用者看得到時,才載入圖片與網頁的部分內容,讓使用者能非常快速地看到內容。
  • 最佳化預覽:讓使用者可以預覽、選取及移除資料庫中可供最佳化的資料與記錄。
  • 預載關鍵要求:依 Google PageSpeed Insights 的建議,預載網路字型與圖示字型等資源。
  • 進階支援 – 在網站上設定快取,是最複雜的工作之一,因此進階支援能讓你安心;需要技術解答或協助設定網站快取的最佳化選項時,你可以迅速找到人員諮詢。

翻譯

歡迎翻譯人員為此外掛貢獻翻譯。請使用 WordPress 翻譯網站

螢幕擷圖

安裝方式

如同其他 wordpress.org 外掛,WP-Optimize Cache 有 3 種不同的安裝方式。

使用 WordPress 控制台

  1. 前往外掛程式控制台中的「新增」
  2. 搜尋「WP-Optimize」
  3. 按一下「立即安裝」
  4. 在外掛控制台啟用此外掛

在 WordPress 控制台中上傳

  1. 從 https://wordpress.org/plugins/wp-optimize/ 下載此外掛的最新版本
  2. 前往外掛程式控制台中的「新增」
  3. 前往「Upload」區域
  4. 從你的電腦選取步驟 1 的 ZIP 檔案
  5. 按一下「立即安裝」
  6. 在「外掛」儀表板中啟用外掛

使用 FTP

  1. 從 https://wordpress.org/plugins/wp-optimize/ 下載此外掛的最新版本
  2. 解壓縮 ZIP 檔案,這會將 wp-optimize 目錄解壓縮到你的電腦
  3. 將 wp-optimize 目錄上傳至網站空間中的 /wp-content/plugins/ 目錄
  4. 在「外掛」儀表板中啟用外掛

常見問題集

使用專用的快取外掛來快取網站,不是更好嗎?

我們以最先進且功能強大的快取技術打造 WP-Optimize Cache。我們的快取測試與真實使用者回饋顯示,單靠快取功能,就能讓網站速度超越任何其他快取外掛或最佳化工具。查看這些速度測試結果。

將我的資料庫最佳化是否安全?

是;最佳化不涉及任何「技巧」或以危險方式隨意操作,而是使用定義明確且常見的 MySQL 指令來執行例行清理作業。儘管如此,我們仍一律建議進行備份,以涵蓋所有可能性;不只是資料庫故障,也包括駭客攻擊、人為錯誤等。我們推薦使用 UpdraftPlus

我可以預期節省多少?

這類問題就像「字串有多長?」一樣,完全取決於您的網站:網站規模、互動使用者人數、執行時間,以及上次進行最佳化的時間。不過,節省效果與速度提升可能相當可觀;務必確認資料庫已完成最佳化。

如何取得支援?

請前往我們的支援論壇,網址如下:https://wordpress.org/support/plugin/wp-optimize/

WP-Optimize 沒有在我的資料庫中節省大量空間

這種情況很少見;可能是因為你使用的共用網頁主機服務不允許指令碼透過 SQL 陳述式執行最佳化指令(SQL「OPTIMIZE」指令)。請就此事洽詢你的網頁主機服務公司。

此外掛是否經過實際測試?

是的,WP-Optimize Cache 是 WordPress 上安裝數量第一的最佳化外掛,擁有超過 800,000 名使用者,發展歷程超過 8 年。

WP-Optimize 支援 InnoDB 資料表嗎?

如果偵測到 InnoDB 資料表,WP-Optimize 會停用部分功能。無法在磁碟上執行資料庫資料表最佳化作業,但其他清理功能仍可運作。

你可以協助我還原資料庫嗎?

除非你已有備份,否則不行。首次使用 WP-Optimize 前,以及升級至其主要新版本時,請務必備份整個資料庫。我們推薦 UpdraftPlus

這個外掛有任何錯誤嗎?

這個外掛仍在持續開發中,因此無法排除未預期的情況與錯誤。為了更加謹慎起見,我建議你先在本機系統上測試,或備份資料庫。

如何避免每次清除暫存選項後,它們又自動出現?

當 WordPress 使用特定的 transient 時,該 transient 會自動重新建立。因此,通常只有目前正在使用的 transient 才會逐漸再次出現。維持最佳狀態的最佳做法,是按照排程清除 transient 選項。例如,WordPress 可能在一週內建立 50 個 transient 選項。如果排程 WP-Optimize Cache 每週清除這些選項,累積的數量就會少很多。

資料表大小顯示不正確/未進行最佳化作業

請檢查你的資料庫是否有損毀的資料表。這種情況可能發生;通常你的網頁主機服務公司可以對資料庫執行修復指令。

支援哪些 WordPress 和 PHP 版本?

若要使用此外掛的所有功能,至少需要 WordPress 4.9 版及 PHP 7.2。不過,我們建議使用最新版 WordPress。也強烈建議使用 PHP 7.2 以上版本,因為快取功能的運作速度會更快。

哪項最佳化作業的效果最顯著?

這取決於你的設定(佈景主題、所使用外掛的數量與品質等),但一般而言,快取會對網站效能帶來最明顯的改善。事實上,快取功能會略過大部分 WordPress 程式碼,直接向訪客提供預先最佳化的快取頁面,大幅提升速度。

什麼是快取(或頁面快取)?

「快取」,取自維基百科:「在計算領域中,快取是儲存資料的硬體或軟體元件,讓之後對該資料的要求能更快速地獲得回應;快取中儲存的資料可能是先前計算的結果,也可能是儲存在其他位置的資料副本。當要求的資料可在快取中找到時,就稱為快取命中;找不到時,則稱為快取未命中。」— WP-Optimize 快取的運作方式,是將 WordPress 計算出的頁面儲存在磁碟上。使用者造訪頁面時,WP-Optimize 會在載入 WordPress 前提供快取頁面。如果該頁面先前尚未建立快取,WordPress 會計算該頁面,接著 WP-Optimize 將結果儲存至快取。

為什麼要在我的網站上使用快取外掛?

你認為沒有快取時網站就很快嗎?快取外掛能讓你的網站速度更快。經過快取且速度更快的網站能提升 SEO,也能改善訪客體驗。快取還能節省伺服器資源。

WP-Optimize 的頁面快取是否與 Gutenberg 及 WordPress 5.0 以上版本相容?

是,你的 Gutenberg 頁面會進行快取,使用 Elementor 等網頁編輯器外掛程式建立的頁面也一樣。

如何知道我的網頁是否已建立快取(或為什麼沒有)?

如果已啟用快取,若要確認頁面是否已快取,請在網頁瀏覽器中使用「View Source」功能檢視頁面原始碼。若要尋找快取資訊,請向下捲動至底部,您應會看到快取加入的一行內容:<!-- Cached by WP Optimize - https://teamupdraft.com/wp-optimize/ - Last modified: Sat, 20 Jul 2019 21:17:19 GMT ->
不過請注意,如果您使用了會將 HTML 最小化的其他服務(例如 Cloudflare),這一行可能已遭移除。另一種方法是檢查 wp-content 目錄中 wpo-cache 目錄的內容。<a href=”https://teamupdraft.com/documentation/wp-optimize/topics/caching/faqs/how-do-i-know-my-webpage-is-being-cached/>Further 資訊可在此處閱讀
另請注意,如果您未預先載入快取,則必須先造訪一次頁面或文章,才能產生快取檔案。

如何設定頁面快取?

前往 WP-Optimize -> 快取並啟用快取。對大多數人來說,這樣就足夠了。如果您經營電子商務網站、使用自訂登入頁面,或有任何包含動態內容的頁面,可能會想要將特定 URL 排除在快取之外。請參閱文件以取得協助。

快取功能與電子商務外掛相容嗎?

可以,使用 WP-Optimize Cache 進行快取時,即使搭配 WooCommerce 或 Easy Digital Downloads 等外掛,或任何使用 DONOTCACHEPAGE 將敏感頁面(例如我的帳號、購物車或結帳頁面)排除在快取之外的電子商務系統,也能安全地快取產品。

快取功能是否與多語言外掛相容?

是,WP-Optimize 可與 WPML 或 Polylang 等熱門多語言外掛程式搭配使用。不過請注意,將 WP-Optimize 與多語言外掛程式搭配使用時,不同語言的 URL 格式不應包含任何查詢參數,例如 https://example.com/?lang=en。相反地,應採用美化永久連結格式,例如 https://example.com/en

使用快取功能需要特殊設定嗎?

不,如果 WordPress 運作正常,WP-Optimize 就能快取你的頁面和文章。

我可以將頁面快取功能與其他快取外掛程式搭配使用嗎?

不行,因為兩個快取外掛都必須使用 drop-in 外掛 advanced-cache.php。如果你在 WP-Optimize Cache 中關閉快取,就能使用其他任何快取外掛,同時繼續使用 WP-Optimize 的其他功能。不過,我們確實建議使用我們的快取解決方案。

WP-Optimize 的快取功能與 Cloudflare 相容嗎?

是!不需要任何特殊的快取設定。WP 網站上的頁面快取(由 WP-Optimize Cache 執行)與 Proxy 快取(例如 Cloudflare)彼此獨立 – 你可以同時使用兩者,也可以兩者都不使用;兩者會互相補足,不會彼此干擾。
但有一點要注意:Cloudflare 會移除頁面原始碼底部的特殊 HTML 註解,而該註解有助於確認頁面快取是否正常運作,因此不必因為看不到這段註解而困惑 – 缺少註解並不表示快取沒有運作。

執行自訂操作時,可以自動清除快取嗎?

是,你可以使用 WP-Optimize Cache 公開函式觸發清除快取操作。若要清除整個快取,請使用函式 wpo_cache_flush()。若要清除特定頁面或文章的快取檔案,請使用 WPO_Page_Cache::delete_single_post_cache($post_id);。這些快取選項會在 WordPress 動作 plugins_loaded 之後提供。

啟用頁面快取後,留言仍能正常運作嗎?

是的,使用 WordPress 的留言系統時,您的使用者仍可發表留言。每次核准留言後,該頁面或文章的快取都會清除,讓下一位訪客看到最新的留言清單。

什麼是「快取預載」?

通常,使用者造訪頁面時,頁面才會被快取。因此,第一位造訪的使用者不會取得頁面的快取版本,等待時間也會比後續使用者長。快取預載功能會處理你的所有頁面和文章,模擬使用者造訪,讓 WP-Optimize 在任何人造訪前先將頁面快取。如此一來,第一位訪客取得的就是頁面的快取版本,提升頁面效能。

快取預載排程應選擇哪種頻率?

選擇快取預載排程的頻率,取決於網站內容更新的頻率、快取中的頁面數量、伺服器資源等因素。
例如,擁有數百個頁面的網站需要更多資源來預載快取。因此,選擇較高的頻率表示快取會經常重新建立,資源使用量也會更高。
如果網站更新不那麼頻繁,你甚至可以停用快取預載排程,或設定較長的快取生命週期,並將快取預載排程設定為依循該生命週期。

如何只快取首頁?

在進階設定分頁的「要從快取排除的 URL」快取選項中,新增 /.+。

如何防止 WP-Optimize Cache 快取特定頁面

若要避免頁面被快取,可以將 URL 新增至快取「進階設定」分頁中的「要從快取排除的 URL」欄位。若你正在開發外掛並希望避免頁面被快取,可以在需要排除的頁面上定義「DONOTCACHEPAGE」常數。任何定義了「DONOTCACHEPAGE」的要求都不會被快取。

WP-Optimize 的快取功能免費嗎?

是的,快取功能免費。您永遠都能使用 WP-Optimize 免費為網站啟用快取,我們也持續改進現有的快取功能。我們會在免費版本中加入更多快取選項,並在進階版中開發更具體的快取選項,讓您能依需求調整快取功能。

WP-Optimize Cache 會將快取檔案儲存在哪裡?

快取檔案會儲存在常見的 “wp-content/cache” 資料夾內的 “wpo-cache” 資料夾中。移除 “cache” 資料夾會刪除 WP-Optimize 的所有快取,以及其他外掛的快取。
刪除 “cache” 資料夾通常是安全的,因為這些快取檔案會重新產生。

如何停用快取?

前往 WP-Optimize 設定 > 快取,切換「啟用頁面快取」選項以開啟或關閉功能。

快取會讓我的伺服器變慢嗎?

不,快取實際上會降低伺服器負載,因為會減少 PHP 和 mysql 的使用量。使用快取預載器時,資源使用量可能會出現高峰,因為此功能會在短時間內為所有頁面建立快取檔案。但完成後,效能應該會提升,伺服器負載也會降低。每個大型網站都會使用快取,透過使用較少資源更快速地提供快取頁面。

啟用快取時,可以讓頁面的特定部分維持動態嗎?

快取頁面會在 WordPress 大部分程式載入之前傳送給使用者。外掛尚未載入,因此它們無法在每次要求時變更快取內容。
所以目前,如果你想讓頁面的部分內容保持動態(例如廣告、小工具、購物車…),同時保留快取,就必須使用以 JavaScript 和 AJAX 建立的自訂方案,從伺服器擷取這些動態部分。

如何從 wp-config.php 刪除 WP_CACHE 定義?

當你停用頁面快取或停用快取外掛程式時,WP-Optimize Cache 會從 wp-config.php 移除 “WP_CACHE” 常數。如果需要手動移除,可以使用 FTP 編輯 wp-config.php,並刪除這一行:define (‘WP_CACHE’, true );
如果設定中仍啟用頁面快取,WP-Optimize Cache 會嘗試再次加入該行,因為快取功能必須使用這一行才能運作。

我的檔案系統不可寫入,以提高安全性。要如何讓它與快取功能相容?

WP-Optimize 的快取功能需要對 ‘wp-content/cache’ 資料夾具備寫入存取權,因為快取檔案會儲存在此處。它也需要在 ‘wp-config.php’ 中定義常數 ‘WP_CACHE’,並且需要存取一次 ‘wp-content/advanced-cache.php’,以及存取 ‘wp-content/wpo-cache’ 資料夾,以寫入快取設定。

如何變更檔案權限?

如果您需要變更檔案權限以啟用快取,請依照此頁面的說明操作 https://wordpress.org/support/article/changing-file-permissions/

我可以快取的頁面數量上限是多少?

你可以快取的頁面數量不限。唯一的限制是伺服器上的空間,以及伺服器允許的子目錄數量上限,因為快取會依照永久連結結構在子目錄中寫入檔案。
如果達到快取限制,這可能表示你的伺服器不符合網站規模與快取需求。

如何將快取頁面提供給使用手機或平板電腦的訪客?

在頁面快取設定中選取 “Generate separate files for mobile devices”,即可產生獨立的快取。只有在使用專為行動裝置設計的特定佈景主題,或使用特定 AMP 外掛時,才需要這項快取設定。

WP-Optimize Cache 是否支援 Nginx?

是,快取功能可與 Nginx 搭配使用。如果你想啟用瀏覽器快取或 GZIP 壓縮,則必須直接在伺服器設定中自行完成。

快取是否能在 Windows Server(IIS)上運作?

是,快取功能可與 IIS 搭配使用。與 Nginx 一樣,如果你需要啟用瀏覽器快取或 GZIP 壓縮,必須自行在伺服器上完成設定。

WP-Optimize 的頁面快取是否適用於非美化(以查詢參數為基礎)的永久連結?

不需要。快取必須使用 http://xxxxx.com/my-post/ 這類漂亮永久連結,而不是 http://xxxxx.com/?p=1234 才能運作。漂亮永久連結是 WordPress 的預設設定,沒有充分理由將其關閉,因此您應該不會遇到問題。
請注意,包含 /index.php/ 的永久連結也能使用快取。只有以查詢參數(?…)為基礎的永久連結無法使用快取。

WP-Optimize 會在何時清除頁面快取?

  • 當您發佈新內容,或更新/編輯現有內容時,該文章/頁面的快取就會清除。
  • 變更或更新目前的佈景主題及上層佈景主題(子佈景主題的上層佈景主題)會清除快取。
  • 在 WP-Optimize 中關閉快取功能時

WordPress 管理後台中的頁面會被快取嗎?

不會。WP 控制台頁面不會被快取。快取功能僅用於快取前端頁面。

快取有效期限是多久?

快取有效期間是快取檔案在重新產生前會保留的時間。
其中一個設定快取有效期間的主要原因,是某些外掛和佈景主題會使用 nonce,這些 nonce 會輸出在頁面的原始碼中(在此深入瞭解 nonce)。這些 nonce 無法重複使用,預設有效 12 小時(開發者可以變更這個值)。快取外掛會將 nonce 儲存在頁面中,而這些 nonce 會在該段時間過後失效,進而影響外掛和佈景主題的某些功能。將快取有效期間設為少於 10 小時,可確保快取會在 nonce 到期前自動清除。如此一來,便能在使用 nonce 的網站上使用 WP-Optimize 的快取功能。
另一個原因是,你可能會希望頁面反映某些變更,而不必清除整個快取。的確,如果網站有許多頁面和文章,你可能不希望每次變更都清除所有快取檔案,而是設定一個間隔,讓這些快取檔案到期並重新產生。

快取有效期限應設定為何值?

較低的快取存留時間值會導致伺服器更頻繁地更新快取,因此若已啟用快取預載,也會執行更多預載程序。
如果網站未使用 nonce,且網站的快取不需要經常更新,你可以將快取存留時間設為較高的值,或設為 0,讓快取無限期存留。
快取存留時間選項預設為 10 小時,但你可以調低至 8 小時甚至更短。
如果你注意到高伺服器負載造成任何問題,請為預載程式設定較長的間隔。

WP-Optimize Cache 能將 JavaScript、CSS 和 HTML 最小化嗎?

是的,新加入的最小化功能可讓您將 JavaScript 和 CSS 最小化,也能將 HTML 最小化。

為什麼要將 WordPress 網站最小化?

WP-Optimize Cache 的最小化功能,專為提升使用者存取 WordPress 網站的速度而設計。
最小化功能的一種做法,是移除檔案中不必要的空格與換行,並在程式碼內部縮短較長的名稱,以減少 HTML、CSS 和 JavaScript 檔案的大小。
另一種做法是將檔案合併成盡可能少的檔案。如此可減少網頁伺服器的負載,而且載入較少檔案的速度可能更快。
你也可以延後載入任何 CSS 或 JavaScript 檔案。這表示任何大型或多餘的 CSS 或 JavaScript 檔案,都能獨立於 WordPress 網站核心載入,讓使用者更快存取網站。

「重設最小化檔案」實際上會做什麼?

按下「重設最小化檔案」會執行以下操作:
* 刪除產生最小化資產時使用的暫存檔案
* 刪除舊的最小化檔案(超過 30 天)
* 新增一個資料夾,用來存放造訪頁面時產生的新最小化檔案
先前產生的最小化 CSS 檔案會留在伺服器上,直到檔案過期,或使用「刪除最小化功能產生的所有檔案」按鈕刪除為止。

使用 WP-Optimize Cache 可以延後 CSS 和 JavaScript 的載入嗎?

是的,新增的最小化功能(又稱 Minify)可讓你延後剖析 JavaScript 和 CSS。

Google 的 PageSpeed Insights 指出,應運用 font-display CSS 功能,確保網頁字型載入時文字仍可供使用者查看。WP-Optimize Cache 能做到這一點嗎?

目前使用 Google Fonts 時,可以運用 font-display CSS 功能。預設參數為「swap」,但可以使用 WordPress 篩選器「wpo_minify_gfont_display_type」變更。

啟用最小化功能後,我的網站版面配置出現問題。要如何修正?

這通常表示你的 CSS 檔案中有一或多個與最小化或合併處理不相容。CSS 語法中的錯誤也可能造成這個問題。
你可以使用線上 CSS 語法檢查工具(例如 csslint.net)檢查 CSS 語法。
如果語法沒有造成問題,或你無法變更有問題的檔案,可以將有問題的 CSS 檔案從最小化與合併處理中排除。
若要排除個別 CSS 檔案,請前往 WP-Optimize > 最小化 > CSS,然後前往「將下列 CSS 檔案從處理中排除」區段。

啟用最小化後,部分功能會失效。要如何修正?

這通常表示你的 JavaScript 檔案有一或多個與最小化或合併處理不相容。JavaScript 語法中的錯誤也可能造成這個問題。
首先,請嘗試在 JavaScript 選項中啟用「將每個納入的檔案放在各自的區塊中」設定(WP-Optimize > 最小化 > JavaScript > JavaScript 選項)。這可能會「捕捉」錯誤,並避免其餘程式碼損毀。
如果第一個選項沒有作用,請嘗試停用 JavaScript 檔案的合併功能。
如果上述方法都無效,請在最小化設定中停用 JavaScript 檔案處理,並開啟支援討論串,詳細說明你的問題。我們會盡力協助你針對問題進行疑難排解。

使用者評論

Image
2026 年 9 月 14 日
I have been using the free version of this plugin for a few years now on all my websites, but lately, I have noticed that my WooCommerce website is slowing down during the afternoon and night. At first I did not worry so much, as it is normal for websites to slow down as the number of users increase, but then it slowed down so much that my clients started complaining about Service Unavailable errors so I ask my server host to look into this, thinking that the issue mush be with them. Their report back, left me dumbfounded… It is normal for any plugin to generate traffic back to the host website; usually 20-60 requests per hour, but what we have found is that this plugin generates more traffic as the user count increases. My server log showed that on average, that this plugin generated around 8,530 requests per hour, but that it peaked at a ridiculous 15,066 requests an hour at peak times! It generates so much traffic back to itself that your website literally slows down to a crawl and then stops working all together. I disabled this plugin and immediately my website was much more responsive than before! I am not angry or anything. I still think this is a wonderful plugin to have, but there is a serious coding issue in this plugin that must be addressed. If you have this plugin installed on your website, then please be aware if this issue.
Image
2026 年 9 月 1 日
Works really well on images, optimizing them, making the site loading faster. Would recommend it. Will buy the PRO version eventually.
閱讀全部 2,611 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP-Optimize – 快取、壓縮圖片、最小化 & 清理資料庫,提升頁面速度與效能〉的開發相關工作。

參與者

〈WP-Optimize – 快取、壓縮圖片、最小化 & 清理資料庫,提升頁面速度與效能〉外掛目前已有 34 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈WP-Optimize – 快取、壓縮圖片、最小化 & 清理資料庫,提升頁面速度與效能〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

4.7.0 – 16/Sep/2026

  • FEATURE: Dashboard overview showing a summary of all WP-Optimize modules (cache, images, minification, and database), including active status, savings, and quick links to manage each area
  • FEATURE: Load tables in batches when there are too many tables to load in a single request
  • FIX: Added missing optimizations for auto optimizations cron
  • FIX: Fix removal of cache settings and related cron events on plugin deactivation and reactivation
  • FIX: Fixed inconsistent UI in the Minify status tab, and removed duplicate tooltips
  • FIX: Fixed the association of the wp_e_submissions_actions_log table with its plugin
  • FIX: LCP – Preserve original cached HTML when removing the LCP observer script fails instead of returning an empty string
  • FIX: PHPStan issues WPO_WP_Kses_Compatibility class
  • FIX: Permissions issues for adminbar menu items
  • FIX: Registered image sizes not showing on multisite
  • FIX: Removed extra spacing in the Wipe settings section
  • FIX: WP_CACHE constant warning in debug.log
  • FIX: WP_Optimize_Utils::get_file_path() does not handle URLs with query parameters
  • REFACTOR: WPO_Page_Builder_Compatibility class
  • REFACTOR: WPO_Webp_Convert_Image_Task class
  • TWEAK: Added data- attributes support for older wordpress versions
  • TWEAK: Cache – Browser cache settings updated for better compatibility
  • TWEAK: Cache – Improved browser cache detection
  • TWEAK: Disabling Show avatars no longer leaves gravatars hosted locally in the background
  • TWEAK: Improved GZIP detection
  • TWEAK: Improved the Purge Page Cache and Purge Minify Cache admin bar functionality
  • TWEAK: Premium – Improved UX for Unused CSS Removal
  • TWEAK: Premium – Index Post Meta Table power tweak now correctly indexes all subsites postmeta tables in a Multisite network and tracks last-run status per site
  • TWEAK: Premium Auto LCP writes the gzip cache variant atomically via a temporary file and rename, matching how the HTML cache file is patched
  • TWEAK: Rename as_type to asset_type in the LCP beacon request for clarity

4.6.1 – 29/Jul/2026

  • FIX: CSS exclusions added via Minify -> Advanced -> Exclude are now saved on separate lines, preventing invalid exclusion entries
  • FIX: Fixed compatibility issue with the WooCommerce multi-currency plugin
  • FIX: Incorrect WebP browser detection for Firefox users
  • FIX: Misaligned UI issue in minify admin pages
  • FIX: Mobile UI issues
  • FIX: Prevent caching pages when a WooCommerce cart has content
  • FIX: UI freezes when restoring a compressed image
  • REFACTOR: Use WP_Optimize_Utils::get_url_without_cache_purge_params() for admin bar links
  • REFACTOR: WPO_KD_Submissions_Compatibility class
  • REFACTOR: WP_Optimize_Server_Compatibility class
  • REFACTOR: WPO_Polylang_Compatibility class
  • TWEAK: Clear cached local Google Fonts statistics when the CSS font file is downloaded
  • TWEAK: Create a new class named WP_Optimize_UpdraftCentral_Commands to group UpdraftCentral specific commands, currently including methods for retrieving and updating WP-Optimize settings
  • TWEAK: Removed deprecated UpdraftCentral commands from WP_Optimize_Commands class
  • TWEAK: Removed unused phpseclib dependency from composer
  • TWEAK: Smush post meta keys are prefixed with _ and now is multisite compatible

4.6.0 – 06/Jul/2026

  • FEATURE: Premium – Automatically preloads the page’s Largest Contentful Paint (LCP) element to improve initial load speed and perceived performance
  • FIX: Cache – Fixed an issue related to cache setting saving
  • FIX: Fixed a UI issue in WooCommerce variation products when Automatically preload content after it is purged is enabled
  • FIX: Fixed browser caching issue where admin pages were cached
  • FIX: Mobile UI issue
  • FIX: Notice Dismissal issue
  • FIX: Usage of htmlspecialchars()
  • REFACTOR: Code from can_purge_cache() method moved to WP_Optimize_Utils::current_user_can_purge_cache()
  • REFACTOR: Fix WordPress Security check errors and warnings on admin page
  • REFACTOR: Make is_edit_mode a static method and avoid duplication
  • REFACTOR: Optimized WP_Optimize_Database_Information::get_table_plugin() method
  • TWEAK: Added method to check current user has the capability
  • TWEAK: Added methods to retrieve and save essential WP-Optimize toggleable settings for UpdraftCentral
  • TWEAK: Disable and hide the “Speed up WooCommerce ‘Get total spent’ query” Power Tweak when it’s no longer relevant
  • TWEAK: Handle race conditions in font downloading and optimize cache stats storage
  • TWEAK: Improved image grid action button visibility to accommodate WordPress 7.0 button styling changes
  • TWEAK: Matched response styles when purging via the admin bar
  • TWEAK: Premium – Handle empty orders in WooCommerce Total Spent Power Tweak feature
  • TWEAK: Premium – Improved hash logic for the Unused CSS Removal feature
  • TWEAK: Prevent unwanted cache growth caused by crawlers or preload bots
  • TWEAK: UI changes to match WordPress 7.0
  • TWEAK: Unschedule all WP-Optimize cron jobs on deactivation in multisite
  • TWEAK: WP_Optimize_Power_Tweaks class method deactivate bug fixed related to the array_diff function

4.5.5 – 05/Jun/2026

  • TWEAK: Update the bundled common-libs version

4.5.4 – 25/May/2026

  • FIX: WebP image compression breaking in some cases
  • REFACTOR: Avoid instantiating PHPSQLParser on each call in WPO_DB_Table_Analysis
  • REFACTOR: Class WPO_WebP_Convert
  • REFACTOR: Make markup readable in tables-body.php template
  • REFACTOR: Refactored duplicated cache_admin_bar logic by centralizing it in the admin class and removing redundant implementations.
  • REFACTOR: Removed unused WPO_Htaccess_Capabilities class
  • REFACTOR: WPO_Activation class
  • REFACTOR: WPO_Uninstall class
  • REFACTOR: WPO_WebP_Alter_HTML class
  • REFACTOR: WPO_WebP_Self_Test class
  • REFACTOR: WPO_WebP_Test_Run class
  • REFACTOR: WPO_WebP_Utils class
  • REFACTOR: WPO_Webp_Task_Manager class
  • REFACTOR: WP_Optimize_WebP class
  • REFACTOR: WP_Optimize_WebP_Images class
  • TWEAK: Added an additional check to prevent SplFileInfo::getSize() RuntimeException in WP_Optimize_Utils::get_folder_stats()
  • TWEAK: All in One SEO plugin compatibility issue
  • TWEAK: Cache – Inconsistent REST cache filenames due to query parameter order
  • TWEAK: Cache – Set the purge old cache cron schedule based on the Cache lifespan setting
  • TWEAK: Ensure parsed result is an array in WPO_DB_Table_Analysis::get_query_table()
  • TWEAK: Exclude GIF from being converted to WebP with wpo_webp_convert_compressed_images cron job
  • TWEAK: Optimized wpo_username_from_cookies() to avoid repeated database queries per request
  • TWEAK: Precheck for existing WebP format of file before running WebP conversion
  • TWEAK: Remove redundant code that is not reachable.
  • TWEAK: Resolved edge cases in CapoJS

4.5.3 – 29/Apr/2026

  • SECURITY: Prevented path traversal security risk. Thanks to Wordfence for the responsible disclosure

4.5.2 – 20/Apr/2026

  • FIX: Bug preg_match() fails on wildcard * patterns in browser agents exclusion list
  • FIX: Cache – purge the cache when a plugin is auto-updated
  • FIX: Ensure page caching is fully disabled by updating internal cache configuration to prevent constant-related errors in logs
  • FIX: Premium – Unused images – Fixed an issue where multiple unused images were displayed for an edited image on setups where images are not stored in /yyyy/mm folders
  • FIX: Minify – The cron job to purge old cache files is not created
  • REFACTOR: Instead of nested output buffering, code make use of single buffer using Page Optimizer class
  • REFACTOR: Refactor Updraft_Smush_Manager::update_smush_options() method
  • REFACTOR: Using ABSPATH to prevent direct access instead of plugin constants to comply with PCP
  • TWEAK: Added a safety check to remove scheduled table optimization cron jobs when the server does not allow table optimization
  • TWEAK: Enhanced database table detection by marking the KD Submissions database table as used by Elementor Pro
  • TWEAK: Fixed a UI issue with WebP conversion in the Media Library
  • TWEAK: Handle WP_Error in WPO_Page_Cache::enable() callers
  • TWEAK: Initialize Heartbeat only on admin pages
  • TWEAK: Premium – Preload only selected URLs in the “Cache Specific URLs Only” setting
  • TWEAK: Premium – Smush – Improved PHP 8.5 compatibility by replacing deprecated $http_response_header usage
  • TWEAK: Updated user agent for the cache preloader

4.5.1 – 23/Mar/2026

  • FIX: Fixed compatibility issue with WP Remote
  • FIX: Notice: Function _load_textdomain_just_in_time was called incorrectly
  • FIX: Resolved weekly cron not running on WordPress < 5.4 by switching to the wpo_weekly schedule
  • FIX: Database table error when upgrading from free to premium version
  • REFACTOR: Improved WebP conversion flow by separating capability checks from configuration changes
  • REFACTOR: Improved auto-optimization handling by correcting static method usage
  • REFACTOR: Introduced WP_Optimize_Server_Compatibility class to centralize all server environment checks
  • REFACTOR: Removed separate get_schedule_types() method in premium version
  • SECURITY: Enforced capability checks and allowed-command validation for Smush actions triggered via Heartbeat API. Thanks to WordFence for the responsible disclosure
  • TWEAK: Display the Enable the caching menu in the admin bar option only when Cache or Minify is enabled
  • TWEAK: Improved detection of LearnDash plugin tables
  • TWEAK: Improved onboarding wizard RTL support and eliminated dependency on the PHP Reflection class
  • TWEAK: Improved robustness of uploads/wpo directory removal during plugin uninstallation
  • TWEAK: Minify – Don’t remove the version query argument when the source is not processed by Minify
  • TWEAK: Premium – Unused Images – Enhanced detection of edited WordPress images
  • TWEAK: Prevent deprecation notices in PHP 8.5
  • TWEAK: Add a notice when .htaccess file is not available or renamed in Apache servers

4.5.0 – 11/Feb/2026

  • FEATURE: Premium – Cache – Added ability to cache only selected URLs
  • FEATURE: Premium – Minify – Host Google Fonts locally
  • FEATURE: Premium – Option to enhance page performance by applying Capo.js rules
  • FIX: Cache – fixed sitemap caching issue
  • FIX: Improved compatibility with WordPress versions earlier than 6.1
  • FIX: Reset WebP conversion failure no longer appears in the popup
  • FIX: Resolved issues with detecting WebP conversion availability
  • FIX: Smush – Fixed missing tooltip in the ‘Compress’ pop-up in Media Library
  • FIX: Stop initialization of page optimizer for non-HTML requests
  • FIX: Remove marcusschwarz/lessc lib from autoload
  • TWEAK: Added support for bypassing WPO features via a URL query parameter defined by the WPO_DISABLE_MODE_URL_PARAM constant
  • TWEAK: Allow some database records cleanup for Kinsta users
  • TWEAK: Clear cache of archived pages when a related post is updated
  • TWEAK: Disabled CSS/JS merging by default.
  • TWEAK: Enhanced 404 detector compatibility with plain permalinks
  • TWEAK: WP_Optimize_Options::auto_option_settings() is not called in Premium version
  • TWEAK: Improved timestamp handling to prevent fatal errors on WordPress 4.9
  • TWEAK: Improved Minify settings UI so JavaScript options correctly show/hide when JS minification is enabled/disabled

4.4.1 – 08/Jan/2026

  • FIX: Onboarding wizard RTL issue
  • FIX: Prevented plugin table JSON data in the uploads directory from being updated on every WP-Optimize admin page load

4.4.0 – 12/Dec/2025

  • FEATURE: Added Onboarding Wizard
  • FIX: Ensured old cache purging cron job is scheduled successfully
  • FIX: Fixed a potential fatal error in the WPO_Page_Optimizer class
  • TWEAK: Fixed the ability to disable caching menu in admin bar
  • TWEAK: Updated file permissions for wpo-plugins-tables-list.json

4.3.1 – 14/Nov/2025

  • FIX: Prevent PHP fatal error occurring when cache is enabled and the “Aelia Currency Switcher for WooCommerce” plugin is active
  • FIX: Cache – Fixed compatibility issue
  • FIX: Database – Table Usage – Fixed the issue with incorrect table name detection in certain cases
  • FIX: Fixed UI Issue – Content cut off in “Review Actions” modal under WP-Optimize > Database
  • FIX: Fixed _load_textdomain_just_in_time trigger too early
  • FIX: Premium – Unused images – Fixed an issue with clearing the cache of unused images
  • FIX: Smush – Compressing an image larger than the reSmush.it service limit freezes the popup in the Media Library
  • FIX: Smush – Fixed issue with multiple images compression action
  • FIX: Undefined property: stdClass::$plugin_status bug fixed
  • REFACTOR: Database – Table Usage – enhanced variable names
  • REFACTOR: Using strict comparison throughout the codebase
  • TWEAK: Improve detection of cloudflare handling browser cache
  • TWEAK: Added validation for AJAX commands in the Premium version
  • TWEAK: Convert already compressed images to webp format when possible
  • TWEAK: Fix the compatibility issue with ALTCHA when using the ASE Pro Plugin
  • TWEAK: Improve browser caching by adding max-age option
  • TWEAK: Premium – Cache – Do not process the cache when the user cannot be identified
  • TWEAK: Premium – Database – Tables usage report shows data only for active plugins
  • TWEAK: Premium – Unused Images – Enhanced detection for Revolution Slider
  • TWEAK: Premium – Unused Images – Improved detection of unused images in Oxygen Builder
  • TWEAK: Premium – Unused Images – Recognize Oxygen 6 images
  • TWEAK: Premium – Prevent PHP warnings from Table Usage feature
  • TWEAK: Remove unused jQuery 1.12.4 dependency
  • TWEAK: Run database table optimization last
  • TWEAK: Updated links
  • TWEAK: Various tweaks and improvements to code

4.3.0 – 22/Sep/2025

  • FEATURE: Premium – Cache – Cache REST API requests
  • FEATURE: Premium – Further reduce CSS files sizes by removing unused CSS rules
  • FIX: Added backward compatibility for timezone and datetime functions and improved status report support for older WordPress versions like 4.9.
  • FIX: PHP Warning file_exists(): open_basedir restriction in effect
  • FIX: Prevented buffer initialization during wp-cron when HTML DOM is unavailable.
  • REFACTOR: Database – Table Usage – Refactored execute_query_analysis() function
  • TWEAK: Added new UpdraftCentral endpoints
  • TWEAK: Enhanced multisite support: added performance widget to Network Dashboard and fixed sub-site widgets to show only site-specific 404 request counts.
  • TWEAK: Fix external loading of Gtag analytics script
  • TWEAK: Moved the tooltip tag outside the tag
  • TWEAK: Performance – 404 Detector (Not Found Requests) added a button to clear all logs.
  • TWEAK: Publishing a post or custom post type (CPT) no longer clears the cache of all posts of the same type.
  • TWEAK: Removed return statements from constructors and added checks at the point of class instantiation.
  • TWEAK: Smush – Enhanced compatibility and performance with EWWW Image Optimizer installed
  • TWEAK: Premium – Added cache support for Nelio A/B Testing plugin
  • TWEAK: Added a hook to trigger custom code when a page is not cached

4.2.4 – 30/Jul/2025

  • FIX: Potential PHP fatal error when no site is selected during database optimization in multisite
  • FIX: Issue where the database optimization spinner remained indefinitely active
  • FIX: PHP 8.4 compatibility warnings
  • FIX: Minify default exclusions fatal error
  • FIX: Premium – Potential PHP fatal error – type hinting error in the database table usage feature
  • FIX: Premium – Page cache and lazy load meta boxes no longer display on post edit screen when their respective options are disabled
  • FIX: Only purge relevant files when a published post is saved; also purge the author archive cache upon post save
  • FIX: Premium – Fixed compatibility of Table usage with WordPress versions earlier than 5.3
  • REFACTOR: Premium – Database – Table Usage – added missed translation functions
  • TWEAK: Purged content will preload only when cache is enabled, and the user-agent has been updated to a modern browser and OS version
  • TWEAK: Update seasonal advert banner logos, texts and links
  • TWEAK: Update plugin readme text and links
  • TWEAK: Premium – Cache – Add UI element to ignore query variables
  • TWEAK: Premium – Database – Table Usage – replaced loading state with native modal
  • TWEAK: Removed seasonal discount ads except Black Friday

4.2.3 – 15/Jul/2025

  • FIX: Cache – Resolved PHP warning caused by excessively long cache file names
  • FIX: Corrected typo from meta data to metadata
  • FIX: Cron reschedule event error for hook wpo_prune_404_log when is_minimum_requirement_met is false
  • FIX: Premium – Fixed a rare PHP warning that could occur when saving a post
  • FIX: Unused image – incorrect image filtering in multisite
  • FIX: WP Remote sync conflict caused in v4.2.1 and v4.2.2 By replacing wp_salt with core PHP functions
  • FIX: YouTube lazy-load – Thumbnail image now falls back to JPG if browser doesn’t support WebP
  • FIX: WebP images were not being served in Firefox on certain environments
  • TWEAK: 404 detector logs URLs on mobile screens goes out of viewport fixed.
  • TWEAK: CSS Improvements, better font size handling, remove duplication, and SASS instead of import
  • TWEAK: Delay YouTube preview image cache purging
  • TWEAK: Display notice when server does not allow database optimizations
  • TWEAK: Enhanced database optimization compatibility with jQuery 4
  • TWEAK: Fixed incorrect transients count in database optimizations UI
  • TWEAK: Improved sanitization of incoming data in Updraft_Smush_Manager_Commands
  • TWEAK: Minify – Improved compatibility with Divi theme’s dynamically generated assets
  • TWEAK: Multisite corrected site count in database optimizations UI.
  • TWEAK: Preserve EXIF data is set to false by default in all places at codebase level.
  • TWEAK: Update URLs of links and images to point to https://teamupdraft.com

4.2.2 – 02/June/2025

  • FIX: Cache – Resolved unwanted output in WP-CLI and fatal error related to WooCommerce’s country-specific files, introduced in v4.2.0
  • TWEAK: Premium – Cache – Compatibility with WordPress 6.8

4.2.1 – 05/May/2025

  • FIX: Cache – Compatibility issue with other plugins due to late start of output buffering
  • TWEAK: Improved array handling in get_active_plugins(), potentially avoiding edge-case fatal error

4.2.0 – 01/May/2025

  • SECURITY: On multisite installs (only), a logged-in site administrator could use an unsanitised parameter to inject unwanted content into SQL queries. Thanks to Marc Montpas for the responsible disclosure.
  • FEATURE: Premium – Replace YouTube Iframes with preview images to improve page speed
  • FIX: Fix conflict with the WPML plugin
  • FIX: Smush – Fixed PHP warning on the Media Library page
  • FIX: Smush – Fixed issue where the Smush popup would freeze
  • FIX: WebP images not served after WP-Optimize reactivation
  • REFACTOR: Smush option removed from media upload modal
  • TWEAK: Update advert banner logos, texts and links
  • TWEAK: Add missing separator between compression items in media library
  • TWEAK: Avoid PHP warning thrown by Page Speed Ninja plugin
  • TWEAK: Cache – Start caching after plugins loaded
  • TWEAK: Fix PHP deprecation warning in PHPSQLParser for PHP 8.4
  • TWEAK: Fix deprecation warning in Updraft_Logger class for PHP 8.4
  • TWEAK: Fixes absence of checkbox to remove all transients
  • TWEAK: Premium – Support and feedback links in Help tab now point to getwpo.com

4.1.1 – 05/Mar/2025

  • FIX: Page builders not working with Delay JS option enabled

4.1.0 – 03/Mar/2025

  • FEATURE: Premium – Improve performance by caching Gravatar images locally.
  • FIX: Premium – Unused images – Fixed warnings when moving non existing image to trash

4.0.1 – 17/Feb/2025

  • FIX: File system usage issue

4.0.0 – 10/Feb/2025

  • FEATURE: Delay JavaScript execution
  • FIX: Cache – Fixed PHP warning “Cannot modify header information”
  • FIX: Minify – Unusual behavior occurs when the “Disable Google Fonts processing” option is enabled
  • FIX: Smush – Fixed image compression actions in Media Library
  • REFACTOR: Replacing jQuery Tablesorter with ‘sortable-tablesort’ package
  • TWEAK: Cache – Enhance ActivityPub compatibility
  • TWEAK: Fix PHP notice caused by subscriben plugin advert
  • TWEAK: Minimum requirements were updated to PHP version 7.2 and WordPress version 4.9
  • TWEAK: Remove uses of unserialize without restriction of allowed_classes
  • TWEAK: Recognise Independent Analytics Pro plugin tables in database optimization

3.8.0 – 09/Dec/2024

  • FEATURE: Added a system status page
  • FEATURE: Logs frequent and highly recurrent 404 requests; introduces a new Performance tab.
  • FIX: Cache – Legacy Widgets visibility issue with WP-Optimize Cache enabled
  • FIX: Cache – UI issue: Preload “Cancel” option is gone after reloading the WPO settings page instantly
  • FIX: Database – optimizing any item also changes the status of other items
  • REFACTOR: Minify – Removal of the WPO_MINIFY_PHP_VERSION_MET constant
  • TWEAK: Add a warning message before deleting post metadata or orphaned relationship data.
  • TWEAK: Bailout early if the minimum PHP version is not met
  • TWEAK: Introduced logging for cache purge operations, available under uploads/wpo/logs/cache-*.log
  • TWEAK: Open CRON overdue guide in new tab
  • TWEAK: Persist Analytics Tab when minification is disabled
  • TWEAK: Premium – Unused Images – Improved detection of images not present in the Media Library, marking them as used
  • TWEAK: UI improvements in Analytics section
  • TWEAK: Wrapped checkboxes inside label tags in the confirmation popup that appears when clicking the “Remove” button on the Database > Tables tab.

3.7.1 – 20/Nov/2024

  • TWEAK: Resolved a PHP notice caused by translation loading too early when caching is enabled, introduced in WordPress 6.7

3.7.0 – 21/Oct/2024

  • FEATURE: Added an option to automatically preload URLs immediately after cache content is purged
  • FEATURE: Premium – Gather data about table usage by filtering query event
  • FIX: Cache – Scheduled preloading wasn’t working
  • FIX: Inconsistency in smush_manager_send_command function
  • REFACTOR: Smush – Popup styles, remove unused code
  • TWEAK: Fix fatal implode error when updating to v3.5.0
  • TWEAK: Image compression – Issue with cancelling smush image compression
  • TWEAK: Improve module minification logic
  • TWEAK: Premium – Unused images – Fixed popup when moving images to or restoring images from the trash
  • TWEAK: Premium – Unused images – Placeholder images in unused images section
  • TWEAK: Added security.md file with information to report security issues

3.6.0 – 12/Sep/2024

  • FEATURE: Premium – Auto-detect images lacking dimension attributes and add them to improve CLS
  • FIX: Fixed the issue that disabled WebP conversion due to checking all shell commands for WebP compression
  • FIX: Premium – Unused Images – The unused image size deletion functionality does not work when images are not in the /yyyy/mm/ folder
  • REFACTOR: Removed unnecessary static methods in WebP class
  • TWEAK: Image compression – Rolled back to using popup error notices as in versions prior to 3.4.0
  • TWEAK: Added a more descriptive error with resolution proposals for failed gzip compression and browser cache tests
  • TWEAK: Fix broken unused image list thumbnails and download as csv link in Multisite
  • TWEAK: Fix the singleton pattern in Heartbeat class
  • TWEAK: Image compression functionality added to the Media Library page
  • TWEAK: Premium – Cache – Added support for Aelia Currency Switcher plugin
  • TWEAK: Premium – Unused images – improve clarity in UI for images in post revisions
  • TWEAK: Added additional checks to the implode() function to mitigate the risk of fatal errors on certain instances

3.5.0 – 14/Aug/2024

  • FEATURE: Premium – Host Google and minimal analytics scripts locally
  • FIX: Premium – Cache – Single page cache purge/preload feature isn’t working
  • TWEAK: Add logging for the WebP feature
  • TWEAK: Allow minification of script modules
  • TWEAK: Cache – Purge the cache when the site is migrated
  • TWEAK: Improvements to asset minification cache logic
  • TWEAK: Improvements to reSmushIt curl error message
  • TWEAK: Minify – Added an option to disable Google Fonts processing when it causes conflicts with other plugins
  • TWEAK: Move all WPO files from the uploads folder to uploads/wpo
  • TWEAK: Style improvement of the loading modals

3.4.2 – 03/Jul/2024

  • FIX: Removes unnecessary heartbeat calls for retrieving information about images

3.4.1 – 26/Jun/2024

  • FIX: Issue with bulk editing on the posts and pages edit screen

3.4.0 – 25/Jun/2024

  • FEATURE: Premium – Smush – Bulk compress / restore from media library
  • FIX: Deactivate the form for minifying JS/CSS settings when the corresponding option is disabled
  • REFACTOR: The functionality for the ‘Unused Images’ feature in ACF has been moved to a separate class
  • TWEAK: Add UpdraftCentral commands for the latest WP-Optimize features
  • TWEAK: Adjusted the scheduled preload time for improved performance
  • TWEAK: Auto-update advanced-cache.php settings during site migration
  • TWEAK: Cache – Human-readable file names for the cache directory
  • TWEAK: Caching related cron jobs are activated even though cache is disabled
  • TWEAK: Image compression – Updated message for restoring images action
  • TWEAK: Implement Heartbeat API for image compression progress updates
  • TWEAK: Improving vendor autoload
  • TWEAK: Introduces a hook (wpo_force_webp_serve_using_altered_html) for changing WebP serving method
  • TWEAK: Minify – Exclude .min files from minification
  • TWEAK: Minify – Improve list of processed files UI
  • TWEAK: Optimization of the get_uncompressed_image query
  • TWEAK: Persist script loading strategy when minifying JS files
  • TWEAK: Premium – Compatibility with Curcy WooCommerce multi currency plugin
  • TWEAK: Premium – Unused Images – Added an option to delete original images when scaled versions exist

3.3.2 – 16/Apr/2024

  • FIX: Ensure the admin bar is not cached when caching is enabled for both logged-in and guest users
  • REFACTOR: Remove unused code
  • TWEAK: Cache – Prevent sitemaps being cached
  • TWEAK: Display a notice when static browser cache is enabled but not working
  • TWEAK: Premium – Added “Lost your password?” link on plugin’s page
  • TWEAK: Premium – Unused images – Detect Elementor’s ‘Video’ widget’s image
  • TWEAK: Recognise Rank Math plugin tables as used in database optimization
  • TWEAK: Reduce .htaccess file write operations when WebP is enabled
  • TWEAK: Seasonal notice content update for 2024
  • TWEAK: Unused Images – Unused tab displays multiple images for compressed images with WebP Conversion
  • TWEAK: Prevent multiple AJAX requests being generated by repeated clicks on the “Purge Cache” button
  • TWEAK: Call the litespeed_finish_request() function when attempting to close browser connection on LiteSpeed servers

See changelog for all versions.