银子弹

About industrial design engineering..

Category: 建站 web

WP 系列8: move domain from godaddy to cloudflare

Cloudflare is the next infrastructure of the internet domain, with more cutting edge technologies. Let’s embrace it. Export all the domain records from, you will get a .txt file Import into cloudflare. Switch the nameservers, enter the alternative nameservers into godaddy. Double Check Records No need to change anything at the beginning, but doule check […]

Read More

WP系列7: WP和Cloudflare合并的配置思路

两种方式, 今天咨询大佬朋友, flexible 的方式好像使用更多, 更简洁. wordpress 建站可以关注我的 WP系列. CF 灵活配置 + NGINX 仅处理 HTTP 需要安装 cloudflare 插件 nginx 的配置 仅需要 布置 server 和 listen 80 即可, 其他都是大同小异 CF 严格配置 + Nginx 自行跳转 HTTP 和处理 HTTPS 传统服务器处理 HTTP 和 HTTPS, 应该是 CF进行严格执行. 其中保持 HTTP 301 跳转到 HTTPS, 进行执行. 就比较负责 另外注意 修改完 NGINX配置以后, 老站点 可能要更新数据库 把 https […]

Read More

WP系列6: 配置gmail smtp 服务器发送邮件

采用 mutt 这个程序, 直接安装 配置 nano ~/.muttrc 中间可能会遇到 mutt SASL authentication failed 问题, 是配置问题. 可以按照下面我这个配置: 其中1234 4321 1234 4321 是开启2FA后, 我设置的 app passwords 的密码, 一般是 xxxx xxxx xxxx xxxx 形式 测试发送命令: 成功结果, 大概率会是在 SPAM里面.

Read More

WP系列5: SSL配置

目前和老板用的SSL安装连接的工具都是 let’s encrypt, 简称 letsencrypt. 其内核个人觉得是 openSSL, 在全部安装好的情况下, 可以用 openssl 尝试连接自己的网站. SSL的版本有 ssl1_0, ssl1_1, ssl1_2 和最新的 ssl1_3.

Read More

WP系列3: 域名解析, 和常用种类

A 记录, 直接指向 服务器Ip地址的. 常见用法有:  

Read More

WP系列2: upgrade PHP from 7.3 to 7.4 (most stable version)

first check which php version is most suitable for worpress, via this link: I will go for stable version 7.4, since 8.x is not fully compatible. check the current version of your server by cmd: php –version what I got here is: upgrade by common tutorials, but faced an error: To solve this problem, try […]

Read More

WP系列1: wordpress 手动更新并进行健康检查

如果自动更新失败, 手动更新的情况下 老规矩, 备份文件和数据库 旧的文件中只需要保留wp-config.php 和 wp-content 两个文件/文件夹 下载最新的文件, 这里 wordpress 下载 unzip 解压, 把旧文件 wp-config.php 和文件夹 wp-content 放到新文件夹, 并一起拷贝到老文件夹中. 执行数据库升级. 第二部分, 开始进行健康检查 site health 无法正常点击更新, 问题在于所有目录都是 Not Writable 的状态. 搜索发现一个简单的修改方式, 把所有的文件全部给 www-data 用户组和用户:

Read More

carbon forum 搬家过程

搬移carbon forum, ACME SSL加密, 安装nginx, php7.0, mysql 等。出现的问题和注意事项。 更新新版本的nginx 建立新站点的配置文件 关闭 brotli, debian 8 不支持,直接删除配置即可 Nginx 错误,php7.0-fpm permission denined 错误 Check php here: /etc/php/7.0/fpm/pool.d/www.conf user = nginx group = nginx 参考自 https://serverfault.com/questions/777994/permission-denied-for-fastcgi-pass-using-php7 Encrypt.conf 关闭多余m. example .com,这个会导致以下下载错误 ValueError: Wrote file to /srv/www/b. example .com/public_html/.well-known/acme-challenge/H7XUC20pnki5wGDZQP27xpoi5eMTnuk36oQAC_vaC6k, but couldn’t download http://m.example.com/.well-known/acme-challenge/H7XUC20pnki5wGDZQP27xpoi5eMTnuk36oQAC_vaC6k 修改carbon fourm的配置文件config.php 中的mysql credential 安装所有php7.0 的插件 sudo apt-get […]

Read More

Docker wordpress 的定期自动备份

删除所有现成的备份 执行mysqldump导出数据库命令 打包html scp传输两个文件到远程备份服务器的目录,同时使用工具sshpass 传递密码给scp命令,省事。 全部使用bash脚本,crontab -e 添加每12小时运行一次。 * 12 * * * /docker2/wp/2web/back.sh 搞定。

Read More

稍微解决一下docker WordPress的文件夹权限问题

今天升级插件发现,发现docker wp 无法创建文件夹,尝试几个办法都不行: 往docker-compose 添加privileged: true 没有效果 往docker-compose 添加user: “33:33” 也就是代表www-data:www-data也不行。。 最后发现 wp的项目文件夹是-v 映射到容器内的,给wp-content 增加权限可以解决,但是不知道安不安全,暂时先这样吧: chmod -R 777 wp-content 感觉还是不安全,改回来。。 chmod -R 755 wp-content 办法改为,进入wordpress 的container, 执行chown -R www-data:www-data /var/www/html 同时 wp-config 增加了一句:define(‘FS_METHOD’, ‘direct’);

Read More