在lnmp上搭建wordpress

本文详细介绍如何在LNMP环境中部署Wordpress网站,包括下载Wordpress包、使用rz命令传送文件、安装unzip进行解压、移动文件至nginx目录、配置数据库及防火墙设置等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在lnmp上搭建wordpress

在lnmp安装完成后。
准备好已经下载完成的wordpress包。
进入xshell用rz命令传送到虚拟机中,查看。
[root@localhost ~]# ls
anaconda-ks.cfg wordpress-5.3.2.zip
zip文件解压需要用yum安装unzip。
[root@localhost ~]# yum -y install unzip
将其解压到/data/server/中。
[root@localhost ~]# unzip -n wordpress-5.3.2.zip -d /data/server/
进入查看wordpress文件是否存在。
[root@localhost server]# ls
libmcrypt-2.5.8 mysql mysql-5.6.19 nginx nginx-1.11.5 php php-7.2.0 wordpress
将wordpress文件移动到nginx下的html中。查看。
[root@localhost server]# mv wordpress/ /data/server/nginx/html/
[root@localhost server]# cd /data/server/nginx/html/
[root@localhost html]# ls
1.php 50x.html index.html wordpress
查看wordpress中的文件并将wp-config-sample.php改名。
[root@localhost wordpress]# cp wp-config-sample.php wp-config.php
编辑文件,按照图片修改,保存退出。
[root@localhost wordpress]# vi wp-config.php
在这里插入图片描述
创建mysql数据库。
[root@localhost wordpress]# mysql -uroot -p
在这里插入图片描述
关闭防火墙,启动服务,浏览器访问IP/wordpress。
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值