Dashboard

Hosting Panels

How to Run Composer and Laravel Artisan Commands in Webuzo

Updated Jul 21, 2026

How to Run Composer and Laravel Artisan Commands in Webuzo

If your website is hosted on Webuzo, you may have multiple PHP versions installed on your server. To ensure your application uses the correct PHP version, always run Composer and Laravel Artisan commands using the PHP binary that matches your website's selected PHP version.

 


Composer Update Commands

Replace the PHP version in the command below according to the version your website is using.

PHP 8.4

/usr/local/apps/php84/bin/php /usr/local/bin/composer update

PHP 8.3

/usr/local/apps/php83/bin/php /usr/local/bin/composer update

PHP 8.2

/usr/local/apps/php82/bin/php /usr/local/bin/composer update

PHP 8.1

/usr/local/apps/php81/bin/php /usr/local/bin/composer update


Laravel Artisan Commands

Use the PHP binary that matches your selected PHP version.

Example (PHP 8.4)

/usr/local/apps/php84/bin/php artisan migrate

Replace php84 with your installed PHP version if needed.

Examples:

PHP 8.3

/usr/local/apps/php83/bin/php artisan migrate

PHP 8.2

/usr/local/apps/php82/bin/php artisan migrate

PHP 8.1

/usr/local/apps/php81/bin/php artisan migrate


Other Common Laravel Commands

Clear all caches:

/usr/local/apps/php84/bin/php artisan optimize:clear

Cache configuration:

/usr/local/apps/php84/bin/php artisan config:cache

Cache routes:

/usr/local/apps/php84/bin/php artisan route:cache

Cache views:

/usr/local/apps/php84/bin/php artisan view:cache

Run database migrations:

/usr/local/apps/php84/bin/php artisan migrate

Rollback the last migration:

/usr/local/apps/php84/bin/php artisan migrate:rollback

Seed the database:

/usr/local/apps/php84/bin/php artisan db:seed

Generate an application key:

/usr/local/apps/php84/bin/php artisan key:generate

Run the Laravel queue worker:

/usr/local/apps/php84/bin/php artisan queue:work



How to Check Your PHP Version

To verify which PHP version is available on your hosting account, run:

/usr/local/apps/php84/bin/php -v

Replace php84 with the PHP version you want to check.


 

 

Important Notes

  • Always use the PHP version that matches your website's configured PHP version.

  • Replace php84 with php83, php82, or php81 as required.

  • Run all commands from your Laravel project's root directory (where the artisan file is located).

  • Using a different PHP version than your website is configured for may cause dependency or compatibility issues.