自行搭建php运行环境(如果你是小白,且是windows系统,我推荐使用xampp)
1.准备工作
1.自行搭建php运行环境(如果你是小白,且是windows系统,我推荐使用xampp)
2.下载wordpress
3.下载SQLite Integration 插件
2.安装wordpress
解压下载的wordpress压缩包到php 运行目录(我拿xampp为例目录是在xampp安装目录下的htdocs目录)
将目录下的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\

找到db.php

复制到到wordpress安装目录下的wp-content目录中

3.运行并配置博客
如果你还未运行apache服务器 那就请先运行
浏览器访问网站比如:http://127.0.0.1:8080/
根据页面显示填写完整信息后点击底下安装

配置完成后会自动进入管理员界面

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

网友评论