Wordpress Upgrade - failed dependencies : No PHP version could be found for this virtual server

SYSTEM INFORMATION
OS type and version Debian Linux 11
Virtualmin version GPL - 7.3-1

Hopefully a fairly standard question and whilst i’ve had a look at other topics, (all of which seem to be user generated issue) and recommendations to follow: Multiple PHP Versions – Virtualmin etc.

I’m having the above error when trying to upgrade from Wordpress 6.0.2 to 6.1.1 via virtualmin installer scripts.

I’ve not removed any basic versions of PHP (this is a fairly new install, about a month old). I’ve followed the guide to install php8.1 incase that would be the case. Switched the phpversion for my site to use 8.1 and the site is working fine. However i still get the dependacy failure when trying to upgrade.

I have performed System Settings > Re-Check Configuration. All php versions detected correctly.

Software Versions show:

Perl version 5.032001
Path to Perl /usr/bin/perl
Python version 3.9.2
Path to Python /bin/python3
BIND version 9.16
Apache version 2.4.54
PHP versions 7.4.33, 8.1.13
Logrotate version 3.18.0
MariaDB version 10.5.15

@fooby,

Explain the steps you took to install PHP 8.1

As stated in my first post. I followed the instructions here: Multiple PHP Versions – Virtualmin

Installing on Debian

Enable sury/php repository

apt-get -y install apt-transport-https lsb-release ca-certificates curl && curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && sh -c ‘echo “deb Index of /php/ $(lsb_release -sc) main” > /etc/apt/sources.list.d/sury-debian-php-$(lsb_release -sc).list’ && apt-get update

Install additional PHP packages

apt-get install php81-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,xml,zip}

root@arkp-web:~# cat /etc/apt/sources.list.d/sury-debian-php-bullseye.list
deb Index of /php/ bullseye main

root@arkp-web:~# php7.4 -v
PHP 7.4.33 (cli) (built: Nov 8 2022 11:36:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

root@arkp-web:~# php8.1 -v
PHP 8.1.13 (cli) (built: Nov 26 2022 14:27:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies

@fooby,

Did you install PHP-FPM for 8.1?

*** Likely via “sudo apt install php8.1-fpm” or similar ***

I didn’t see it in your install instructions.

I’m not trying to be an arse here; but i followed the instructions by virtualmin documentation. Which does include fpm.

root@arkp-web:~# php-fpm7.4 -v
PHP 7.4.33 (fpm-fcgi) (built: Nov 8 2022 11:36:34)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

root@arkp-web:~# php-fpm8.1 -v
PHP 8.1.13 (fpm-fcgi) (built: Nov 26 2022 14:27:02)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies

PHP versions 7.4.33, 8.1.13

@fooby,

Fair enough. I don’t have any further “guesses” at this point as from what you’ve explained if accurate, things seem correct.

I suspect there is something missing or misconfigured, but short of an inspection, i wouldn’t just guess.

If you want to hire me, I’d be happy to take a look and see what is going on.

yeah i agree that its going to be something thats not right, what it is, i’m unsure.

Is your site running properly at present on that virtual server?

If so, disable your plugins and try to update Wordpress again. To do that just use the file manager, go to the plugins folder and rename it to ‘disabled_plugins’.

Then try to update Wordpress and see if it works.

WARNING: Back up your current configuration first.

Yeah its running fine without issues, plugins are updated as it stands. Just want to make sure i keep the wordpress version up to date for security of course :slight_smile:

Tried that (disabled_plugins), tested websites, plugins were definity disabled.

Still get.

Upgrading WordPress to version 6.1.1 …

… failed dependencies : No PHP version could be found for this virtual server

Well, it was worth a shot.

So what exact version of php do you have assigned to that virtual server?

It’s currently running 8.1.13 however It was running 7.4.33 and when that failed I assumed It was a dependency on 6.1 that I was running a newer PHP version so I followed the instructions on properly installing multiple php versions but I’ve still got the same problem.

Don’t suppose there is a virtualmin or system log where I could get further detail on what it’s trying to do? Want to ideally see what command it’s trying to run.

Just wondering if it’s an environment variable at this rate. Only thing I that it could really be as both binaries are installed in correct locations and binaries work

If you’re still having issues with this, can you try something? Go to your admin panel on that site, click the Tools / Site Health and make sure it’s on the Info tab. Click server and see which version of php the site says it’s using.

Yep i’m still having this issue. The site is correctly reporting PHP 8.1.13, which is the version virtualmin says is assigned in Server Configuration > PHP Options.

Really not sure why its not working, i’ve not done anything outside of the standard instructions and as i said its a fairly new install so its not like i’ve got any legacy issues.

1 Like

What is the server’s default PHP for CLI? I know very little about WordPress and not much more about Debian, but maybe the system CLI PHP version has to be newer than some version for it to be installed?

Richard

CLI php can be any version really just depends what prefix.

However if i just do php -v it shows me 8.1.13 (as i pasted in a previous comment)

Ideally would like to know what install script is trying to do so i can troubleshoot the detail.

Well, I’m stumped.

Normally when this happens with Wordpress it’s a plugin or a theme that requires a different version and it hangs up the installer. That’s why I asked you to disable the plugins and try to upgrade first.

The only other thing I can think of is if you’re running some sort of special theme or storefront that’s causing it.

Other than that, I’m out of ideas.

No storefront running. I’m stumped too, thanks for taking the time to try and help. Although having gone back through the site health report it does have some alerts (Instagram feed error and the such) I’ll focus on fixing all the site health issues and try again. Report back if I’m successful and share what themes or anything it’s running just in case it helps anyone else. I just host the site and maintain base wordless version I don’t run any of the content of plugins etc. But looks like I’ll need to get my hands dirty this time.

I’ll likely just upgrade it manually. Ill just add that historically (same site) I’ve always upgraded via script without an issue.

The only thing that’s changed since then is I build a new server running Debian 11 (from 9) (installed virtualmin as normal via script) and migrated the site over. As I wanted to maintain php security which I was no longer able to do unless I paid for repo access. Good excuse to upgrade anyway

1 Like

Just to update this thread. I waited a while (i never actually got around to sorting the site alerts). Upgraded virtualmin with the usual monthly updates.

I signed into the wp-admin panel as normal and just upgraded from within wordpress to the latest version. Which reports correctly in Virtualmin.

Not sure if there was a bug or something but the important thing is i’m up and running on the patched version.

Cheers everyone for your help, strange we couldnt do this via virtualmin but the end goal is achieved.

2 Likes

I’ve never used VM script to update only for install.
WP can update automatically, I also used InfinityWP to make sure everything is update as I admin about 7 WP sites and its a one click update.