Serverpilot Server Configuation

Bryan Dugan1 min read

This is a list of all the configuration changes I made to my Digital Ocean/ServerPilot server.

Installed Applications

I have installed the Auto MySql Backup, Imagick, and Zip/Unzip applications to the server. Refer to the instructions below on how to install them yourself.

Auto MySQL Backup

apt-get install automysqlbackup

Imagick

Note: Replace the PHP version 7.3 with whatever version of PHP you are using.

sudo pecl7.3-sp install imagick

Select autodetect from settings

Copy installation to PHP 7.3

Note: Replace 7.3 with whatever version of PHP you are using.

sudo bash -c "echo extension=imagick.so > /etc/php7.3-sp/conf.d/imagick.ini"

Restart PHP

Note: Replace 7.3 with whatever version of PHP you are using.

sudo service php7.3-fpm-sp restart

Zip / Unzip

apt-get install zip unzip

Change PHP Settings per Application

To change PHP.ini settings in each app, create a file called .user.ini and place in your public folder

vim apps/APPNAME/public/.user.ini
memory_limit = 512M
max_execution_time = 300
upload_max_filesize = 512M

Change MySQL Default Settings

vim /etc/mysql/my.cnf

Change max_allowed_packet setting from 16M to 32M

Note: There was two places that need changing in the my.cnf file

max_allowed_packed = 32M

Restart MySQL for changes to take effect

sudo service mysql restart
Note: Any links leading you to products or services are most likely affiliate links that I will receive compensation from. I only promote products or services that I own/use myself and truly feel will deliver value to you. By purchasing products or service through these links, you will help support me to keep creating awesome ad-free content.