4-安装workpress

it2022-05-27  77

安装wordpress 软件下载 https://cn.wordpress.org/releases/ 在mysql数据库中创建wordpress数据库 mysql> create database wordpress; Query OK, 1 row affected (0.04 sec) 解压wordpress软件包 [root@localhost htdocs]# tar -zxvf wordpress-4.4.2-zh_CN.tar.gz  [root@localhost htdocs]# ls index.html  test.php  wordpress [root@localhost wordpress]# cp wp-config-sample.php wp-config.php 配置文件wp-config.php // ** MySQL 设置 - 具体信息来自您正在使用的主机 ** // /** WordPress数据库的名称 */ define('DB_NAME', 'wordpress'); /** MySQL数据库用户名 */ define('DB_USER', 'root'); /** MySQL数据库密码  */define('DB_PASSWORD', 'endmoon'); /** MySQL主机  */define('DB_HOST', 'localhost'); /** 创建数据表时默认的文字编码  */define('DB_CHARSET', 'utf8'); 访问网页,进入安装界面 http://192.168.1.20/wordpress 注意:由于/usr/local/apache2/htdocs下面的wordpres为目录,所以这里需要修改一下apache的主配置文件,使得网页访问时可以自动识别index.html和index.php的网页文件 /etc/httpd/httpd.conf <IfModule dir_module>     DirectoryIndex index.html  index.php           </IfModule> 来自为知笔记(Wiz)

转载于:https://www.cnblogs.com/endmoon/p/5595412.html


最新回复(0)