Old LEMP stack WordPress site won't deploy any more

I've inherited a WordPress 5.7 site running on an Ubuntu 16.04.3 x64 droplet, which uses a separate DigitalOcean managed MySQL 8 database.

The WordPress site is a Trellis LEMP stack site. PHP version 7.3, but Nginx seems to be using 7.1 from a phpinfo().

I'm aware that all the versions are seriously outdated and need updating, but in the very immediate term I need to first get things working.

There was a database connection error (see https://www.digitalocean.com/community/questions/since-a-wordpress-url-change-i-can-t-connect-to-do-managed-mysql-database) and this involved me trying a lot of unwise things until now the deployment to the staging site via Trellis fails.

Here's what it says:

TASK [deploy : Reload php-fpm] *************************************************************************************** System info: Ansible 2.7.0; Linux Trellis at "Switch from .dev to .test" --------------------------------------------------- fatal: [staging.mywebsite.co.uk]: FAILED! => {"changed": true, "cmd": "sudo service php7.3-fpm reload", "delta": "0:00:00.030313", "end": "2021-12-21 11:51:06.490541", "msg": "non-zero return code", "rc": 1, "start": "2021-12-21 11:51:06.460228", "stderr": "php7.3-fpm.service is not active, cannot reload.", "stderr_lines": ["php7.3-fpm.service is not active, cannot reload."], "stdout": "", "stdout_lines": []} to retry, use: --limit @/home/ubuntu/mywebsite.co.uk/trellis/deploy.retry

If I SSH in and try to start the service I get

Job for php7.3-fpm.service failed because the control process exited with error code. See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.

Here's systemctl status php7.3-fpm.service:

● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-12-21 12:04:49 GMT; 47min ago
     Docs: man:php-fpm7.3(8)
  Process: 1658 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, st
 Main PID: 1658 (code=exited, status=78)

Dec 21 12:04:49 ubuntu-xxx-xxx-01 systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Dec 21 12:04:49 ubuntu-xxx-xxx-01 php-fpm7.3[1658]: [21-Dec-2021 12:04:49] ERROR: Another FPM instance seems to already
Dec 21 12:04:49 ubuntu-xxx-xxx-01 php-fpm7.3[1658]: [21-Dec-2021 12:04:49] ERROR: FPM initialization failed
Dec 21 12:04:49 ubuntu-xxx-xxx-01 systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/n/a
Dec 21 12:04:49 ubuntu-xxx-xxx-01 systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
Dec 21 12:04:49 ubuntu-xxx-xxx-01 systemd[1]: php7.3-fpm.service: Unit entered failed state.
Dec 21 12:04:49 ubuntu-xxx-xxx-01 systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.

And journalctl -xe:

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-9.scope has finished starting up.
--
-- The start-up result is done.
Dec 21 12:53:07 ubuntu-xxx-xxx-01 sshd[1915]: Received disconnect from 92.0.0.0 port 53386:11: Bye Bye [preauth]
Dec 21 12:53:07 ubuntu-xxx-xxx-01 sshd[1915]: Disconnected from 92.0.0.0 port 53386 [preauth]
Dec 21 12:55:34 ubuntu-xxx-xxx-01 sudo[1919]:     root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl sta
Dec 21 12:55:34 ubuntu-xxx-xxx-01 sudo[1919]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Dec 21 12:55:34 ubuntu-xxx-xxx-01 systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
-- Subject: Unit php7.3-fpm.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php7.3-fpm.service has begun starting up.
Dec 21 12:55:34 ubuntu-xxx-xxx-01 php-fpm7.3[1922]: [21-Dec-2021 12:55:34] ERROR: Another FPM instance seems to already
Dec 21 12:55:34 ubuntu-xxx-xxx-01 php-fpm7.3[1922]: [21-Dec-2021 12:55:34] ERROR: FPM initialization failed
Dec 21 12:55:34 ubuntu-xxx-xxx-01 systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/n/a
Dec 21 12:55:34 ubuntu-xxx-xxx-01 systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
-- Subject: Unit php7.3-fpm.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit php7.3-fpm.service has failed.
--
-- The result is failed.

And I am stuck. I'm not very confident in a Linux environment so I'm completely lost to be honest. I figure I need to fix this before I fix my database connection error!

I did try to add PHP 7.4, but this generated several pages of red errors when I tried to deploy the site so I removed it.

This is a staging site, so it's not critical, but obviously the production site has the same background setup to I'm terrified it will break too!

In the longer term I plan to upgrade everything but would really like some help trying to get it working in the immediate short-term.

Thanks!


It clearly says that php-fpm7.3 fails to start because ERROR: Another FPM instance seems to already. You probably have php-fpm7.1 already running.