Created
June 12, 2024 11:07
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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