Skip to content

Instantly share code, notes, and snippets.

@carlHandy
carlHandy / wp-server-block.sh
Created August 13, 2020 04:03
Installs and configures wordpress nginx server block.
#!/bin/bash
read -p 'Enter domain name: ' domain
# Functions
ok() { echo -e '\e[32m'$domain'\e[m'; } # Green
die() { echo -e '\e[1;31m'$domain'\e[m'; exit 1; }
NGINX_AVAILABLE='/etc/nginx/sites-available'
NGINX_ENABLED='/etc/nginx/sites-enabled'
WEB_DIR='/var/www'