Debian11上安装WordPress
Xplorist Lv6

Debian11上安装WordPress

reference-site-list

steps

  • 环境准备:1. PHP 7.4以上 2. MySQL 5.6以上 3. Nginx

  • 在官网下载zip文件, 例如:wordpress-x.x.x.zip

  • 上传到服务器,并解压

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
apt-get update
apt-get install zip

cd /usr/share/nginx/html

# unzip -o -d /usr/share/nginx/html/wordpress wordpress-5.8.1.zip
unzip wordpress-5.8.1.zip

# 给wordpress文件夹添加读取权限
chmod -R 777 /usr/share/nginx/html/wordpress

cd /usr/share/nginx/html/wordpress/

# 复制wp-config-sample.php为wp-config.php
cp wp-config-sample.php wp-config.php

vi /usr/share/nginx/html/wordpress/wp-config.php

# wp-config.php开始
# 更改相关的数据库设置

# 以下设置是为了解决上传主题时需要FTP的问题
/* Add any custom values between this line and the "stop editing" line. */

define("FS_METHOD", "direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);
# wp-config.php结束

 评论