Day 1
一.wordpress的安装
1.服务器配置php7+mysql+apche
sudo apt-get update
2.下载php7及其插件 sudo apt-get install php7.0-fpm php7.0-mysql php7.0-common php7.0-mbstring php7.0-gd php7.0-json php7.0-cli php7.0-curl libapache2-mod-php7.0
3.下载apche sudo apt-get install apache2
4.下载mysql,并配置用户
sudo apt-get install mysql-server
5.检查php与apche,mysql是否安装完成
php -v,apche2 -v,mysql -u账号 -p密码
6.设置mysql远程连接
1.需要修改/etc/mysql/mysql.conf.d/mysqld.cnf 文件。
找到bind-address = 127.0.0.1这一行
改为bind-address = 0.0.0.0即可
2.在连接服务器后,操作mysql系统数据库
命令为: mysql -u root -p
use mysql;
3. 查询用户表命令:select User,authentication_string,Host from user;
创建可以访问的用户名即密码
GRANT ALL PRIVILEGES ON . TO ‘账号’@’%’ IDENTIFIED BY ‘密码’;
7.安装ftp
apt-get install vsftpd
配置文件 vi /etc/vsftpd.conf
write_enable=YES ,允许传输文件
8.用ftp把wordpress安装包传输到服务器上,/var/www/html/wordpress/
9.访问 http://www.lidianhong.com/wordpress/ ,根据提示安装,
$request_order = apply_filters( ‘http_api_transports’, $transports, $args, $url );
最好更改一下 wp-includes/class-http.php ,不然连不上外国服务器会报500错误,还要删除wp-config.php重新安装一遍
$request_order = apply_filters( ‘http_api_transports’, array( ‘curl’, ‘streams’ ), $args,$url );
把这条语句改为
$request_order = apply_filters( ‘http_api_transports’, array( ‘streams’ ), $args, $url );
所以如果您是国外的主机,一般不会出现这个问题,一般国内的主机,容易出现这种问题,
fiddler