微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS7.9 LAMP环境安装wordpress

wordpress安装包上传到/var/www/html目录

解压缩

unzip wordpress-5.9.3-zh_CN.zip

cp -r wordpress/* ./

修改权限

chown -R apache:apache /var/www/html/*

chmod -R 755 /var/www/html/*

 

创建数据库

MysqL> create database wordpress;
Query OK, 1 row affected (0.01 sec)

 

MysqL> create user wordpress_user@localhost identified by 'Huawei@123';
Query OK, 0 rows affected (0.00 sec)

修改wordpress配置文件

vim wp-config.php

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for wordpress */
define( 'DB_NAME', 'wordpress' );

/** Database username */
define( 'DB_USER', 'wordpress_user' );

/** Database password */
define( 'DB_PASSWORD', 'Huawei@123' );

/** Database hostname */
define( 'DB_HOST', '192.168.10.82' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

 

重启httpd和MysqL

systemctl restart httpd

systemctl restart MysqLd

打开安装地址

打开:ip:端口/wp-admin/install.PHP

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐