WordPress Ansible
This repository contains a playbook for provisioning modern hosting environments geared towards WordPress. It's based on How to Install WordPress on Ubuntu 18.04 and WordPress Nginx. The following is handled out of the box:
- User setup
- SSH hardening
- Firewall setup
It will also install the following software:
- Nginx with HTTP/2 and improved default configs
- PHP 7.4
- MariaDB
- Redis
- WP-CLI
- Fail2Ban
- Git
Usage
Configure your hosts file.
[production]
192.168.1.1 #sampledomain.com
Edit provision.yml to configure your default user, hashed sudo password and local public key path. This will create a new user on the provisioned servers that you can use to gain SSH access.
Run:
ansible-playbook provision.yml