Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Accepted Answer
Greetings!
While that may be possible to do, there could be no guarantee that it wouldn’t be broken by an update. Instead, I would like to suggest that you consider installing Wordpress entirely from within the user-data. I have a sample script for you here:
https://github.com/digitalocean/do_user_scripts/blob/master/Ubuntu-16.04/cms/wordpress.sh
Jarland
Thanks @jarland that might actually work out pretty well. And the script looks pretty straightforward. Let me test out the script tonight and see if it does everything needed for WP to work. If so, I’d rather create an actual one Click install app. It would use the DigitalOcean API to create the droplet with everything pre-installed.
@jarland your suggestion actually worked out pretty well, and the script is great. I’ve updated it a bit to install php7.2 else it wouldn’t work: https://github.com/lamazingco/digitalocean-wordpress-install-script/blob/master/wordpress.sh
For whoever is interested in using it properly add this to User Data:
#cloud-config
runcmd:
- curl https://raw.githubusercontent.com/lamazingco/digitalocean-wordpress-install-script/master/wordpress.sh | sh
To take it further I used the DO API call needed to create a droplet with the given config. api-key-goes-here needs to be replaced with the one generated here: https://cloud.digitalocean.com/account/api/tokens then execute the curl:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer api-key-goes-here" -d '{"name":"wp-server","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-18-04-x64","ssh_keys":null,"backups":false,"ipv6":true,"user_data": "#cloud-config
runcmd:
- curl https://raw.githubusercontent.com/lamazingco/digitalocean-wordpress-install-script/master/wordpress.sh | sh","private_networking":null,"volumes": null,"tags":["web"]}' "https://api.digitalocean.com/v2/droplets"
Checking the droplet IP it in ~5 min will display the WordPress install wizard. Tadam! Works like a charm! Thanks again @jarland for guidance!