#!/bin/bash ### install-wp: install wordpresses automatically including mysql DBs ### Install an arbitrary number of wordpress sites automatically. Let's say a ### dozen for now but it should handle more. ### We'll need to : ### * create folders and drop the files in place (easy) ### * create mysql users and databases (easy), hopefully as non-root (still pretty easy with prep) ### * fake up a hosts file against localhost for maximum portability (easy) ### * script through the WP install pages with wget/curl (slightly tricky) using all the rest ### inputs, ## list of domain names domain.tld one per line sites_in=wp_sites ### outputs ## IP domain.tld www.domain.tld host_file=host_file ## SQL script to run as priv'd user to create users and databases sql_out=sql_out ### all kinds of preflight checks go here ### generate mysql script file ### generate hosts file ### generate site directories, copy files ### configure the wp-config.php file's variables ### and click through the WP installer