AWS 官方推出 WordPress 整合套件

AWS 自己推出了跟 WordPress 的整合套件:「Accelerating WordPress with CloudFront using the AWS for WordPress Plugin」、「AWS for WordPress plugin now available and with new Amazon CloudFront workflow」。

這次的套件主要是將 Amazon CloudFront 整合進 WordPress:

Amazon Web Services announces the general availability of the AWS for WordPress plugin. Previously known as the Amazon Polly and Amazon AI plugin, the new AWS for WordPress plugin now provides a workflow to configure an Amazon CloudFront distribution that is highly optimized for WordPress websites.

如果想要都控制在自己手上,AWS 算是提供了一個官方的方案,也應該有一定的支援。不過大多數人還是會拿 Cloudflare 的免費方案吧...

換到 PHP 7.3

上次是 2018 年五月把 PHP 換到 7.2 (參考「把 Blog 換成 PHP 7.2」),這次是在整理機器時發現 blog 這台機器還在跑 7.2,就更新一下系統把上面的站台都換到 7.3。

蠻多人都測過效能了 (像是「The Definitive PHP 5.6, 7.0, 7.1, 7.2 & 7.3 Benchmarks (2019)」),目前看到的資料都會快一些,應該是沒有太大問題,之後可以考慮再把 OPcache 的可用空間大小再降一些 (預設是 128 MB,但用 opcache-status 看起來只用了 65 MB 左右),把記憶體空間讓給其他程式用...

不過 7.4 也快出了...

Automattic (WordPress.com 的公司) 買下 Tumblr

Verizon 一直在把 Yahoo! 手上比較有價值的資產賣掉,總算是輪到 Tumblr 了,這次是賣給了 Automattic,也就是 WordPress.com 營運的公司。

Verizon 已經發新聞稿了:「Verizon Media announces sale of Tumblr to Automattic」,Tumblr 的 staff blog 上也發表了:「Hello Tumblr ? Today, Tumblr’s owner, Verizon...」,但 Automattic 這邊還沒看到:「Features, news, and more: See what’s been going on in Automattic’s world.」。

金額不確定多少,但感覺應該算是好事?不知道之前的 porn content 會不會回流...

補上 WordPress 編輯器的 accesskey

WordPress 編輯文章時我還是習慣用傳統編輯界面自己修改主要的 html tag,像是這樣:

上面那些按鈕在很久以前的版本透過 accesskey 用鍵盤快速輸入各種連結與效果,但後來就被拿掉了... 不過可以在「Adding WordPress Custom QuickTags」這邊看到一些文章有提到過。

研究了一下 WordPress 的 minimal plugin 有哪些東西,看起來也不難寫,就花了些時間用 js 操作,這樣編輯起來方便多了... 程式包起來放到 gslin/wp-editor-accesskey 上,有需要的也可以拿去用,不過我猜現在還這樣寫文章的人不多了...

WordPress 5.0 的編輯界面大改...

WordPress 升級到 5.0 後發現完全不會用新的編輯器了 (我是自己編 html 習慣了),去官方的 forum 上看一下有沒有其他人抱怨 (以及解法),看到「READ THIS FIRST WordPress 5.0 Master List」這篇公告。

公告裡提到可以裝「Classic Editor」這個 plugin 把舊的 editor 弄回來寫文章,而且這個 plugin 至少維護到 2022 年:

Classic Editor is an official WordPress plugin, and will be maintained until at least 2022.

本來打算要 downgrade 回舊版... 目前看起來還可以撐一段時間。

WordPress 在 Internet 上的情況

WordPress 在 Internet 有很大的佔有率,在「Usage statistics and market share of WordPress for websites」這邊有一直更新的資料,現在是:

WordPress is used by 59.9% of all the websites whose content management system we know. This is 29.1% of all websites.

這數字可以參考看看。而在「State of the WordPress ecosystem」這邊就看到有人在分析 WordPress 在整個 Internet 上的情況。可以看到裡面有蠻多都是透過 BigQuery 分析出來的...

在分析整個頁面的平均下載量時,可以看到 WordPress 的頁面比較肥:

We get 1590 KB for wordpress=false and 1897 KB for wordpress=true.

但是在 WordPress 上未最佳化的圖片比較少,原文裡猜測是歸功於 plugin 的關係:

@amedina I wonder if this has to do with the availability of tools/plugins in the WordPress ecosystem that optimize images effortlessly, as opposed to other web development pipelines that require manual image optimization or installation of specialized tools.

所以就跑去分析了 WordPress 上使用了哪些 plugin,不過這是看 web request 以及 path 得到的,如果 plugin 是純粹在內部執行的話就看不到了:

整個分析還蠻有趣的,而且還在進行...

看完 AWS 給的 WordPress + CloudFront 指南後...

我覺得還是用 Cloudflare 比較實際... (寫了那麼長,有種負面教材的感覺 XDDD)

AWS 的原文在「How to accelerate your WordPress site with Amazon CloudFront」這邊可以看到。

對照 Cloudflare 的說明:「Using Cloudflare with WordPress」,除了長度外,可以看到一堆設定都包好了:

然後提到比較現實的,Cloudflare 把 domain 掛上去就有不用錢的方案,hmmm...

大型 WordPress 站台會用到的 LudicrousDB (以及 HyperDB)

最近收到 HyperDB 的 mailing list 信件 (開頭是「[HyperDB] How can I set up HyperDB with latest version.」這封),有人提到 HyperDB 很久沒更新了... 結果在信理看到有人回了「stuttter/ludicrousdb」這個專案:

LudicrousDB is an advanced database interface for WordPress that supports replication, failover, load balancing, & partitioning

兩個專案都是抽換掉 WordPress 在處理 database 的 library,然後希望自己控制 master/slave 的讀寫分離以及各機房之間的處理 (還有 replication lag),而不要靠 ProxySQL 這類工具來做 (以時間來看,當初他們發展這些工具時,ProxySQL 這類的方案也還不夠成熟,大家都不會想要選這個方向...)。

先記錄下來,如果之後有遇到時可以當作是一個選項...

Matt Mullenweg 決定對 React 的專利議題投下反對票

React 的專利問題繼續燒... (可以參考「React 的專利授權議題」,不過陸陸續續還有發生一些事情沒寫...)

Facebook 表態他們不會修改 React 的條款後,Matt Mullenweg (WordPress 的共同創造人,以及 WordPress.com 現在的老大) 直接宣佈了 Gutenberg (WordPress 新的 editor) 將全面停用 React 改用新的 library 開發:

[...] I'm here to say that the Gutenberg team is going to take a step back and rewrite Gutenberg using a different library. It will likely delay Gutenberg at least a few weeks, and may push the release into next year.

算是相當大的一個決策改變...

這件事情剛好讓人想到當年 MovableType 因為 license 問題而失勢 (而讓 WordPress 長起來),究竟 React 會不會逐漸被取代呢...