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
- Take a backup of the existing app.
- Click
Download Backup configurationto download the JSON file with the latest backup information.
Import backup
- Install the latest LAMP app version from the App Store at a new subdomain like
next.domain.com. - Go to the
Backupssection and clickImport.
- 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:
- Move the old app to
old.domain.comfrom theLocationsection. - 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.