Skip to content

[HOW TO] Installation

Schlaefer edited this page Mar 22, 2018 · 31 revisions

Installation

Requirements

  • PHP 7.1.0+
  • a web server (if Apache then with mod_rewrite enabled)

Download the Files

Download and extract the the latest version from https://philecms.github.io/.

Download via composer

Install PHP and then composer. Then create a new Phile project:

composer create-project --no-dev phile-cms/phile

Download for Developers

Clone the repository and install the required libraries by running in the root directory (the root has the composer.json file):

git clone https://github.com/PhileCMS/Phile phile
cd phile
composer install

Put the Files on the Web-Server

Upload the Phile folder to your web-server. If you open the URL of that folder in your web browser you should see Phile's setup page.

If you upload the folder content separately don't miss the .htaccess file. It's placed the root-directory and might be invisible on systems like Linux or Mac OS X.

Phile can also run locally using PHP's build in web-server. In the Phile root directory:

php -S localhost:8080

to start Phile at http://localhost:8080/.

Post Installation

EncryptionKey

You must set the encryption key value in the config.php to a non-empty string. Follow the instruction on screen when you first visit your Phile installation. Make sure to backup this key (or even better your whole config.php) file.

Permissions

If you run into problems make sure you have full access privileges on the content, html caching and template caching folders:

chmod 777 content lib/cache lib/datastorage

The lib/cache is needed for the philePhpFastCache and phileTemplateTwig.

Development

You can turn debug to true when building a theme. It exposes the dump() function in Twig.

If you want to contribute to the development of Phile, you can install the additional libraries required for documentation with composer, from the root directory of your phile instance:

composer install

Production

Keep the philePhpFastCache plugin enabled. This caches page requests, which will decrease server load immensely.

Make sure you turn the Twig cache on during production. This will greatly increase the speed of your site.

Lastly, be sure to run composer dump-autoload --optimize so that composer can serve the optimized version of the autoloader. There is speculation that this could increase the performance of your site by ~20%.

Additional Setup and Configuration

Specialized Setup for…

Setup a Virtual Host in apache

Set up a virtual host inside your apache.conf, and then restart apache:

NameVirtualHost *:80 # if needed

<VirtualHost *:80>
    DocumentRoot "/your/htdocs/phile"
    ServerName phile.demo
</VirtualHost>

Add an entry to /etc/hosts:

# phile CMS on local server
127.0.0.1   phile.demo