I’d like to be able to write some scripts to completely automate the creation of WordPress droplets on Ubuntu Server. But, I’d like customized WordPress droplets that are not currently offered in the Digital Ocean droplet creation UI.
For example…I’d like the WordPress droplets to run on Nginx on Ubuntu instead of Apache. The Digital Ocean WordPress application runs on Apache while the LEMP application install does not include WordPress.
Neither instance has a firewall enabled - which Digital Ocean does recommend doing once the droplet is created.
Neither instance includes Varnish, which may help with page load times.
While I can look up how to manually enable the firewall, how to install WordPress on LEMP and even how to install Varnish…I would like to be able to script all of this (starting with using the Digital Ocean v2 API) so that I can create my own web UI to start an instance of WordPress on LEMP with Varnish and the firewall configured and ready to go.
Doing this all via scripting seems like it would save a lot more time than manually setting everything up for each server.
How would you go about doing this? Are there any tutorials on scripting this sort of thing?
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!