Skip to content

Instantly share code, notes, and snippets.

@thetwopct
Created June 12, 2024 11:07
Show Gist options
  • Save thetwopct/630a38b45078bdb6dcb2c7a6a362bc65 to your computer and use it in GitHub Desktop.
Save thetwopct/630a38b45078bdb6dcb2c7a6a362bc65 to your computer and use it in GitHub Desktop.
Using Laravel (11 or any version) on cPanel/WHM when public_html default directory cannot be changed
# Using Laravel (11 or any version) on cPanel/WHM when public_html default directory cannot be changed
# open terminal, go to the root of your folder where /public_html is visible, delete the existing public_html
rm -rf public_html
# create a directory call app where your app will go
mkdir app
# create symlink from public_html to app/public
ln -s /app/public public_html
# in your laravel project, go to public/.htaccess and add the following line as first line
Options +FollowSymLinks
# deploy your project to the /app directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment