Commit 7c008182 authored by root @ l1's avatar root @ l1

use wp-cli for init/

parent 23aa12be
if [ $# -lt 4 ]; then
echo Usage: ./ "Example Domain" "example" ""
exit 1
echo Unpacking latest WordPress into /data/www-content... echo Unpacking latest WordPress into /data/www-content...
curl -L | tar xz curl -O
rm -rf /data/www-content php /root/wp-cli.phar --path="/data/www-content" --allow-root core download
mv wordpress /data/www-content php /root/wp-cli.phar --path="/data/www-content" --allow-root core config --dbname=wordpress --dbuser=root
php /root/wp-cli.phar --path="/data/www-content" --allow-root db create
echo Creating wp-config.php... PWD=`pwgen 40 1`
mv wp-config.php /data/www-content/wp-config.php php /root/wp-cli.phar --path="/data/www-content" --allow-root core install \
curl -L >> /data/www-content/wp-config.php --url="$1" --title="$2" --admin_user="$3" --admin_password="$PWD" --admin_email="$4"
php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin install wordpress-https
echo Setting ownership and permissions... php /root/wp-cli.phar --path="/data/www-content" --allow-root plugin activate wordpress-https
chown -R root:www-data /data echo "user: $3" > /data/login.txt
chmod -R 600 /data echo "pass: $PWD" >> /data/login.txt
chmod -R 650 /data/www-content echo "Done, login details saved to /data/login.txt"
chmod -R 770 /data/www-content/wp-content
echo Starting MySQL so that you can import wordpress.sql...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment