Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Allow specifying PHP version #223

Open
CodeShakingSheep opened this issue Aug 2, 2023 · 1 comment · May be fixed by #229
Open

Feature request: Allow specifying PHP version #223

CodeShakingSheep opened this issue Aug 2, 2023 · 1 comment · May be fixed by #229

Comments

@CodeShakingSheep
Copy link
Member

CodeShakingSheep commented Aug 2, 2023

Describe the feature request

Atm it's not clear to me which PHP version will be used when a WordPress app is installed. For 6.2ynh1 it was PHP 8.0 and for 6.2.2ynh1 it is PHP 8.2. Sometimes WP sites need to be run on older PHP versions e.g. for plugin compatibility. Therefore I would love to have an option "PHP version" when installing the WordPress app and in the config panel as well, so that it can be changed at a later time.

@CodeShakingSheep CodeShakingSheep changed the title Allow specifying PHP version Feature request: Allow specifying PHP version Aug 2, 2023
fflorent added a commit to fflorent/wordpress_ynh that referenced this issue Oct 7, 2023
@fflorent fflorent linked a pull request Oct 7, 2023 that will close this issue
2 tasks
@fflorent
Copy link

fflorent commented Oct 7, 2023

Opened this issue: #229

What works for me was the following steps, in SSH and as root:

  1. Run this command in order to make a manual backup (we can't rely on the automatic backup made before the upgrade due to the change of phpversion config value): yunohost backup create -n wordpress_before_specify_phpversion --apps wordpress
  2. Change the php version, like follow (adapt the value to whatever version you want): yunohost app setting wordpress phpversion -v 8.1
  3. Upgrade wordpress so it uses the specified version: yunohost app upgrade wordpress -u https://github.com/fflorent/wordpress_ynh/tree/specify-php-version --force --no-safety-backup (or without the -u https://github.com/fflorent/wordpress_ynh/tree/specify-php-version if the patch is merged)
  4. Remove former dependencies (which were for the previous php version): apt autoremove
  5. Remove the pool file (assuming you were previously in php 8.2 and have downgraded to 8.1): rm /etc/php/8.2/fpm/pool.d/wordpress.conf
  6. Reload the previous php fpm service: systemctl restart php8.2-fpm

In case of error:

  1. yunohost app remove wordpress
  2. yunohost backup restore wordpress_before_specify_phpversion --apps

fflorent added a commit to fflorent/wordpress_ynh that referenced this issue Mar 6, 2024
fflorent added a commit to fflorent/wordpress_ynh that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants