Configure a production ready WordPress Installation on your Digital Ocean VPS

1. Create a WordPress droplet on Digital Ocean, at the time of this writing I am creating WordPress 4.7 on Ubuntu 16.04
2. Configure your domain to it points towards your newly created WordPress droplet
3. SSH into the the droplet and do the following:
SSL:

sudo apt-get update
sudo apt-get install python-letsencrypt-apache
sudo letsencrypt --apache -d boviskoala.com -d www.boviskoala.com
sudo crontab -e

hit enter and then paste this at the bottom of the config , save and exit.

30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log

Save your root password so you can secure mysql

sudo nano /root/.digitalocean_password

then secure your mysql:

mysql_secure_installation

then create admin user:

adduser testuser
usermod -aG sudo testuser
ssh-copy-id testuser@your_server_ip
sudo nano /etc/ssh/sshd_config

uncomment and set these commands to the following to disable root ssh access and ssh with only password:

PasswordAuthentication no
PermitRootLogin no

Reload your ssh daemon

sudo systemctl reload sshd

4. Open a browser and go to your domain and configure WordPress!

5. Create a ssh key


ssh-keygen -t rsa

cat id_rsa.pub

copy the output from the cat command and save it for later use. Great for bitbucket deployment key!
6. Go back to the terminal and shut the droplet down

shutdown -h now

7. Create a snapshot backup through Digital Ocean of your fully configured droplet thats perfect
8. Power it back up through Digital Ocean
More info:

http://do.co/wordpressapp

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04

Add your comment