Skip to content

Instantly share code, notes, and snippets.

@alfinauzikri
Last active July 1, 2023 07:51
Show Gist options
  • Save alfinauzikri/b8aff657ff898ba44d8a42df815e1dce to your computer and use it in GitHub Desktop.
Save alfinauzikri/b8aff657ff898ba44d8a42df815e1dce to your computer and use it in GitHub Desktop.
Easy steps to deploy all versions of Laravel (5,6,7,8,9,10) on CyberPanel

Deploy Laravel on CyberPanel

Easy steps to deploy all versions of Laravel on CyberPanel

Open Access to the OpenLiteSpeed Admin Panel

  1. Login to CyberPanel
  2. [Server] Security > Firewall.

image

  1. Open 7080 TCP Port

image

  1. Reset OpenLiteSpeed panel password using SSH Terminal
  2. Run the following script: /usr/local/lsws/admin/misc/admpass.sh

image

  1. Access the panel by going to: https://YOUR_SERVER_IP:7080

image

Change Document Root

  1. Make sure you have previously created a website and placed all your Laravel files in the public_html directory.
  2. Open OLS Panel > Virtual Hosts > yourwebsite > General tab > General
  3. Change Document Root from $VH_ROOT/public_html to $VH_ROOT/public_html/public

image

  1. Save and Graceful Restart
  2. Success

PHP and Composer Tips

Change PHP CLI Version of CyberPanel

  1. Login SSH Terminal
  2. cp /usr/local/lsws/lsphpXX /usr/bin/
  3. Check PHP Version php -v

image

  1. Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment