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

 

相关文章

我想将wordpress的默认接口路由改掉,愿意是默认的带一个 wp...
wordpress自定义分类法之后,我看到链接都自动在后面添加了一...
事情是这样的,我用 get_post_type 函数创建了一个自定义分类...
最近网站莫名其妙的被顶上了,过一个多小时,就注册一个账号...
最近服务器要到期了,就想着把网站转移到另外一台服务器,本...
今天在写wordpress的接口,然后碰到个奇怪的问题,怎么访问都...