准备工作
首先,先搭建完成基础的LAMP(可参照文章:华为云主机CentOS 7.3安装LAMP)环境,然后着手搭建wordpress个人博客。
cd /usr/local/apache2.4/htdocsrm -rf *
wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.zip
unzip wordpress-4.8.1-zh_CN.zip
cp -r wordpress/* .
rm -rf wordpress wordpress-4.8.1-zh_CN.zip
/usr/local/apache2.4/bin/apachectl graceful
配置数据库
[root@plinuxos local]# /usr/local/mysql/bin/mysql -uroot mysql -pEnter password: Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 12Server version: 5.6.35 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> create database blog;Query OK, 1 row affected (0.00 sec)mysql> grant all on blog.* to 'blog'@'127.0.0.1' identified by 'centoslinux';Query OK, 0 rows affected (0.00 sec)mysql> exitBye[root@plinuxos local]# /usr/local/mysql/bin/mysql -ublog -pcentoslinux -h127.0.0.1Warning: Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 13Server version: 5.6.35 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
配置Wordpress
1、登录网页
2、填写数据库信息
3、编辑wp-config.php文件,可以赋予写权限,也可以手动编辑。
4、填写博客相关信息
5、完成配置。
6、后台与前台
后台页面:
前台页面:
本文出自 “Gorilla City” 博客,请务必保留此出处http://juispan.blog.51cto.com/943137/1953782