Categories
Laravel

Laravel on Shared Hosting

AntJanus gave the basic approach here. It did work for my Hello World test, not sure if there are potential issues waiting, such as with maintenance or framework updates.

Basically install locally (on Composer so far), zip it all up and upload the framework directory to a private folder above public_html.

The public entry point can be directly in public_html if the site is for the domain root, or in a sub-folder. Edit both public/index.php and laravel/bootstrap/paths.php to be able to find each other.

Paths.php looked a bit like this

[29]  'public' => __DIR__.'/../public_html/laravel',
//laravel is sub-directory
Categories
Laravel

Laravel Installation

The intro docs have you using Composer to pull in all its dependencies, which come to about 100mb. Apparently it should be possible to turn off development bundles, but not sure I’ve done it yet.

This composer.json:

{
	"require": {
		"laravel/framework": "4.0.*"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
	"scripts": {
		"pre-update-cmd": [
			"php artisan clear-compiled"
		],
		"post-install-cmd": [
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan vendor-cleanup",
			"php artisan optimize"
		]
	},
	"config": {
		"preferred-install": "dist"
	},
	"minimum-stability": "dev"
}

Should cut file size down with the vendor-cleanup, but I’m wondering if theĀ artisanĀ command does nothing on my local system. When did it get into Windows?

Code Bright takes a different approach, pulling from GitHub. Haven’t tried it yet though.