如何用Cloudfront在Wordpress前端部署CDN,提供缓存加速和SSL卸载,类似的文章很多,不再赘述。

不过一动手就踩坑无数,首先陷入无限重定向地狱,然后无法登录后台,然后发现古腾堡编辑器不能用。

连滚带爬,终于搞定。过程不堪回首,不想写了。

主要参考以下文章:

https://taylor.callsen.me/settings-up-aws-cloudfront-in-front-of-wordpress/

https://itnext.io/how-configure-a-wordpress-site-with-lightsail-using-cloudfront-and-route-53-c52ce5719b82

https://gist.github.com/vastus/3242017a12f9277bc1b2ede13d1c46a1

有一点要注意,操作中要时不时让Cloudfront缓存失效一下,还要随时清空本机浏览器缓存,否则你会发现改了白改。

搞定难题,小小庆祝一下。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注