WARNING: This article may be obsolete
This post was published in 2021-08-29. Obviously, expired content is less useful to users if it has already pasted its expiration date.
This post was published in 2021-08-29. Obviously, expired content is less useful to users if it has already pasted its expiration date.
FastComet的shared web hosting性能略为糟糕,见:
对我个人而言,难以接受的主要还是wp-admin/*的性能,比如非常夸张的文章保存速度(长一点的文章可能要花5~6秒甚至更久)。
所以在FastComet到期一个月前,我把本站搬迁到了一台VPS上:
在FastComet上使用的是:
Apache+Mysql 5.7+php 7.4+没有OPcache+CloudFlare cache
在VPS上我改用了:
Nginx+MariaDB 10.5+php 7.4+OPcache+Nginx FastCGI (unix socket)
FastCGI用于缓存静态页面,一般而言有4种常见的缓存位置:
- 缓存在CDN上,比如我之前使用的CloudFlare Super Page Cache. 理论上这个是性能最好的,前提是CloudFlare能够100%忠实地缓存你提供给它的所有静态页面文件。
- 缓存在FastCGI里,直接由Nginx处理。
- 缓存在Redis里,可以使用插件https://github.com/pressjitsu/pj-page-cache-red . 要注意,这里的Redis cache缓存的是Full page,而不是mysql query,与后者相关的插件有:https://wordpress.org/plugins/redis-cache/ .
- 缓存在硬盘里,比如wp-rocket和一大堆最常见的wordpress cache插件。
*关于Nginx Fastcgi和Redis Full Page Cache的性能比较可以参考:
https://wp-rocket.me/blog/redis-full-page-cache-vs-nginx-fastcgi/
Last Modified in 2021-10-03