This repository was archived by the owner on Mar 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdomain-config.sh
More file actions
executable file
·84 lines (65 loc) · 1.78 KB
/
Copy pathdomain-config.sh
File metadata and controls
executable file
·84 lines (65 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#! /bin/bash
#
# Default Domain Configuration File
#
# DO NOT UPDATE THIS FILE : Use config.sh
# DO NOT UPDATE THIS FILE : Use config.sh
# DO NOT UPDATE THIS FILE : Use config.sh
#
# @version 1.0.0
#
# @author Chris Winters https://github.com/ChrisWinters
#
# MIT License
# https://raw.githubusercontent.com/ChrisWinters/wp-cli-localhost/master/LICENSE
###################################
## ##
## DO NOT EDIT THIS FILE ##
## use config.sh file! ##
## ##
###################################
# Domain Name Parameter
# $2 From Shell Function "domain"
DOMAIN=$1;
# Path To Local Domains
SITE_PATH="/var/www/html";
# Base Localhost URL (http or https?)
LOCAL_DOMAIN_URL="http://${DOMAIN}";
# Local Hosts IP
HOSTS_IP="127.0.0.1";
# Database Login Details
# mysql_config_editor set --login-path=local --host=localhost --user=root --password
DB_USER="";
DB_PASS="";
DB_HOST="";
# WordPress Super User
ADMIN_USER="";
ADMIN_PASS="";
ADMIN_EMAIL="";
# WordPress GMT Offset
GMT_OFFSET="";
# WordPress Category Base
CATEGORY_BASE="";
# Default WordPress Category Name & Slug
CATEGORY_NAME="";
CATEGORY_SLUG="";
# WordPress Tag Base
TAG_BASE="";
# Default Permalink Structure
PERMALINK="/%postname%/";
# WordPress Dev Error Log
ERROR_LOG="${SITE_PATH}/error.log";
# Path WP-Cli-Localhost
WP_CLI_LOCALHOST_PATH=$(pwd);
# Localhost Domains List
DOMAINS_LIST="${WP_CLI_LOCALHOST_PATH}/domains.log"
# Full Path To Localhost Domain
LOCAL_DOMAIN_PATH="${SITE_PATH}/${DOMAIN}";
# Host Entry Record
HOSTS_ENTRY="${HOSTS_IP} ${DOMAIN}";
# Database Name
DB_NAME=$(echo ${DOMAIN} | sed -e 's/-/_/g' | cut -f 1 -d '.');
# Include User config.sh File
if [[ -f ${WP_CLI_LOCALHOST_PATH}/config.sh ]]; then
source ${WP_CLI_LOCALHOST_PATH}/config.sh;
fi