部署wordpress
部署wordpress
wordpress
使用rz先将事先准备好的wordpress上传到centos7上(因为我装的wordpress是5.3.2版本的,所以php必须要求5.6.20版本以上才能支持)
安装unzip,并将word press解压到/data/server下
yum -y install unzip
unzip wordpress-5.3.2.zip
mv wordpress /data/server/nginx/html/
cd wordpress/
mv * …/
然后修改配置文件
cd /data/server/nginx/html
cp wp-config-sample.php wp-config.php
vim wp-config.php
重启nginx
开启MySQL服务
mysql -u root -p
mysql>
创建wordpress的数据库
mysql> create database wordpress;
给wordpress创建用户并增加权限
mysql> grant all on wordpress.* to [email protected]‘localhost’ identified by ‘123’;
刷新权限
mysql> flush privileges;
访问IP