Skip to content

Commit d70d33b

Browse files
author
enoch85
committed
fina touches
1 parent f2f85c7 commit d70d33b

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<div class="information">
7878
<p>Thank you for downloading the pre-configured Wordpress VM! If you see this page, you have successfully mounted the Wordpress VM on the computer that will act as host for Wordpress.</p>
7979
<p>To complete the installation, please run the setup script. You can find login details in the middle of this page.
80-
<p>Don't hesitate to ask if you have any questions. My email is: <a href="mailto:[email protected]?Subject=Before%20login%20-%20Wordpress%20VM" target="_top">[email protected]</a> You can also check the <a href="https://www.techandme.se/complete-install-instructions-wordpress/" target="_blank">complete install instructions</a>.</p>
80+
<p>Don't hesitate to ask if you have any questions. My email is: <a href="mailto:[email protected]?Subject=Before%20login%20-%20Wordpress%20VM" target="_top">[email protected]</a> You can also check the <a href="https://www.techandme.se/install-instructions/" target="_blank">complete install instructions</a>.</p>
8181
<p>Please <a href="https://www.techandme.se/thank_you">donate</a> if you like it. All the donations will go to server costs and developing, making this VM even better.</p>
8282

8383
</div>

wordpress-startup-script.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ cat << EOMSTART
109109
| This script will do the final setup for you |
110110
| |
111111
| - Set static IP |
112+
| - Create a new WP user |
112113
| - Upgrade the system |
113114
| - Activate SSL (Lets Encrypt) |
114115
| - Install phpMyadmin |
@@ -208,6 +209,14 @@ bash $SCRIPTS/test_connection.sh
208209
sleep 2
209210
clear
210211

212+
# Update WP SiteURL
213+
grep "address" /etc/network/interfaces > ip.txt
214+
sed -i "s| address ||g" ip.txt
215+
NEWADDRESS=$(grep "." ip.txt)
216+
echo "http://$NEWADDRESS/wordpress" > ip.txt
217+
wp option update siteurl < ip.txt --allow-root --path=$WPATH
218+
rm ip.txt
219+
211220
# Change password
212221
echo -e "\e[0m"
213222
echo "For better security, change the Linux password for user [wordpress]"
@@ -341,6 +350,7 @@ rm $SCRIPTS/wordpress-startup-script.sh
341350
rm $SCRIPTS/ip.sh
342351
rm $SCRIPTS/test_connection.sh
343352
rm $SCRIPTS/instruction.sh
353+
rm $WPATH/wp-cli.yml
344354
sed -i "s|instruction.sh|techandme.sh|g" /home/wordpress/.bash_profile
345355
cat /dev/null > ~/.bash_history
346356
cat /dev/null > /var/spool/mail/root

wordpress_install.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,20 @@ MYSQL_SCRIPT
156156
wp core config --allow-root --dbname=$WPDBNAME --dbuser=$WPDBUSER --dbpass=$WPDBPASS --dbhost=localhost
157157
echo "Wordpress DB: $WPDBPASS" >> $PW_FILE
158158

159+
# Create wp-cli.yml
160+
touch $WPATH/wp-cli.yml
161+
cat << YML_CREATE > "$WPATH/wp-cli.yml"
162+
apache_modules:
163+
- mod_rewrite
164+
core config:
165+
extra-php: |
166+
define( 'WP_DEBUG', false );
167+
define( 'WP_CACHE_KEY_SALT', 'wpredis_' );
168+
define('WP_REDIS_MAXTTL', 9600);
169+
SSL_CREATE
170+
159171
# Install Wordpress
160-
wp core install --allow-root --url=http://$ADDRESS/wordpress/ --title=Wordpress --admin_user=$WPADMINUSER --admin_password=$WPADMINPASS [email protected]
172+
wp core install --allow-root --url=http://$ADDRESS/wordpress/ --title=Wordpress --admin_user=$WPADMINUSER --admin_password=$WPADMINPASS [email protected] --skip-email
161173
echo "WP PASS: $WPADMINPASS" > /var/adminpass.txt
162174
chown wordpress:wordpress /var/adminpass.txt
163175

0 commit comments

Comments
 (0)