简体   繁体   中英

How can I update PHP in Google Compute Engine from 5.6?

THere's a complete lack of information about Google Compute Engine and upgrading PHP Versions (it all seems to refer to App Engine).

Anyway, I'm running a Wordpress install on php 5.6, and need to upgrade to 7.3.

I can confirm this in the console by php -v returning 5.6.17-0+deb8u1 (cli) (build: Jan 13 2016 09:10:12)

Are there any decent instructions or guidelines on how to properly update this to the latest version of PHP?

GCE offers you a virtual machine, so, in the end, to update your version to the latest of right now (7.3), you have to do as you would do with a normal system.

Since you are using Debian, you can find how to update to the latest PHP version here .

  1. Update your system with sudo apt upgrade -y
  2. Add the repository:

sudo apt -y install lsb-release apt-transport-https ca-certificates

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list

  1. Update and install PHP: sudo apt update && sudo apt -y install php7.3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM