-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwp-cli.sh
More file actions
50 lines (42 loc) · 1.99 KB
/
wp-cli.sh
File metadata and controls
50 lines (42 loc) · 1.99 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
#!/usr/bin/env bash
#----------------------------------------------------------------------------------
# EngineScript - A High-Performance WordPress Server Built on Ubuntu and Cloudflare
#----------------------------------------------------------------------------------
# Website: https://EngineScript.com
# GitHub: https://github.com/Enginescript/EngineScript
# License: GPL v3.0
#----------------------------------------------------------------------------------
# EngineScript Variables
source /usr/local/bin/enginescript/enginescript-variables.txt || { echo "Error: Failed to source /usr/local/bin/enginescript/enginescript-variables.txt" >&2; exit 1; }
source /home/EngineScript/enginescript-install-options.txt || { echo "Error: Failed to source /home/EngineScript/enginescript-install-options.txt" >&2; exit 1; }
# Source shared functions library
source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh || { echo "Error: Failed to source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh" >&2; exit 1; }
#----------------------------------------------------------------------------------
# Start Main Script
# WP-CLI
cd /usr/local/src
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
mkdir -p /tmp/wp-cli-phar
chown -R www-data:www-data /tmp/wp-cli-phar
chmod 775 /tmp/wp-cli-phar
mkdir -p ~/.wp-cli/cache
chown -R www-data:www-data ~/.wp-cli/cache
chmod 775 ~/.wp-cli/cache
# Install WP-CLI Extensions
wp package install pantheon-systems/wp_launch_check:@stable --allow-root
wp package install wp-cli/doctor-command:@stable --allow-root
echo ""
echo ""
echo "============================================================="
echo ""
echo "${BOLD}WP-CLI installed.${NORMAL}"
echo ""
echo "Learn about WP-CLI"
echo "https://make.wordpress.org/cli/handbook/"
echo ""
echo "============================================================="
echo ""
echo ""
sleep 5