PHP version change, like the LAMP app?
-
@girish said in PHP version change, like the LAMP app?:
This should be possible. What's the use case though? WP is not fully compatible with PHP 8 or 8.1 at this point.
However WP 6 is rolling out right now, I haven't checked yet, but I guess it should be fully compatible now... we've yet to see...
-
-
-
@girish Ah okay, so in that case I guess this will be a “manual intervention required” type of update rather than automatic? And no way to switch back inside of the app itself but would have to deploy the older image if compatibility issues exist? If plugins are up to date it likely won’t be a problem but anyone relying on older rarer plugins I could assume will experience issues. Thankfully all mine are pretty current plug-ins so I’m not anticipating any issues and am actually looking forward to the performance improvements with PHP 8.
-
-
Hi guys,
Is there any progress on this issue?
It would be nice to have the possibility of choosing the PHP version in the WordPress Developer application so that updates do not accumulate.
In some complex WordPress installations, where there are plugins that the developer has not yet adapted to the PHP 8.1 version, they already accumulate 4 updates (3.0.0, 3.0.1, 3.0.2 and 3.0.3) without any possible alternative to update them.
Is there any estimation of what version will be available?
Thanks team!
-
@martinkbs Are you asking for PHP 7.4 for WordPress ? It reached EOL in Nov 2022 - https://www.php.net/eol.php .
-
Hi @girish,
Yes, I am aware of that. But it would be nice to have the possibility of php version choice like in LAMP application.
Even if the WordPress Developer application is installed by default on version 8.1, that somehow it can be downgraded to version 7.4 for those installations that have plugins or themes that have not yet been adapted by their developers.
I know I can migrate WordPress installations to a LAMP application, but this way I would lose WP-CLI functionality, and that is something important to keep automations with n8n.
-
@martinkbs mmm, have to think about the viability of this. Every passing day makes 7.4 more unsupportable. In fact, 7.4 doesn't exist in ubuntu core repos and this complicates the WP app packaging. We use this PPA. This is actually why we rushed updating all our apps to base image 4.0 which has PHP 8 and removed the ondrej repo. I think if WP itself didn't support PHP 8, this decision might have been simpler. But this is some plugin of WP...
For wp-cli, you only need to get the phar file in https://github.com/wp-cli/wp-cli/releases/ . It's a single file you can put somewhere in /app/data and run .
-
@girish I am trying to install wp-cli in the LAMP application and I get the following error:
root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/code# cd /app/data root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6571k 100 6571k 0 0 19.6M 0 --:--:-- --:--:-- --:--:-- 19.6M root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# php wp-cli.phar --info OS: Linux 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 Shell: PHP binary: /usr/bin/php8.1 PHP version: 8.1.13 php.ini used: /etc/php/8.1/cli/php.ini MySQL binary: /usr/bin/mysql MySQL version: mysql Ver 8.0.31-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu)) SQL modes: WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli WP-CLI vendor dir: phar://wp-cli.phar/vendor WP_CLI phar path: /app/data WP-CLI packages dir: WP-CLI cache dir: /root/.wp-cli/cache WP-CLI global config: WP-CLI project config: WP-CLI version: 2.7.1 root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# chmod +x wp-cli.phar root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# sudo mv wp-cli.phar /usr/local/bin/wp mv: inter-device move failed: 'wp-cli.phar' to '/usr/local/bin/wp'; unable to remove target: Read-only file system
I have tried moving it to the /app/data directory itself, but it doesn't work:
root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# sudo mv wp-cli.phar /app/data/wp root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# wp --info bash: wp: command not found
-
@martinkbs said in PHP version change, like the LAMP app?:
root@5cc74b02-ed2a-49ee-8fc8-0b1f780425e6:/app/data# wp --info
You can make the file executable as
chmod +x wp
and then do./wp
(the ./ is important) -
@benborges I think for an immediate fix, just use the LAMP app and install WordPress there with the PHP version you want. Currently, we don't have version switching in the WordPress package.