我已經(jīng)使用 Google Cloud Platform (GCP) 一段時(shí)間了,現(xiàn)在我的大多數(shù) WordPress 網(wǎng)站都出現(xiàn)錯(cuò)誤,我需要更新我的 PHP我用了$ sudo apt install apt-transport-https lsb-release$ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg # Download the signing key$ sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' # Add Ondrej's repo to sources list.$ sudo apt update$ sudo apt-get install php7.3To check the current version after the installation:$ php -v它有效現(xiàn)在$ php -v顯示這個(gè) PHP 7.3.20-1+0~20200710.65+debian9~1.gbpc9cbeb (cli) (built: Jul 10 2020 07:22:47) ( NTS )Copyright (c) 1997-2018 The PHP GroupZend Engine v3.3.20, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.20-1+0~20200710.65+debian9~1.gbpc9cbeb, Copyright (c) 1999-2018, by Zend Technologies但是當(dāng)我去我的WordPress時(shí)它仍然顯示給我Running PHP version: 7.0.33-29+0~20200514.36+debian9~1.gbp126f6f我嘗試了多種方法,但沒(méi)有任何效果,例如sudo update-alternatives --set php /usr/bin/php7.3wp --info現(xiàn)在它顯示為OS: Linux 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64Shell: /bin/bashPHP binary: /usr/bin/php7.3PHP version: 7.3.20-1+0~20200710.65+debian9~1.gbpc9cbebphp.ini used: /etc/php/7.3/cli/php.iniWP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cliWP-CLI vendor dir: phar://wp-cli.phar/vendorWP_CLI phar path: /home/malriffaieWP-CLI packages dir:WP-CLI global config:WP-CLI project config:WP-CLI version: 2.4.0wordpress 仍然有同樣的問(wèn)題,我該怎么辦?
在谷歌云平臺(tái)上為wordpress選擇PHP版本
胡說(shuō)叔叔
2023-09-08 14:29:33