WordPress我回来辣!

如题,懒得折腾了,还想搞静态的话可以在GitHub Pages玩玩,看我有没有这个兴致吧,前端真是太坑爹了(Drag and Drop大法好)。

顺便为了测试插件,随便贴点代码上来……

首先

mkdir /the/path/to/my/php/files/
cd /the/path/to/your/php/files/
chown -R www:www .
systemctl restart nginx
systemctl start mysql
mysql -u root -p

然后

CREATE USER xr1s@localhost IDENTIFIED BY 'your password';
CREATE DATABASE `xr1s.me`;
GRANT ALL PRIVILEGES ON `xr1s.me` TO xr1s@localhost;

再配置一下解析

upstream php {
        server unix:/run/php/php7.0-fpm.sock;
}

server {

  server_name domain.tld;

  listen 80 default_server;
  listen [::]:80 default_server;

  root /the/path/to/your/php/files/;
  index index.php;


    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include fastcgi.conf;
        fastcgi_intercept_errors on;
        fastcgi_pass php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }

}

Copy and paste WordPress的推荐配置。

赞一波WordPress光速建站。这WordPress的高亮永远配不好,先这样吧。

2 thoughts on “WordPress我回来辣!

发表评论

电子邮件地址不会被公开。 必填项已用*标注