gpt4 book ai didi

php - 在 CentOS 6 上将 Vultr "One Click"Wordpress 升级到 PHP7

转载 作者:太空宇宙 更新时间:2023-11-03 17:24:00 28 4
gpt4 key购买 nike

尝试将 Vultr“一键式”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

最佳答案

好的,找到问题了!需要升级 php7 配置以更改用户和组。

sudo nano /etc/php-fpm.d/www.conf
user = nginx
group = nginx
service nginx restart && service php-fpm restart

关于php - 在 CentOS 6 上将 Vultr "One Click"Wordpress 升级到 PHP7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37626107/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com