Skip to main content

Upgrade PHP in LAMP App

Overview

This guide explains how to upgrade the PHP version of the LAMP app.

Cloudron runs apps as read-only containers for immutability and security. You cannot use "apt upgrade" on an installed LAMP app. Instead, install a newer LAMP app version and import your existing app.

This guide covers upgrades from LAMP 7.2 to LAMP 7.3, or from LAMP 7.2/7.3 to LAMP 7.4.

Backup existing app

  1. Take a backup of the existing app.
  2. Click Download Backup configuration to download the JSON file with the latest backup information.

Import backup

  1. Install the latest LAMP app version from the App Store at a new subdomain like next.domain.com.
  2. Go to the Backups section and click Import.
  1. In the popup dialog, upload the backup configuration downloaded in the previous step.

Configure database credentials

Each Cloudron app is sandboxed with its own database. The new LAMP app has different credentials than the existing one. Update the database credentials in your app using the File Manager or Web Terminal. Find the new credentials in /app/data/credentials.txt.

Switch the app location

Once the app runs correctly, relocate it to production:

  1. Move the old app to old.domain.com from the Location section.
  2. Move the new app to the desired location.

Keep the old app stopped (Console -> Stop app) for a few days before uninstalling. This allows easy rollback if the app misbehaves with the newer PHP version.