Developer Documentation

Overview

The developer documentation will guide you through the process of installing Coaster CMS on the hosting platform of your choice. Use the links to the right to find specific detailed documentation on an area of interest.

Requirements

  • Web Server (Apache/Nginx recommended)
  • PHP (>5.6)
  • MySQL or MariaDB
  • composer (see below)

Install on Windows

To install on Windows we recommend using an all in one solution such as WAMP/XAMPP, or preferably Docker or Laravel Homestead. If you do decide to use WAMP, you may have to make some changes to PHP's ini file to prevent SSL errors with cURL.

Download the cacert.pem certificate file from http://curl.haxx.se/ca/cacert.pem and save it to C:\xampp\php\extras\ssl\cacert.pem or your server's equivalent. Find the correct php.ini file for your PHP version and append the following line:

curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"

Ensure this line is not duplicated anywhere else within the file, and remove any semi-colons present at the beginning of the line. Finally, restart WAMP or XAMPP to reload changes made to the php.ini file.

Composer Installation

Coaster CMS can be installed and updated through Composer. If you don't already have Composer, you can find detailed instructions over at https://getcomposer.org/. Once you have Composer set-up and installed, run the command below to create a new Coaster project:

composer create-project web-feet/coastercms [project-name]

Note: replace [project-name] with a name of your choice, be sure to exclude the brackets.

Set up a MySQL database to host your content

Make sure the following folders/file are/is writable:

/public
/public/cache
/public/themes
/public/uploads
/.env

Installing or adding to an existing Laravel project

The steps are as follows:

1. Add "web-feet/coasterframework": "5.3.*" to the composer.json file and run composer update
2. Go to the root directory of your project.
3. Add the folders /coaster and /uploads to your public folder.
4. Run the script

php vendor/web-feet/coasterframework/updateAssets

5. Add the service provider CoasterCms\CmsServiceProvider::class to your config/app.php file.

Server Installation

Coaster requires the PHP zip extension to function correctly, this is required to install themes.

Coaster's files must be uploaded to the root of your site's directory with the document root set to point towards the public folder, examples of this are shown for both Apache and Nginx web servers below:

Apache

Unix Systems

To install Apache, PHP, MySQL on Linux or macOS we recommend using package management software such as homebrew. There are lots of tutorials out there to help with this process.

Windows Systems

Use WAMP.

The following virtual host configuration will ensure that Coaster runs as it was meant to when running on an Apache web server.

<VirtualHost *:80>
  ServerName www.yoursite.com
  DocumentRoot "/var/www/yoursite/public"
  <Directory "/var/www/yoursite/public">
    AllowOverride all
  </Directory>
</VirtualHost>

Nginx

Unix Systems

To install Nginx, PHP, MySQL on Linux or Mac OS we recommend using package management software such as homebrew/apt-get. There are lots of tutorials out there to help with this process.

Windows

There aren't any package managers (currently) for Windows, Google is your friend here for tutorials such as this.

The configuration below will also ensure that your site works with Coaster's URL structure.

server {
        listen   80;

        root /usr/share/nginx/html/yoursite/public;
        index index.php index.html index.htm;

        rewrite ^/index.php/(.*) /$1  permanent;

        server_name www.yoursite.com;

        location / {
		index index.html index.php;
  		try_files $uri $uri/ /index.php$is_args$args;
        }

        location ~ /\. {
        	deny all;
        }

        # pass the PHP scripts to FastCGI server listening on the php-fpm socket
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        }

}

For other ways of installing the Laravel framework, please refer to the Laravel installation documentation.

Using Coaster and HTTPS (SSL)

If you wish to use HTTPS (SSL) alongside Nginx on your Coaster enabled website, you will need to go through some additional steps to prevent any unwanted redirect loops. More details on setting up SSL can be found at https://bashy.im/blog/nginx-redirect-to-https-with-without-www-subdomain.

Updating

Coaster CMS works with Composer, therefore you can download the latest changes via the Composer update command.

Modern Framework

Based on Laravel 5

Constant development

Additional features always being planned/researched

Open source

"git" involved

Latest from the blog


read more


read more


read more