Follow

发现自己思维误区了。为了配合 Mastodon 或 Pleroma,总想着如何把 Wordpress 从 MySQL 迁移到 PostgreSQL。——但其实完全可以用 SQLite 啊!对于偶尔才更新一篇的个人 blog 用户,用 SQLite 完全是可行的。这样就可以把数据库文件放在 wp-content 目录下面,不需要另外装数据库了。

以前 WP 官方的 SQLite Integration 插件,因为作者失联而停更。Github 上有分支,最新版的 wordpress 仍然支持,使用非常简单,移植到 docker 里也很容易:
github.com/aaemnnosttv/wp-sqli

这里有篇攻略:
learnwithdaniel.com/2019/06/wo
现有的 wp 站点,可以通过 Duplicator 之类的 wp 备份软件迁移,不需要进行数据库级别的转换操作。

建议使用时:
- 启用 wp-cache 插件,减少访客对数据库的读取;
- 尽量不要使用会每次写入数据库的流量统计插件如 WP Statistics.

对绝大多数个人 blog 而言(包括我),上述两点不考虑也没关系。

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Fivediverse

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!