Deploying October CMS

I’ve heard of October CMS a while back and have been wanting to play around with it and see how easily it can be deployed via Cleaver.

Here is my experience in a nutshell -

  1. Install October CMS on my local
    There are several options to install. I just chose the vanilla method
  • created new empty directory on my machine
  • Ran curl -s | php in the new directory via terminal
  1. Setup my local database
    October lets you connect to a MySQL, Postgress, SQLite, or SQL Server database. Of those options, Cleaver helps facilitate MySQL installations, so I setup a MySQL db. We do plan on supporting Postgress in the near future for Cleaver.
  • Create database named ‘october’
  1. Back in the terminal, go through the October CMS setup process by running the php artisan october:install command

This will take you through a setup wizard. Just remember to select the MySQL option and enter the database name you created. Once complete, October will let you know with -

  1. Setup your GitHub repo and push master to remote

  2. Poke around October a bit on your local
    October was created using Laravel and you can obviously see that. I saw on their documentation that you can change from their default file config setup to using standard DotEnv by running the php artisan october:env command. Which I did and the .env file was added to my root directory.

Also, you’ll want to find composer.json file and move it to the root directory. This will be necessary as Cleaver looks for it in the root on deploy.

  1. In Cleaver, I provisioned a new server with PHP 7.4 and MySQL8.

If you’re curious, here are the server requirements for October

PHP version 7.0.8 or higher
PDO PHP Extension
cURL PHP Extension
OpenSSL PHP Extension
Mbstring PHP Library
ZipArchive PHP Library
GD PHP Library
  1. While the new server is provisioning, I quickly setup an A record to use

  1. Once the server is finished provisioning, I add the database ‘october’

  2. And then, create a PHP site assigning the domain I previously created

  3. Next, setup a webapp

  4. Add the .env variables

  5. Add a db migration deployment hook. You’ll want to use Octobers command, which is php artisan october:up and then make sure to move the webhook before ‘Activate New Deployment’. Also, enable the deployment hooks for installing composer dependencies and yarn packages for the first deployment.

  6. Deploy and voila!

You may run into some issues; here are what I’ve experienced:

  • For some reason, after I deploy I usually see a key error when I go to the url. There is nothing wrong with the key, I’ve found that just going to the environments tab for the webapp in cleaver, fetching the variables, and then saving usually clears that up. Seems like something funky going on with October CMS.
  • For the database migration, if it doesn’t work the first time, try deploying again. i had to deploy twice at one point to clear some things up. If that doesn’t work, you may need to SSH into the server and work through some terminal errors that display
  • There was another odd issue when attempting to log in - which was a ‘invalid token’ kept popping up. This is typically a CSRF issue - in which case, there is an environment variable you can set to false - ENABLE_CSRF=false. This isn’t the most secure work-around obviously, but from what I saw, this issue has been brought up with October quite a bit and doesn’t “seem” corrected.
  • Which brings me to another issue, I was expecting to see a login link on the default splash page, but was no where to be seen. But, via Google, if you add /backend to your URL, this is the default login. You can change this in

thank you, but i wish to setup from github. because i improve this with develop some custom plugin.
if it manual, it’s not an issue

I setup from GitHub as well - I just made my own repro, armgitaar/october, and then referred to that repo in the webapp to deploy. If you have your own with custom code, should work unless there is something else going on.

hum, you have already vendor directory ? and where is composer.json , and other thing ?


Admittedly, I was having trouble figuring out how to get into the login portion. Well, after searching their website docs, then googling, I found it at /backend. With that, I saw some issues pop up; but, I was able to work through them. One issue, as you mentioned, is compose.json being in a sub-directory by default with October CMS. I just simply moved that file to the root directory as that is where it is typically expected to be and that solved that issue. I had some other strange issues with “app key” error popping up and “invalid session token” but was able to get around those as well. Anyways, I updated my instructions above to account for some of those curve balls.

ok. it s too complicated. i will use it from ploi or alwaysdata. with one click install.
thank you.

Makes sense - one click installs are a good way to go with CMS’s. We have WordPress now and Grav in the pipeline.