How to deploy a Laravel or Symfony site?
On your hosting, you must place your files in the public_html directory, but this causes issues with frameworks like Symfony or Laravel that require their files to be placed in a public directory.
There is a simple method to use Symfony or Laravel with your hosting:
- Connect via SSH or go to the Terminal in cPanel
- Make sure you are at the root of your hosting:
cd ~
- Rename the
public_htmldirectory using the following command:
mv public_html public_html_bak
- Create a symbolic link between your
publicdirectory andpublic_htmlusing the following command (adapt/home/myuser/myapp/publicaccording to your installation):
ln -s /home/myuser/myapp/public public_html
- Finally, to run
composer, you need to specify the PHP version to use if you have changed the PHP version of your hosting, for example to use PHP 8.2 withcomposer:
ea-php82 /usr/local/bin/composer install
You can also create an alias in your shell if you want to call composer using only the composer command.
Tip: if you are on a plan where SSH access is not included, our technical support team will do it for you. Simply let us know the path to your public directory.
Updated on: 14/02/2026
Thank you!