Skip to content

Instantly share code, notes, and snippets.

@bobwol
Created June 13, 2019 13:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bobwol/4166334bb79b90b00044b8e599843cc9 to your computer and use it in GitHub Desktop.
Save bobwol/4166334bb79b90b00044b8e599843cc9 to your computer and use it in GitHub Desktop.

How to install php7.3-fpm with EasyEngine (Ubuntu)


Add php7.3 repository

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Install php7.3-fpm

apt install php7.3-common php7.3-cli php7.3-zip php7.3-opcache php7.3-mysql php7.3-mbstring php7.3-json php7.3-intl php7.3-gd php7.3-fpm php7.3-curl php7.3-bz2 php7.3-bcmath php7.3-imap php7.3-recode php7.3-soap php7.3-xml php7.3-imagick php7.3-memcache php7.3-memcached php7.3-igbinary php7.3-msgpack php7.3-redis

Copy the php7.3-fpm pool configuration from php7.0-fpm

cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.3/fpm/pool.d/www.conf

Edit the listening port of php7.3-fpm (for example 9073 instead of 9070)

nano /etc/php/7.3/fpm/pool.d/www.conf

Replace the line listen = 127.0.0.1:9070 by listen = 127.0.0.1:9073
Restart the service

service php7.3-fpm restart

Then to use php7.3-fpm, you have the choice between


1) Replace globally php7.0-fpm with php7.3-fpm

In this case just edit the file /etc/nginx/conf.d/upstream.conf and replace the line server 127.0.0.1:9070; by server 127.0.0.1:9073;

nano /etc/nginx/conf.d/upstream.conf

Then reload nginx

service nginx restart

2) Add php7.3-fpm as an additional php version

Add the following lines in /etc/nginx/conf.d/upstream.conf

upstream php73 {
server 127.0.0.1:9073;
}

then copy the files /etc/nginx/common/php7.conf into /etc/nginx/common/php73.conf
And into this copy replace the line fastcgi_pass php7; by fastcgi_pass php73;

Reload nginx and you can replace the line include common/php7.conf; by include common/php73.conf; in the vhosts of your choice

@jorgept
Copy link

jorgept commented Sep 4, 2019

and if i install the WP site with --wpfc fastcgi_cache, i have, in vhosts

include/common/wpfc-php7.conf;
not
include/common/php7.conf;

how can i make this work?
Thanks

@bobwol
Copy link
Author

bobwol commented Sep 4, 2019 via email

@jorgept
Copy link

jorgept commented Sep 4, 2019

bobwol. ???
don't understand your reply please...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment