系统相关
首页 > 系统相关> > CentOS7.9 LAMP环境安装wordpress

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

 

标签:Database,database,DB,CentOS7.9,LAMP,wordpress,mysql,define
来源: https://www.cnblogs.com/hailun1987/p/16218467.html