skip to Main Content

Situation: We started using Lightsail bitnami because of how easy it is to get started and that we do not have a dedicated linux admin/engineer. The VM quickly started to host multiple services.

Now the problem is that we need to get out of the unsupported version of PHP but bitnami suggested to export the services then import to a newer version of the image. This is not as simple as it sounds because of what and how much we have in this VM. I want to start building the stack in the future but for now I need to upgrade PHP.

I tried to upgrade PHP the manual way which is to update/upgrade OS, install repo, install new software but this did not sit well with bitnami’s custom configuration.

Question: What are the steps I need to take to upgrade PHP in bitnami’s WordPress image? Or at least point me to the right direction because I’m not able to find any docs about our situation via AWS docs, Bitnami docs, r/Bitnami and Google.

2

Answers


  1. Honestly there is no way to update the php on current lightsail instance.
    the best way is you export your current wordpress install using plugin All in one wp migration.
    https://wordpress.org/plugins/all-in-one-wp-migration/
    then run a new instance with latest php version
    then install the plugin again and this time import the backup.

    Login or Signup to reply.
  2. I successfully upgraded my bitnami php 7.4 instance (running Debian 10/buster) to php 8.1. It was a pretty unsurprising process of adding a repository from sury.org (the same guy who provides ondrej/php for Ubuntu) and then configuring apache to use the new php-fpm process instead of the old one. Also PHP needed to be configured in a special way to work with the bitnami setup of mysql/mariadb…

    Details at https://serverok.in/upgrade-php-version-on-bitnami-wordpress-on-aws-lightsail.

    Watch out there is a typo in the above web page – the fpm socket is ww2.sock but later on the example apache config uses www2.sock when it should be ww2.sock.

    Also you might be running mariadb instead of mysql so the path to the database socket might be slightly different. e.g. /opt/bitnami/mariadb/tmp/mysql.sock instead of /opt/bitnami/mysql/tmp/mysql.sock.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search