-
Notifications
You must be signed in to change notification settings - Fork 1
/
wp-local-complete-install.sh
executable file
·55 lines (45 loc) · 1.46 KB
/
wp-local-complete-install.sh
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
echo 'please, create your repertoire website'
read rep
mkdir -v $rep
cd $rep
echo 'downloading WordPress'
wp core download
echo 'create the database'
mysql -u root -p"root" -e "CREATE DATABASE \`$rep\`;"
echo 'create the file wp-config.php'
wp core config --dbname=$rep --dbuser=root --dbpass=root <<PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define('WP_ENV', 'development');
PHP
#install Wordpress
TITLE='test'
ADMIN_USER='xav'
ADMIN_PASSWORD='xav'
EMAIL='[email protected]'
##read admin_email
#echo TITLE
wp core install --url=http://localhost:8888/$rep --title=$TITLE --admin_user=$ADMIN_USER --admin_password=$ADMIN_PASSWORD --admin_email=$EMAIL <<PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( ‘WP_MEMORY_LIMIT’, ‘256M’);
PHP
#echo TITLE
creation de post de 1 a 100
read -rp "You want som post by default (100 maximum): " post
#if [[ $post = *[!0-9]* ]]; then # if post contains any non-digits
#printf >&2 'Invalid input\n'
#elif (( post < 0 || post > 100 )); then
#printf >&2 '%d is out of range (0-100)\n' "$post"
#else
##printf 'Creating post %d\n' "$post"
#curl http://loripsum.net/api/5 | wp post generate --post_content --count=$post
#fi
curl http://loripsum.net/api/5 | wp post generate --post_content --count=10
wp theme install https://github.com/roots/sage/archive/master.zip
wp theme activate sage-master
wp theme list
cd $PWD/wp-content/themes/sage-master
npm install
bower install
gulp