rslw.xyz recently put me onto the Oracle Cloud Infrastructure Free Tier where you can get a selection of services for absolutely zero cost forever! Seems to good to be true but as it stands here is what is made available at no cost:
The AMD based instances you can create with 1 OCPU (2vCPUs), 1GB of RAM and 50GB of storage are more than enough to run a simple WordPress site and I decided to move my blog here to one of these instances. There are 2 WordPress sites I’d like to setup and it seemed like a good opportunity to make an Ansible playbook for the task. I’ve configured my instance like the screenshot below:
There are a couple ansible galaxy modules that have to be installed:
- community.mysql – https://galaxy.ansible.com/community/mysql
- community.general – https://galaxy.ansible.com/community/general
Steps to configure
Recommend using Visual Studio Code to find and replace where needed:
- Configure nginx config file: example.com (replace “example.com” with your domain).
- Rename the example.com file to your domain name.
- Replace “example.com” with your domain name in the “main.yml” file.
- Update the password field in the “wp-config.php” file
- Replace the salts in the “wp-config.php” with your own from here: https://api.wordpress.org/secret-key/1.1/salt/
- Update the password fields in “hosts.ini”, the “wordpressuser” password should match the “wp-config.php” file.
- Update the “hosts.ini” file with your server IP.
Run “ansible-playbook main.yml -b” from your cloned repo.
GitHub Project Link
You can get the Ansible Playbook here: https://github.com/samhep/oci-wordpress-ansible