尝试升级Vultr" One Click" Wordpress到PHP7
https://www.vultr.com/docs/one-click-wordpress
sudo yum -y update
yum list installed php*
sudo yum -y remove php56u*
sudo yum -y install php70u-cli.x86_64 php70u-common.x86_64 php70u-fpm.x86_64 php70u-gd.x86_64 php70u-mbstring.x86_64 php70u-mcrypt.x86_64 php70u-mysqlnd.x86_64 php70u-opcache.x86_64 php70u-pdo.x86_64 php70u-pear.noarch php70u-process.x86_64 php70u-xml.x86_64 php70u-xmlrpc.x86_64
sudo chkconfig php-fpm on
service nginx restart && service php-fpm restart
php -v
以上似乎有效,但现在每次我更改内容时,wordpress都要求我提供FTP凭据。我已经检查了wordpress目录上的凭据,一切似乎都没问题!?
我错过了什么!?
cd /var/www/html
sudo chown nginx:nginx * -R
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
service nginx restart && service php-fpm restart
ls -l
给出下面的输出(我认为是正确的用户和组)。
-rw-r--r-- 1 nginx nginx 418 Sep 25 2013 index.php
-rw-r--r-- 1 nginx nginx 19935 Mar 5 20:14 license.txt
-rw-r--r-- 1 nginx nginx 7360 Apr 26 20:25 readme.html
-rw-r--r-- 1 nginx nginx 5032 Jan 28 03:35 wp-activate.php
drwxr-xr-x 9 nginx nginx 4096 May 6 18:33 wp-admin
-rw-r--r-- 1 nginx nginx 364 Dec 19 11:20 wp-blog-header.php
-rw-r--r-- 1 nginx nginx 1476 Jan 30 21:56 wp-comments-post.php
-rw-r--r-- 1 nginx nginx 1590 Jun 4 02:46 wp-config.php
-rw-r--r-- 1 nginx nginx 2853 Dec 16 09:58 wp-config-sample.php
drwxr-xr-x 6 nginx nginx 4096 Jun 4 02:49 wp-content
-rw-r--r-- 1 nginx nginx 3286 May 24 2015 wp-cron.php
drwxr-xr-x 16 nginx nginx 12288 May 6 18:33 wp-includes
-rw-r--r-- 1 nginx nginx 2380 Oct 24 2013 wp-links-opml.php
-rw-r--r-- 1 nginx nginx 3316 Nov 5 2015 wp-load.php
-rw-r--r-- 1 nginx nginx 33837 Mar 6 03:06 wp-login.php
-rw-r--r-- 1 nginx nginx 7887 Oct 6 2015 wp-mail.php
-rw-r--r-- 1 nginx nginx 13106 Feb 17 22:58 wp-settings.php
-rw-r--r-- 1 nginx nginx 28624 Jan 28 03:51 wp-signup.php
-rw-r--r-- 1 nginx nginx 4035 Nov 30 2014 wp-trackback.php
-rw-r--r-- 1 nginx nginx 3061 Oct 2 2015 xmlrpc.php
答案 0 :(得分:0)
sudo nano /etc/php-fpm.d/www.conf
user = nginx
group = nginx
service nginx restart && service php-fpm restart