Choose One: Command Line Installation | Manual Installation

Command Line Installation

This currently only works on *nix systems (Linux, OS X, Unix, etc).

Our quick installer is a stripped down interface for the Oil package. It allows you to create a new project with one command. You will also no longer need to use 'php' in your oil commands.

To install the quick installer, simply open up a shell and run the following command:

$ curl get.fuelphp.com/oil | sh

This will ask for your password, as it installs the script to /usr/bin.

Now you can just use 'oil' instead of 'php oil' in your projects.

If you had installed the oil script before version 1.6, you have to re-install it to have it run composer too!

To create a new project simply run:

$ oil create <project_name>

This will create a folder in the directory you are in with the project name you gave. It will then clone the repository and all submodules into that directory.

Note: This will also run $ oil refine install which makes the necessary directories writable, and $ php composer.phar update to pull in the defined composer dependencies.

Manual Installation Instructions

This will create the default installation of the Fuel framework on your web server.

Clone from github

$ cd /where/ever/your/webserver/root/is
$ git clone --recursive git://github.com/fuel/fuel.git

This will create a folder called fuel in your webserver root, containing the entire FuelPHP installation, including all core packages.

Download the zip file

  1. Download the Fuel Framework
  2. Unzip/Extract the download
  3. Move the files to your server
    • Note the public directory in the source equals your web server's public document directory i.e. public_html, public, htdocs, etc. Move its contents to there or a subdirectory of the webroot where you want to use Fuel.
    • Placing the fuel directory outside of the public document directory is encouraged for security reasons.
    • Edit the paths in index.php to point to your app, core & packages directories.
    /
      fuel/
        app/
        core/
        packages/
      public/
        .htaccess
        assets/
        index.php
      oil
    

After installation, make sure the permissions are correct on folders that the framework needs access too. There is an oil task available to set the default folders writable:

$ php oil refine install
	Made writable: APPPATH/cache
	Made writable: APPPATH/logs
	Made writable: APPPATH/tmp
	Made writable: APPPATH/config

Composer

As of version 1.6, FuelPHP uses the Composer package manager to dynamically pull dependencies it, either from Packagist, from Github, or from a custom defined location. Composer is controlled via the composer.json file, which you will find in the root of your FuelPHP installation. For your convienience, we have included the composer.phar library so you can run composer directly:

$ php composer.phar self-update
$ php composer.phar update

If you don't execute this step, FuelPHP will not start, as vital framework components are being loaded through composer!

Composer

As of version 1.6, FuelPHP uses the Composer package manager to dynamically pull dependencies it, either from Packagist, from Github, or from a custom defined location. Composer is controlled via the composer.json file, which you will find in the root of your FuelPHP installation. For your convienience, we have included the composer.phar library so you can run composer directly:

$ php composer.phar self-update
php composer.phar update

If you don't execute this step, FuelPHP will not start, as vital framework components are being loaded through composer!

Configuration

The main configuration can be found at app/config/config.php. Edit it to your liking.

Install inside the document root

As explained in point 3, for security reasons it is strongly advised NOT to install Fuel inside your webserver's document root.

However, there are cases where you would like to do that, for example for a (local) development environment where Apache's dynamic mass virtual hosting module is used to quickly setup new development environments without the need to restart the webserver.

In that case, you need an additional .htaccess file that you need to place in your document root, which will redirect requests to the site root to your public folder, and also modifies the rewrites to include the public folder:


<IfModule mod_rewrite.c>
	RewriteEngine on

	RewriteBase /public

	RewriteRule ^(/)?$ index.php/$1 [L]

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d

	RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

This is too complicated. Anything simpler?

There is an alternative that involves removing the public folder from your installation. Just copy the entire zipfile into your webserver's document root, and then do the following:

Ok. And what about subfolders?

Follow the same procedure as in the previous section. Then execute one more step:

Setting the Environment

By default, the environment is set to Development mode. Fuel uses the environment to define which database settings to use, but you can use it for other things.

To set the environment, drop the following line into your .htaccess file.

SetEnv FUEL_ENV production

Available options are detailed in the Class constants of the Fuel Class.