Skip to content

Instantly share code, notes, and snippets.

@mohsin
Last active September 20, 2017 21:11
Show Gist options
  • Select an option

  • Save mohsin/635028ddeba6e63279df69b260306635 to your computer and use it in GitHub Desktop.

Select an option

Save mohsin/635028ddeba6e63279df69b260306635 to your computer and use it in GitHub Desktop.
OctoberCMS Web Project Setup

Checklist available as Trello board as well. Copy board at https://trello.com/b/3jxpgyRE to use.

Setup OctoberCMS

  • Pull OctoberCMS
wget https://octobercms.com/download
unzip master
mv install-master/ Web
rm master
cd Web/
  • Link Valet to acme.dev
valet link acme.dev
  • Set up a Google dev account (acme.dev) for backups (15 GB limit)
  • Create a new empty database
  • Run OctoberCMS setup from http://acme.dev/install.php
  • If needed, setup a project ID and link it (last step of install)
  • Remove the unnecessary OctoberCMS files
rm -rf install*
rm README.md
  • Remove initial data and setup the environment.
php artisan october:fresh
php artisan october:env
  • Update logo and tagline in backend customize theme
  • Change the email template to "Welcome to Acme" and sender name in Mail Configuration to "Acme Developer"
  • Set timezone in app.php and cms.php to Asia/Kolkata
  • New theme? Create empty theme "some-theme"
  • Like version control? Do these setups.
  • Re-run OctoberCMS setup on prod following above steps (git clone won't cut it) followed by this
  • Set the email provider

Version Control Setup

  • Initialize Git Repository using git init
  • Add .gitignore as here
  • Privately maintained plugin? Add gitignore rule !plugins/{AUTHOR_NAMESPACE}/{PLUGIN_DIR}/ under Plugins and themes after plugins/* to track it
  • Privately maintained theme? Add gitignore rule !themes/{THEME_DIR}/ under Plugins and Themes after themes/* to track it
  • If needed, create README.md and LICENSE.md
  • Create bitbucket repo and add the remote to the local repo.

Production Setup

  • Install there server's ssh key into ~/.ssh/config and if needed copy pub key to server for autologin
ssh-copy-id -i ~/.ssh/id_rsa.pub sshalias
  • Set up bare git repository on server
mkdir Web.git
cd Web.git
git init --bare
cd hooks
touch post-receive
chmod +x post-receive
vim post-receive
#!/bin/sh
GIT_WORK_TREE=’/path/to/public/html’ git checkout -f
  • Point web branch of local repo to this bare repo
git remote add web username@sshalias:/path/to/Web.git
  • If no https, set backendForceSecure to false in cms.php to prevent browsers from showing a untrusted website page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment