Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save githubmarau/78882f61ca331a3c1242b0def957685c to your computer and use it in GitHub Desktop.

Select an option

Save githubmarau/78882f61ca331a3c1242b0def957685c to your computer and use it in GitHub Desktop.
setup a laravel 4.2 project to deploy to a shared hosting provider
#!/bin/bash
myproject='myproject'
mywwwdir='public_html'
# initialize project
composer create-project laravel/laravel $myproject 4.2.*
cd $myproject
perl -pi -e "s|/public|/../${mywwwdir}|" bootstrap/paths.php
perl -pi -e "s|/bootstrap|/${myproject}/bootstrap|" public/index.php
# rename the public folder to match hosting providers web root
mv public $mywwwdir
# create a directory for everything except the public directory
mkdir $myproject
# move stuff to app dir
mv {app,bootstrap,vendor,artisan,composer.*,*.php,*.xml} $myproject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment