Wordpress upgrade not working

1 post / 0 new
#1 Wed, 01/17/2018 - 15:42
rberquist

Wordpress upgrade not working

Wordpress installer upgrades haven't worked since the change to wp-cli. Running wp-cli 1.4.1. Executing from the command line works great. Installing from the Virtualmin interface works great. However, upgrading gives me the following:

Upgrading WordPress to version 4.9.1 ..
Configuring webserver PHP settings ..
.. already done.
Downloading http://scripts.virtualmin.com:80/wordpress-4.9.1.zip (9.92 MB) ..
     Received 1024 bytes (0 %)
     Received 1017 kB (10 %)
     Received 1.99 MB (20 %)
     Received 2.98 MB (30 %)
     Received 3.97 MB (40 %)
     Received 4.96 MB (50 %)
     Received 5.96 MB (60 %)
     Received 6.95 MB (70 %)
     Received 7.94 MB (80 %)
     Received 8.93 MB (90 %)
     Received 9.92 MB (100 %)
.. download complete.
wp core upgrade failed :
.. done

Looking at the system logs, I'm seeing:

sh: core: command not found

It's supposed to be running "wp core upgrade --version=4.9.1". But that error message leads me to believe it's leaving off the "wp" from the command.

Looking in wordpress.pl in the scripts directory, for "!upgrade", the script sets my $wp and then executes it. However, when upgrading, the script does NOT set my $wp, it simply goes straight to executing it. From troubleshooting, it would seem that $wp is not initialized during an upgrade procedure(the else condition) and is null.