These are some useful scripts I wrote to automate configuration work.
Most scripts use these variables. Variable names should be self-explanatory.
# Custom global vars
export HOSTS_FILE='/etc/hosts'
export APACHE_VHOSTS_ROOT_DIR='...'
export APACHE_VHOSTS_CONF_DIR='...'
export MYSQL_DATA_DIR='...'
export MYSQL_HOST='...'
export MYSQL_ROOT_USER='...'
export MYSQL_ROOT_PASS='...'
export DEFAULT_MYSQL_USER_PASS='...'
export DEFAULT_WORDPRESS_USER_NAME='...'
export DEFAULT_WORDPRESS_USER_EMAIL='...'
export DEFAULT_WORDPRESS_USER_PASS='...'
export DEFAULT_DRUPAL_USER_NAME='...'
export DEFAULT_DRUPAL_USER_EMAIL='...'
export DEFAULT_DRUPAL_USER_PASS='...'
- Creates a site folder
- Setup & configuration of apache vhosts
- Adds the vhost name to the hosts file
lazyvhost-create portfolio
This will create folder and setup a Vhost for 'portfolio'. Look at the source for more details.
- Local sites can have the same name for VHost, Site folder, theme folder, Datanase name, Database user
- Apache uses VHosts
- Apache uses single VHost file for each VHost
- Creates a new Consular project that is dependant in the folder structure used in
wp-install
- Downloads, Configures and installs latest version of WordPress
- Installs and Activates a custom theme.
Uses both lazyvhost-create
and lazyconsular-installproject
lazywp-install portfolio
This will create and configure a VHost for 'portfolio' and then proceed to install and configure a WordPress there.
- Local sites can have the same name for VHost, Site folder, theme folder, Datanase name, Database user
- Goes to the project folder and creates a DB backup
Requires wp-cli
lazywp-dbexport portfolio
- Installs & Configures a local Drupal site
lazydrupal-install portfolio