-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwordpress-install.sh
51 lines (40 loc) · 1.53 KB
/
wordpress-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
#!/bin/sh
### author: Liviu Panainte <liviu.panainte at gmail.com>
###
### This script fetches the latest version of Wordpress and
### installs it in the current directory
WP_LINK="http://wordpress.org/latest.tar.gz"
echo
echo "============================================="
echo "=== Wordpress installer by Liviu Panainte ==="
echo "============================================="
echo
if [ ! -f "wp-app.php" ]
then
echo "Creating a temporary folder named wp-tmp ...";
mkdir wp-tmp;
echo "Changing directory to wp-tmp ...";
cd wp-tmp;
echo "Downloading the latest version of WP from $WP_LINK ..."
curl -s http://wordpress.org/latest.tar.gz > wordpress.tar.gz;
echo "Extracting the WP archive ..."
tar -zxf wordpress.tar.gz;
echo "Removing the default bundled wp-content folder ..."
rm -rf wordpress/wp-content;
echo "Moving Wordpress files to the project root ..."
mv wordpress/* ../
echo "Removing the wp-tmp folder ..."
cd ..;
rm -rf wp-tmp
echo
echo "============================================="
echo "========== Installation completed! =========="
echo "========== =========="
echo "====== Don't forget to manually update ======"
echo "========== the wp-config.php file. =========="
echo "============================================="
echo
else
echo "Wordpress is already installed. Aborting script ..."
echo
fi