---
title: "ServerPilot, Digital Ocean and Craft CMS"
date: 2016-11-05T12:51:00-04:00
author: cc_admin
canonical_url: "https://caffeinecreations.ca/blog/serverpilot-digital-ocean-and-craft-cms/"
section: Blog
---
![Craft Serverpilot Digitalocean](https://caffeinecreations.ca/uploads/blog/_1920x660_crop_center-center_none_ns/craft-serverpilot-digitalocean.jpg)

- [Web Development](https://caffeinecreations.ca/blog/category/web-development/), [CraftCMS](https://caffeinecreations.ca/blog/category/craftcms/)

# ServerPilot, Digital Ocean and Craft CMS

Setting up a server with [Digital Ocean](https://m.do.co/c/6510efa493b7), [Server Pilot](https://www.serverpilot.io/?refcode=e2827853319a) and CraftCMS, intimidating but easier than I thought. Here is everything you need to know.

I recently changed hosts due to a bad support experience and learning that my previous host had been acquired by EIG. Find out why EIG is evil by reading [this](https://www.reviewhell.com/blog/endurance-international-group-eig-hosting/), [this](http://www.linux-depot.com/non-endurance-international-group-eig-hosting/) and [this](http://www.webhostingsecretrevealed.net/blog/site-updates-news/the-who-what-when-of-endurance-international-group-eig/). My new host seemed to meet all of my requirements. However after a few weeks my site became ridiculously slow and I learned that the server response was sitting at 3.7 seconds. Yesterday and this morning I looked at Digital Ocean as a replacement.

I had previously looked at [Digital Ocean](https://m.do.co/c/6510efa493b7) but was intimidated by having to set up all aspects of the server. I was talking with Andrew Welch in the Craft Slack room and he suggested looking at [Server Pilot](https://www.serverpilot.io/?refcode=e2827853319a) or [Forge](https://forge.laravel.com/). So I tried out Server Pilot and after a couple of minor hiccups everything is working fine.

One thing that I like about using serverpilot is no matter what server you are on, your path is exactly the same.

```
<button class="absolute z-10 flex items-center justify-center w-8 h-8 -translate-y-1/2  -right-4 -top-4" clipboard="" title="Copy to Clipboard" to="" type="button" x-clipboard.raw="/srv/users/serverpilot/apps/APP_NAME/public/" x-data="">
	<svg class="h-5 w-5" viewbox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
  <rect fill="#f3f4f6" height="53" rx="3" width="41" x="7" y="2"></rect>
  <rect fill="#f3f4f6" height="51" rx="3" width="39" x="19" y="11"></rect>
  <path d="M53.98 9.143h-3.97c-.082 0-.155.028-.232.047V5.023C49.778 2.253 47.473 0 44.64 0H10.217C7.384 0 5.08 2.253 5.08 5.023v46.843c0 2.77 2.305 5.023 5.138 5.023h6.037v2.268c0 2.67 2.216 4.843 4.941 4.843H53.98c2.725 0 4.942-2.173 4.942-4.843v-45.17c0-2.671-2.217-4.844-4.942-4.844zM7.11 51.866V5.023c0-1.649 1.394-2.991 3.106-2.991H44.64c1.712 0 3.106 1.342 3.106 2.99v46.844c0 1.649-1.394 2.991-3.106 2.991H10.217c-1.712 0-3.106-1.342-3.106-2.99zm49.778 7.29c0 1.551-1.306 2.812-2.91 2.812H21.195c-1.604 0-2.91-1.26-2.91-2.811v-2.268H44.64c2.833 0 5.138-2.253 5.138-5.023V11.128c.077.018.15.047.233.047h3.968c1.604 0 2.91 1.26 2.91 2.811v45.17z"></path>
  <path d="M38.603 13.206H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 21.333H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 29.46H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM28.444 37.587h-12.19a1.015 1.015 0 1 0 0 2.032h12.19a1.015 1.015 0 1 0 0-2.032z"></path>
</svg>
<div class="sr-only">Copy to clipboard</div></button>```php
/srv/users/serverpilot/apps/APP_NAME/public/
```
```

this makes it really easy to set path settings instead of having to fumble around Cpanel trying to find the path or creating a phpfile to find the path via a front end page.

The only real issue I ran into was that initially this site wouldn't load because of a SQL error.

> Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE\[42000\]: Syntax error or access violation: 1055 Expression #18 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'creighton\_mma\_craft.structureelements.root' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql\_mode=only\_full\_group\_by

![Putty](https://caffeinecreations.ca/uploads/blog/_400xAUTO_fit_center-center_none_ns/732/putty.jpg)Insert ip address into host field

This error will not be present once Craft 3 is released but for Craft 2.x versions it occurs. Fortunately there is a fix documented [here](https://serverpilot.io/community/articles/how-to-disable-strict-mode-in-mysql-5-7.html). I'll copy the details below as well.

You need to SSH in to your server as root. On windows you can do this with [putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/) and adding your servers IP into the host field. Click open and when prompted type **root** for user and your root password which you should have received when creating your digital ocean account.

Once you've successfully SSH'd into the site you need to enter the following lines and hit return.

```
<button class="absolute z-10 flex items-center justify-center w-8 h-8 -translate-y-1/2  -right-4 -top-4" clipboard="" title="Copy to Clipboard" to="" type="button" x-clipboard.raw="[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" x-data="">
	<svg class="h-5 w-5" viewbox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
  <rect fill="#f3f4f6" height="53" rx="3" width="41" x="7" y="2"></rect>
  <rect fill="#f3f4f6" height="51" rx="3" width="39" x="19" y="11"></rect>
  <path d="M53.98 9.143h-3.97c-.082 0-.155.028-.232.047V5.023C49.778 2.253 47.473 0 44.64 0H10.217C7.384 0 5.08 2.253 5.08 5.023v46.843c0 2.77 2.305 5.023 5.138 5.023h6.037v2.268c0 2.67 2.216 4.843 4.941 4.843H53.98c2.725 0 4.942-2.173 4.942-4.843v-45.17c0-2.671-2.217-4.844-4.942-4.844zM7.11 51.866V5.023c0-1.649 1.394-2.991 3.106-2.991H44.64c1.712 0 3.106 1.342 3.106 2.99v46.844c0 1.649-1.394 2.991-3.106 2.991H10.217c-1.712 0-3.106-1.342-3.106-2.99zm49.778 7.29c0 1.551-1.306 2.812-2.91 2.812H21.195c-1.604 0-2.91-1.26-2.91-2.811v-2.268H44.64c2.833 0 5.138-2.253 5.138-5.023V11.128c.077.018.15.047.233.047h3.968c1.604 0 2.91 1.26 2.91 2.811v45.17z"></path>
  <path d="M38.603 13.206H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 21.333H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 29.46H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM28.444 37.587h-12.19a1.015 1.015 0 1 0 0 2.032h12.19a1.015 1.015 0 1 0 0-2.032z"></path>
</svg>
<div class="sr-only">Copy to clipboard</div></button>```sql
[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
```
```

Finally restart MySQL by entering the following.

```
<button class="absolute z-10 flex items-center justify-center w-8 h-8 -translate-y-1/2  -right-4 -top-4" clipboard="" title="Copy to Clipboard" to="" type="button" x-clipboard.raw="sudo service mysql restart" x-data="">
	<svg class="h-5 w-5" viewbox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
  <rect fill="#f3f4f6" height="53" rx="3" width="41" x="7" y="2"></rect>
  <rect fill="#f3f4f6" height="51" rx="3" width="39" x="19" y="11"></rect>
  <path d="M53.98 9.143h-3.97c-.082 0-.155.028-.232.047V5.023C49.778 2.253 47.473 0 44.64 0H10.217C7.384 0 5.08 2.253 5.08 5.023v46.843c0 2.77 2.305 5.023 5.138 5.023h6.037v2.268c0 2.67 2.216 4.843 4.941 4.843H53.98c2.725 0 4.942-2.173 4.942-4.843v-45.17c0-2.671-2.217-4.844-4.942-4.844zM7.11 51.866V5.023c0-1.649 1.394-2.991 3.106-2.991H44.64c1.712 0 3.106 1.342 3.106 2.99v46.844c0 1.649-1.394 2.991-3.106 2.991H10.217c-1.712 0-3.106-1.342-3.106-2.99zm49.778 7.29c0 1.551-1.306 2.812-2.91 2.812H21.195c-1.604 0-2.91-1.26-2.91-2.811v-2.268H44.64c2.833 0 5.138-2.253 5.138-5.023V11.128c.077.018.15.047.233.047h3.968c1.604 0 2.91 1.26 2.91 2.811v45.17z"></path>
  <path d="M38.603 13.206H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 21.333H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM38.603 29.46H16.254a1.015 1.015 0 1 0 0 2.032h22.35a1.015 1.015 0 1 0 0-2.032zM28.444 37.587h-12.19a1.015 1.015 0 1 0 0 2.032h12.19a1.015 1.015 0 1 0 0-2.032z"></path>
</svg>
<div class="sr-only">Copy to clipboard</div></button>```html
sudo service mysql restart
```
```

Refresh your Craft powered website and all is good. Now instead of a server response of 3.7 second [Digital Ocean](https://m.do.co/c/6510efa493b7) is responding in 0.38 seconds and I am currently using the cheapest plan.

## Related Articles

[![Forge, Digital Ocean, and Craft CMS Thumbnail](https://caffeinecreations.ca/uploads/blog/_680x320_crop_center-center_65_none_ns/forge-digitalocean-craft-1.jpg)### Forge, Digital Ocean, and Craft CMS](https://caffeinecreations.ca/blog/forge-digital-ocean-and-craft-cms/)

[![The Dangers of Over Reliance on Plugins in Website Builds Thumbnail](https://caffeinecreations.ca/uploads/hero/_680x320_crop_center-center_65_none_ns/gears.jpeg)### The Dangers of Over Reliance on Plugins in Website Builds](https://caffeinecreations.ca/blog/the-dangers-of-over-reliance-on-plugins-in-website-builds/)

[![Client Controlled Site Navigation Thumbnail](https://caffeinecreations.ca/uploads/blog/_680x320_crop_center-center_65_none_ns/craftcms.jpg)### Client Controlled Site Navigation](https://caffeinecreations.ca/blog/client-controlled-site-navigation/)
