needed to change to the wordpress folder to run the wp command

This commit is contained in:
Ken Johnson 2020-11-02 15:26:58 -08:00
parent ba5c651406
commit e5e2558924
1 changed files with 5 additions and 8 deletions

View File

@ -79,10 +79,6 @@ FLUSH PRIVILEGES;
CREATE DATABASE ${DB};
EOF
# Make the default log directory
mkdir /var/log/zm
chown www:www /var/log/zm
else
# Mysql <= 56 does not
@ -106,10 +102,6 @@ if [ -e "/etc/iocage-env" ] ; then
echo "Using NAT Address: $IOCAGE_PLUGIN_IP"
fi
#Use wp to complete the Wordpress installation
su -m www -c "wp core config --dbname=$DB --dbuser=$USER --dbpass=$PASS"
su -m www -c "wp core install --title=$DB --admin_user=$WPUSER --admin_password=$WPPASS --admin_email=ken@blkdoor.com
# create sessions tmp dir outside nextcloud installation
mkdir -p /usr/local/www/wordpress-sessions-tmp >/dev/null 2>/dev/null
chmod o-rwx /usr/local/www/wordpress-sessions-tmp
@ -119,6 +111,11 @@ chmod -R o-rwx /usr/local/www/wordpress
#updater needs this
chown -R www:www /usr/local/www/wordpress
#Use wp to complete the Wordpress installation
cd /usr/local/www/wordpress
su -m www -c "wp core config --dbname=$DB --dbuser=$USER --dbpass=$PASS"
su -m www -c "wp core install --title=$DB --admin_user=$WPUSER --admin_password=$WPPASS --admin_email=ken@blkdoor.com
#restart the services to make sure we have pick up the new permission
service php-fpm restart 2>/dev/null
#nginx restarts to fast while php is not fully started yet