-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings-template
executable file
·120 lines (94 loc) · 5.51 KB
/
settings-template
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Warning
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# This script uses **rm -rf** to remove the folder
# defined with **WP_PATH** if **DROP_WP **is set to **yes**.
# This script also **removes** the database defined with
# **DB_NAME** if **DROP_DB** is set to **yes**.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Handle with care and **MAKE BACKUPS**.
# Name your project. This cab be used as a suffix for database name or installation path. You should not use whitespace or special chars, as the project name will be used in the filesystem and / or database.
PROJECT=myProject
# Database settings
#
# --------------------------
# Do you want to remove the database provideded below before creating a new on?
DB_DROP=yes|no
DB_HOST=127.0.0.1
# The adress of your database, ip adress
DB_ROOT=user
DB_ROOT_PASSWORD=password
# The root user that allows the script to add a database or add a user. You don't need those parameters if database and user does exist.
CREATE_DB=yes|no
# Do you want to create a new database? If set to no, make sure that a database exists and credentials from below are valid. If yes, simply provide required details with the next two parameters.
DB_NAME="${PROJECT}_database"
DB_PREFIX="wp_"
# The settings will be used to create a database and, apparently, later as the WordPress setup process.
ADD_DB_USER=yes|no
# Do you want to create a database user? If no, you need to provide a user that has access to the database named above. If you want to add a new user, a root user needs to be set. You may use your own password or use the "built-in" random function:
DB_USER="${PROJECT}_dbuser"
DB_USER_PASSWORD=secret # or use this: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# General WordPress settings
#
# --------------------------
INSTALL_CORE=yes|no
# Do you want to install WordPress from the scratch? If set to no, the script expects a working installation in the destination folder
WP_PATH="/var/nginx/htdocs/${PROJECT}/"
# The path to your installation. You can use the PROJECT place holder here. Make sure, that the parent path is writable.
WP_DROP=yes|no
# Do you want to remove the database provideded below before creating a new on?
# It's recommend to use one database for every single WordPress installation.
# If you are running tests, you can keep as many WordPress installations on one database.
# In this case you **must** define a unique DB_PREFIX for every installation.
WP_TITLE='WordPress Blog'
# The title of your WordPress installation
URL="https://blog.example.com/${PROJECT}"
# The URL under that points to your installation.
WP_ADMIN_NAME=admin
WP_ADMIN_PASSWORD=secret # or use this: $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# Provide admin credentials for your WordPress installation. Again, you may provide a password or use a random function.
INSTALL_THEME=yes|no
THEME=hello-elementor
# Do you want to install a theme? If yes, provide the slug of the theme.
INSTALL_PLUGINS=yes|no
PLUGINS="elementor wordpress-seo tinymce-advanced ninja-forms shortcodes-ultimate instagram-feed ml-slider the-events-calendar amp contact-widgets coblocks woocommerce"
# Do you want to install plugins? If yes, provide the slug of one or more plugins, separated by space
# Content
#
# --------------------------
ADD_CONTENT=yes|no
# Do you want to add posts?
META_INPUT='{"_elementor_edit_mode":"<![CDATA[builder]]>","_elementor_template_type":"<![CDATA[kit]]>","_elementor_version":"<![CDATA[2.9.13]]>"}'
# Some e.g. Themes expect special information within the post meta data. You can define them here.
RANDOMIZE_EVERY_ITEM=yes|no
# If set to yes, every category, tag, post, post excerpt and post title will be randomized, this cost a lot of time, because it leads to a couple of HTTP requests.
# If set to no, we only query each API once to get one random item and re-use it every time.
COUNT_POSTS=1
# How many post do you want to create? If set to 0, no post will be created.
COUNT_PARAGRAPHS=1
# How many paragraphs each post should have?
COUNT_POST_REVISIONS=1
# How many post revisions do you need? If set to 0, no post revision will be created.
COUNT_TAGS=0
# How many tags do you want to add to every post? If set to 0, no tag will be added.
COUNT_CATEGORIES_LEVEL1=1
COUNT_CATEGORIES_LEVEL2=0
# This script will create two levels of categories. You you can define how many categories you need. Be aware that for every category in level 1 the defined amount of categories in level 2 will be created. If you define level1 = 10 and level2 = 10, you will get 100 categories.
# Misc
#
# --------------------------
# (you do not need to change the following settings)
WP_CLI_EXEC=~/wp-cli.phar
# This script requires WP CLI. Provide a location here. If WP CLI does not exist on this location, the script will download it.
WP_CLI_SOURCE=https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# The source of WP CLI.
# Those are the URL to some APIs delivering random text, words or images. You should not change them, as the script is build to work with them only.
RANDOM_WORD_API_URL='https://random-word-api.herokuapp.com/word?swear=0&number='
# This API delivers single words for the tags.
RANDOM_SENTENCE_API_URL='http://metaphorpsum.com/sentences/'
# This API delivers sentences for post titles.
RANDOM_TEXT_API_URL='http://metaphorpsum.com/paragraphs/'
# This API delivers random texts for the post content.
RANDOM_IMAGE_API_URI='https://picsum.photos/200/300.jpg'
# Last not least, an API to get random images.