Skip to content

换域名后 typecho 的设置,typecho 忘记密码.

  1. PhpAdmin 登录进去 或者其他方式进入数据库
  2. 进入 typecho 的数据库
  3. typecho_users password uid1
  4. uid1 的 password 改为e10adc3949ba59abbe56e057f20f883e
  5. 这时候密码就是123456

typecho 更换域名后修改文章和图片链接

UPDATE databases.typecho_options SET value = '新域名' WHERE typecho_options.name = 'siteUrl' AND typecho_options.user =0;

UPDATE typecho_contents SET text = REPLACE(text, '老域名', '新域名') WHERE INSTR(text,'老域名') > 0;

注释

  • databases 数据库名
  • typecho_options = 表名,有的人表头不一样,需要修改,如 abc_options
  • typecho_contents 同 typecho_options

typecho 添加文章 502

将 ngnix 配置 502 的页面改成 https://blog.wingblog.top/admin/manage-posts.php 管理页面

部署 typecho nginx 相关的配置

(1) 新建 enable-php-typecho.conf 内容如下:

location ~ .*\.php(\/.*)*$
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi-56.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf;
}

(2) 新建 typecho2.conf 内容如下:

location / {
    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php/$1 last;
   }
}

(3)在 nignx 的配置文件中添加

#PHP-INFO-START  PHP引用配置,可以注释或修改
# include enable-php-56.conf;
include typecho2.conf;
include enable-php-typecho.conf;