由于去年在Ucloud上买的服务器快过期了,然后买的海外域名也要没了,考虑到续费成本太高了,所以就把博客迁到了国内服务器上

顺便记录一下中间碰到的几个小问题

目录权限

WordPress迁入到目标服务器之后需要把网站根目录及根目录下所有的文件改权限777

替换域名

UPDATE wp_options SET option_value = REPLACE(option_value, 'xiamoqwq.org', 'xiamoqwq.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET post_content = REPLACE(post_content, 'xiamoqwq.org' , 'xiamoqwq.com');

UPDATE wp_posts SET guid = REPLACE(guid, 'xiamoqwq.org' ,'xiamoqwq.com');

Nginx下出现404

解决办法:在配置文件中加入

    location / {
      if (-f $request_filename/index.html){
          rewrite (.*) $1/index.html break;
      }
      if (-f $request_filename/index.php){
          rewrite (.*) $1/index.php;
      }
      if (!-f $request_filename){
          rewrite (.*) /index.php;
      }
    }


Ex - ploooosion!