当前位置:Gxlcms > 数据库问题 > 怎么让wordpress用sqlite3 搭建轻量级博客系统

怎么让wordpress用sqlite3 搭建轻量级博客系统

时间:2021-07-01 10:21:17 帮助过:61人阅读

 1 server {
 2         listen  80;
 3         server_name www.herostore.cn;
 4         set $root_path ‘c:/laravel/‘;
 5         root $root_path;
 6 
 7         index index.php index.html index.htm;
 8 
 9         location / {
10             try_files $uri $uri/ /index.php?$query_string;
11         }
12 
13         location ~ \.php(.*)$  {
14             fastcgi_pass   127.0.0.1:9000;
15             fastcgi_index  index.php;
16             fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
17             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
18             fastcgi_param  PATH_INFO  $fastcgi_path_info;
19             fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
20             include        fastcgi_params;
21         }
22 
23         location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
24 
25         }
26 
27         location ~ /\.ht {
28             deny all;
29         }
30     }
 

5、将目录下的wp-config-sample.php复制粘贴一份重命名为wp-config.php

打开wp-config.php修改以下配置

原始文件:

// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
/** WordPress数据库的名称 */
define(‘DB_NAME‘, ‘database_name_here‘);

/** MySQL数据库用户名 */
define(‘DB_USER‘, ‘username_here‘);

/** MySQL数据库密码 */
define(‘DB_PASSWORD‘, ‘password_here‘);

/** MySQL主机 */
define(‘DB_HOST‘, ‘localhost‘);

/** 创建数据表时默认的文字编码 */
define(‘DB_CHARSET‘, ‘utf8‘);

/** 数据库整理类型。如不确定请勿更改 */
define(‘DB_COLLATE‘, ‘‘);


修改为:

// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
/** WordPress数据库的名称 */
define(‘DB_NAME‘, ‘MyBlog‘);//MyBlog<====这是数据库名,可以自定义

/** MySQL数据库用户名 */
define(‘DB_USER‘, ‘‘);

/** MySQL数据库密码 */
define(‘DB_PASSWORD‘, ‘‘);

/** MySQL主机 */
define(‘DB_HOST‘, ‘localhost‘);

/** 创建数据表时默认的文字编码 */
define(‘DB_CHARSET‘, ‘utf8‘);

/** 数据库整理类型。如不确定请勿更改 */
define(‘DB_COLLATE‘, ‘‘);
//define(‘WP_ALLOW_REPAIR‘, true);//数据库修复时使用
define(‘DB_TYPE‘, ‘sqlite‘);    //mysql or sqlite`
解压SQLite Integration到wordpress安装目录下wp-content\plugins\

6、找到db.php
复制到到wordpress安装目录下的wp-content目录中

7.运行并配置博客,开始你的wordpress博客之旅吧

    技术分享图片 示例

4.开始你的wordpress博客之旅吧

    默认主页


作者:关爱单身狗成长协会
链接:https://www.jianshu.com/p/59f4e3545bbd
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

怎么让wordpress用sqlite3 搭建轻量级博客系统

标签:down   复制粘贴   建设   use   tle   tps   手动   nginx   director   

人气教程排行