Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    PHP version change, like the LAMP app?

    WordPress (Developer)
    4
    16
    268
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d19dotca
      d19dotca last edited by

      Hi there,

      Curious... are we able to change the PHP version in the WordPress app just like we can in the LAMP app? (https://docs.cloudron.io/apps/lamp/#supported-php-versions)

      If not, is it possible to perhaps add that type of functionality from the LAMP app in other PHP-based app packages?

      --
      Dustin Dauncey
      www.d19.ca

      1 Reply Last reply Reply Quote 2
      • girish
        girish Staff last edited by

        This should be possible. What's the use case though? WP is not fully compatible with PHP 8 or 8.1 at this point.

        d19dotca micmc 2 Replies Last reply Reply Quote 3
        • d19dotca
          d19dotca @girish last edited by d19dotca

          @girish Ah interesting read. It may not be fully compatible but is still running fine for many people on PHP 8.0 from what I've been reading in various FB groups, plus it's still a supported version of PHP for WordPress whether fully compatible or not. A few of the page builders I use (namely Bricks and Oxygen) are now PHP 8.0 compatible and all the plugins I use appear to be too, so figured I may as well upgrade to 8.0 for the bit of performance improvements. 🙂

          I think ideally though that's where you could use the same formula you have for the LAMP app where it's 7.9 by default and can only be 8.0 once it's configured to be so manually using that switch you added. For consistency sake, I'd think that should perhaps be added to all PHP-based apps, but that's just my two cents.

          --
          Dustin Dauncey
          www.d19.ca

          girish 1 Reply Last reply Reply Quote 1
          • girish
            girish Staff @d19dotca last edited by

            @d19dotca Not opposed to it. We will move to Ubuntu 22 based image in the recent future, we can have multiple PHP versions in the base image itself.

            d19dotca 2 Replies Last reply Reply Quote 3
            • micmc
              micmc @girish last edited by micmc

              @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...


              https://marketingtechnology.agency
              For cutting edge web technologies

              1 Reply Last reply Reply Quote 3
              • d19dotca
                d19dotca @girish last edited by

                @girish said in PHP version change, like the LAMP app?:

                @d19dotca Not opposed to it. We will move to Ubuntu 22 based image in the recent future, we can have multiple PHP versions in the base image itself.

                That'd be awesome! 🙂 Thanks Girish!

                --
                Dustin Dauncey
                www.d19.ca

                1 Reply Last reply Reply Quote 1
                • d19dotca
                  d19dotca @girish last edited by

                  @girish was there any progress on this one? Doesn’t seem we have PHP 8 supported yet on the packaged app for WordPress Developer.

                  --
                  Dustin Dauncey
                  www.d19.ca

                  girish 1 Reply Last reply Reply Quote 0
                  • girish
                    girish Staff @d19dotca last edited by

                    @d19dotca yeah, I will switch the default for a start to PHP 8. PHP 7.4 EOL is coming up in 15 days or so.

                    d19dotca 1 Reply Last reply Reply Quote 3
                    • d19dotca
                      d19dotca @girish last edited by d19dotca

                      @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. 🙂

                      --
                      Dustin Dauncey
                      www.d19.ca

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @d19dotca last edited by

                        @d19dotca yeah, I pushed updates for LAMP and both WP just some time back. They are major upgrades.

                        1 Reply Last reply Reply Quote 1
                        • martinkbs
                          martinkbs last edited by

                          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!

                          girish 1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff @martinkbs last edited by

                            @martinkbs Are you asking for PHP 7.4 for WordPress ? It reached EOL in Nov 2022 - https://www.php.net/eol.php .

                            martinkbs 1 Reply Last reply Reply Quote 0
                            • martinkbs
                              martinkbs @girish last edited by

                              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.

                              girish 1 Reply Last reply Reply Quote 0
                              • girish
                                girish Staff @martinkbs last edited by girish

                                @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 .

                                martinkbs 1 Reply Last reply Reply Quote 0
                                • martinkbs
                                  martinkbs @girish last edited by

                                  @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
                                  
                                  girish 1 Reply Last reply Reply Quote 0
                                  • girish
                                    girish Staff @martinkbs last edited by

                                    @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)

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Powered by NodeBB