PHP version selection ignored during Laravel 11 site creation — always defaults to PHP 8.4 #89

Closed
opened 2026-04-05 20:25:27 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Alexxlml on 5/15/2025

CloudPanel version(s) affected

2.5.1

Description

When creating a new PHP site using the Laravel 11 template, CloudPanel assigns PHP 8.4 regardless of the selected version. Even after changing the PHP version in the site settings, the actual PHP version in use remains 8.4.

This causes compatibility issues with projects that require specific versions such as PHP 8.2 or 8.3.

For example, a Laravel 9 project throws multiple errors under PHP 8.4 because it requires PHP 8.2 to function properly.

How to reproduce

  1. Go to Sites > Create Site in CloudPanel.
  2. Choose the Laravel 11 template.
  3. Observe that the default PHP version shown is 8.3.
  4. Complete the site creation process.
  5. Access the server via SSH using the created site's system user.
  6. Navigate to the site's directory:
    cd htdocs/site-name
  7. Install Laravel 11 by running:
    composer create-project --prefer-dist laravel/laravel:^11 -n .
    Then run:
    php artisan about
  8. Observe that PHP 8.4 is being used, not PHP 8.3 as expected.
  9. Go back to CloudPanel and check the site's settings — it still shows PHP 8.3 as the selected version.
  10. Change the PHP version to 8.2, save the changes.
  11. SSH into the server again, run php artisan about — PHP 8.4 is still shown.
  12. Restarting the instance has no effect — the PHP version used remains 8.4.

Possible Solution

No response

Additional Context

In my case, I installed an application developed with Laravel 9 that requires PHP 8.2, so far it works fine but you should be able to use the version you select when creating the site.

I used the Laravel 11 template because it was the closest fit, and the VHost is correctly configured to use Laravel, so this issue is based on using the template for that version.

I hope you can help me find an alternative to forcing the use of a specific PHP version in case another Laravel or WordPress site requires it, and I hope to find out if this will be fixed in a future release.

Thank you for all your work.

Image

Image

*Originally created by @Alexxlml on 5/15/2025* ### CloudPanel version(s) affected 2.5.1 ### Description When creating a new PHP site using the Laravel 11 template, CloudPanel assigns PHP 8.4 regardless of the selected version. Even after changing the PHP version in the site settings, the actual PHP version in use remains 8.4. This causes compatibility issues with projects that require specific versions such as PHP 8.2 or 8.3. For example, a Laravel 9 project throws multiple errors under PHP 8.4 because it requires PHP 8.2 to function properly. ### How to reproduce 1. Go to **Sites > Create Site** in CloudPanel. 2. Choose the **Laravel 11** template. 3. Observe that the default PHP version shown is **8.3**. 4. Complete the site creation process. 5. Access the server via SSH using the created site's system user. 6. Navigate to the site's directory: `cd htdocs/site-name` 7. Install Laravel 11 by running: `composer create-project --prefer-dist laravel/laravel:^11 -n .` Then run: `php artisan about` 8. Observe that **PHP 8.4** is being used, not PHP 8.3 as expected. 9. Go back to CloudPanel and check the site's settings — it still shows PHP 8.3 as the selected version. 10. Change the PHP version to **8.2**, save the changes. 11. SSH into the server again, run `php artisan about` — PHP 8.4 is still shown. 12. Restarting the instance has no effect — the PHP version used remains 8.4. ### Possible Solution _No response_ ### Additional Context In my case, I installed an application developed with Laravel 9 that requires PHP 8.2, so far it works fine but you should be able to use the version you select when creating the site. I used the Laravel 11 template because it was the closest fit, and the VHost is correctly configured to use Laravel, so this issue is based on using the template for that version. I hope you can help me find an alternative to forcing the use of a specific PHP version in case another Laravel or WordPress site requires it, and I hope to find out if this will be fixed in a future release. Thank you for all your work. ![Image](https://github.com/user-attachments/assets/4b20e280-154e-4d6b-b107-6f715587c182) ![Image](https://github.com/user-attachments/assets/68df2b15-0f4a-4ab9-bb17-dd96b4c4dbeb)
Sign in to join this conversation.