Installing


Follow this simple process to install Photon CMS.

Tip:  Photon CMS installed in local or staging environment gives you access to a full set of Photon CMS features.

Table of Contents
  1. Via Photon Installer (Recommended)
  2. Manual Installation
  3. Configuration
  4. Troubleshooting

Via Photon Installer (Recommended)

Step 1: Download the Photon installer using Composer

You only need to install Photon installer once. Once installed, you can use Photon installer to bootstrap as many Photon CMS installations as you like, so if you've already done this, skip to Step 2.

composer global require "photoncms/installer"

Please, place composer's system-wide vendor bin directory in your $PATH. This will ensure that the Photon executable can be located by your system. 

Common system-specfic locations include:

macOS: $HOME/.composer/vendor/bin
GNU/Linux Distributions: $HOME/.config/composer/vendor/bin

Step 2: Run the 'photon new' command

To continue installing Photon CMS, run this command in your terminal:

photon new blog

Currently, Photon installer assumes you're using MYSQL database. If you're using PostgreSQL, SQLite or SQL Server please install Photon CMS manually.

During the installation process you will be asked for your database username and password. Make sure that the provided MYSQL user has sufficient privileges to create new databases.

The install process will create a new database which in this case would be named blog, and will also create a folder with the same name.

Here's a video showing the complete Photon CMS installation process in 20 seconds:


Tip: Subscribe to Photon CMS Youtube Channel to stay up to date with latest video tutorials.

Step 3: Login to your Photon CMS Control Panel

If you navigate to http://blog.test you should see the welcome page that among other useful links has a link to your Control Panel as well: http://blog.test/cp.

Photon CMS ships with 2 pre-defined users, and to be able to access all the CMS features make sure to login using these credentials:

email: [email protected]
password: L!gthsp44d

Manual Installation

Photon CMS utilizes Composer to manage its dependencies. So, before using Photon CMS, make sure you have Composer installed on your machine.

Step 1: Download and unzip the files

Download the latest Photon CMS version and unzip the files into your web root.

Step 2: Run composer install

From the command line navigate to your web root folder, and run:

composer install

Step 3: Create an empty database

Create an empty database that will host database tables for your new Photon CMS installation.

Step 4: Configure your .env file and generate app key

Photon CMS ships with an example .env file. Copy and rename .env.example file to .env in your web root folder. Edit the file, and for starters, all you need to change is the database connection parameters. Edit these lines to match your database connection parameters:

DB_HOST=localhost
DB_DATABASE=dbname
DB_USERNAME=username
DB_PASSWORD=password

Laravel recommends that each new installation has it's own unique key, so run this command from your web root:

php artisan key:generate

While you are at the console, make sure to run another Artisan command that will generate a symlink to connect your app's public folder with a storage folder so that uploaded files are served via HTTP:

php artisan storage:link

Step 5: Run a hard-reset

To hard-reset a Photon installation run the following console command from your web root:

php artisan photon:hard-reset

TIP: The hard-reset command may come in handy if you're playing with Photon CMS and you want to quickly reset it to it's default installation state - like you've just installed it.

Step 6: Login to your Photon CMS Control Panel

You're done installing!

If you navigate to http://blog.test you should see the welcome page that among other useful links has a link to your Control Panel as well: http://blog.test/cp.

Photon CMS ships with 2 pre-defined users, and to be able to access all the CMS features make sure to login using these credentials:

email: [email protected]
password: L!gthsp44d

Enjoy!

Configuration

Public Directory

The requirements are the same as for the Laravel framework:

After installing Laravel, you should configure your web server's document / web root to be the public directory. The index.php in this directory serves as the front controller for all HTTP requests entering your application.

Directory Permissions

After installing Photon, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. Photon needs to write to the following directories:

app/PhotonCms/Dependencies/PHPSeeds/Backup
app/PhotonCms/Dependencies/DynamicModels
app/PhotonCms/Dependencies/Logging
app/PhotonCms/Dependencies/ModuleExtensions
app/PhotonCms/Dependencies/PhotonMigrations
database/seeds

Troubleshooting

Some users experience SSL certificate problems with cURL (error 60) on localhost, especially on Windows. These instructions might be helpful.

Sign-up to stay informed about news and updates.