Installing PyroCMS

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

**Heads Up:** Do not create a .env file just yet - Pyro's installer will generate one for you.

Via Installer

First, download the PyroCMS installer using Composer:

composer global require "pyrocms/installer"

Make sure to place the $HOME/.composer/vendor/bin directory (or the equivalent directory for your OS) in your $PATH so the pyro executable can be located by your system.

Once installed, the pyro new command will create a fresh PyroCMS installation in the directory you specify.

For instance, pyro new website.dev will create a directory named website.dev containing a fresh Pyro installation with all of Pyro's dependencies already installed:

pyro new website.dev

You can specify a specific version with the tag option and also include VCS sources with the dev option.

pyrocms new website.dev --tag=3.2.0 --dev

Via Composer

You may install PyroCMS by issuing the Composer create-project command in your terminal:

composer create-project pyrocms/pyrocms

If you are using a Windows environment, you might run into issues with the length of paths when unzipping packages. To avoid this issue, use the --prefer-source flag.

Host Configuration

When you setup your web host be sure to point the web root to Pyro's public directory. Just as you would a normal Laravel installation.

Directory Permissions

After installing, you may need to configure some permissions in order to proceed. Directories within the storage, public/app, and the bootstrap/cache directories should be writable by your web server. If you are using the Homestead virtual machine, these permissions should already be set.

If, when trying to access the installer below, you get a white screen. Your permissions are misconfigured.

Running the Installer

After downloading and installing PyroCMS and it's dependencies, you will need to install the software in order to get started. By this time you should be able to visit your site's URL which will redirect you to the installer: http://example.com/installer

Using the CLI Installer

Pyro comes with a CLI installer you can use if you like by running the following command:

php artisan install

You will be prompted for details in order to proceed with the installation process.

Automating the CLI Installer

You can automate the installer by creating your own .env file with something like this:

APP_ENV=local
APP_DEBUG=true
APP_KEY=zfesbnTkXvooWVcsKMw2r4SmPVNGbFoS
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=workbench
DB_USERNAME=root
DB_PASSWORD=root
APPLICATION_NAME=Default
APPLICATION_REFERENCE=default
APPLICATION_DOMAIN=localhost
[email protected]
ADMIN_USERNAME=admin
ADMIN_PASSWORD=password
LOCALE=en
TIMEZONE=UTC

Then run the installer and indicate that the system is ready to install:

php artisan install --ready
**Heads Up!** The APP_KEY must be exactly 32 characters in length.
Using the cURL Installer

Pyro also comes with a cURL installer you can use by executing the following CLI command:

curl -L --max-redirs 100 "http://example.com/installer/process?database_driver=mysql&database_host=localhost&database_name=workbench&database_username=root&database_password=root&admin_username=admin&admin_email=ryan%40pyrocms.com&admin_password=password&application_name=Default&application_reference=default&application_domain=workbench.local%3A8888&application_locale=en&application_timezone=UTC&action=install"

If desired you can make a browser request to the same URL and append &verbose=true to load the installer directly without a GUI.

Post Installation

Upon logging in the first time after installation you will notice the suggestion to delete the Installer module. To do this simply remove the "anomaly/installer-module" requirement from your project's composer.json file and run composer update.

If you are not using composer going forward you can simply delete /core/anomaly/installer-module from your Pyro installation.