CentOS7.9 LAMP环境安装wordpress

2022/5/4 7:14:41

本文主要是介绍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

 



这篇关于CentOS7.9 LAMP环境安装wordpress的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程