Skip to content

Instantly share code, notes, and snippets.

@almonk
Created July 3, 2016 09:11
Show Gist options
  • Save almonk/83e9cb63a2ab3276f8a5dd79dbc7c016 to your computer and use it in GitHub Desktop.
Save almonk/83e9cb63a2ab3276f8a5dd79dbc7c016 to your computer and use it in GitHub Desktop.
Deploy Craft CMS to Digital Ocean
# Rename craft public/ to html/
# Add new db file locally
return array(
'*' => array(
'server' => 'localhost',
'database' => 'crafttest',
'tablePrefix' => 'craft'
),
'test.dev' => array(
'user' => 'root',
'password' => 'root',
'port' => '8889'
),
'178.62.121.75' => array(
'user' => 'root',
'password' => '*****',
)
);
# SSH into DO box
ssh root@whatever
# Enable mod_rewrite & a few other things
a2enmod rewrite
php5enmod mcrypt
sudo a2enmod headers
sudo service apache2 restart
# Fix permissions
chown -R www-data:www-data /var/www
chmod -R 770 /var/www
chmod -R 775 /var/www/craft
chmod -R 775 /var/www/html
chmod 774 /var/www/craft/app
chmod 774 /var/www/craft/config
chmod 774 /var/www/craft/storage
# Sync from local craft dir to remote
rsync -r -v ./ [email protected]:/var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment