wordpress+ftp服务器搭建笔记

https://cn.wordpress.org/ 下载wordpress安装包
apt-get 安装 php php-fpm php-mysql php-gd mysql-server
安装并注册mysql root账户
建立数据库 create database wordpress;
建立自己账户 CREATE USER ‘josh’@’localhost’ IDENTIFIED BY ‘123456’;
grant all on wordpress.* to josh@localhost identified by ‘123456’;
将wordpress安装包解压至/var/www/html/wordpress
开启权限 chmod -R 777 /var/www/html/wordpress
登录127.0.0.1登入配置网页进行安装
生成wp-config.php后
最后添加
define(“FS_METHOD”,”direct”);

define(“FS_CHMOD_DIR”, 0777);

define(“FS_CHMOD_FILE”, 0777);

插件Crayon Syntax Highlighter
WP Database Backup
jonradio Multiple Themes
主题 TwentySixteen
固定链接设定为 http://localhost/wordpress/index.php/%year%/%monthnum%/%postname%/

apt-get install vsftpd
/etc/vsftpd.conf 添加

anonymous_enable=NO #禁止匿名访问
local_enable=YES
write_enable =YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
allow_writeable_chroot=YES

useradd -d /var/www/http/ -s /bin/bash ftpuser
passwd ftpuser
usermod -a -G ftpuser josh
chown -R :ftpuser /var/www/http/
chmod -R 775 /var/www/http/
chmod -R 777 /var/www/http/wordpress/wp-content

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注