In this section, we will go ahead and do a complete setup of WordPress, the required database server, hardening, and backup. Our platform of choice is Linux (Ubuntu 16.04) with nginx web server and with PHP-FPM for PHP runtime. We will use duply to set up the backups which will get stored in AWS S3.
A complete WordPress installation step-by-step
Setting up nginx web server
Setting up nginx is as simple as sudo apt-get install nginx, but configuring for our use case and managing the configuration's automated way is where Ansible gives the power. Let's look at the following snippet of nginx's role from the playbook:
- name: adding nginx signing key
apt_key:
url: http://nginx.org/keys/nginx_signing.key
state...