handle premium extensions

This commit is contained in:
Kiara Grouwstra 2023-10-17 00:12:10 +02:00
parent 781d0f9d5b
commit 5b08cc360b
2 changed files with 27 additions and 7 deletions

View File

@ -4,7 +4,7 @@ This script automates installing Wordpress with all specific BIJ1 plugins,
template and Advanced Custom Fields settings.
Steps:
- install `php` and `php-mysql`
- install `zip`, `unzip`, `php` and `php-mysql`
- First you have to setup a database on the db server, e.g. for MariaDB/MySQL (substituting `$WORDPRESS_DB_USER`, `$db`, `$password`, `$server`):
- ```sql
CREATE USER '$WORDPRESS_DB_USER'@'$server.internal.bij1.net' IDENTIFIED BY '$password';

View File

@ -71,6 +71,25 @@ echo -e "\n\n\n"
echo "Installing plugins"
function install_zipped_ext {
# work-around for timeout issues during download
echo "install_zipped_ext $@"
name="$1"
url="$2"
filename=$(mktemp)
curl -L --output $filename $url
unzip -q $filename
dirname=$(find -maxdepth 1 -name "${name}*" -type d)
dirname=$(basename $dirname)
[ "$dirname" = "$name" ] || mv -v $dirname $name
zip -r $name.zip $name
./wp plugin install $name.zip --activate --allow-root
}
./wp plugin install advanced-custom-fields --activate --allow-root
# ./wp plugin install acf.zip --activate --allow-root
# ./wp plugin install https://gitlab.com/wordpress-premium/advanced-custom-fields-pro/-/archive/v6.2.0/advanced-custom-fields-pro-v6.2.0.zip --activate --allow-root
@ -85,18 +104,19 @@ echo "Installing plugins"
./wp plugin install doneren-met-mollie --activate --allow-root
./wp plugin install doi-helper --activate --allow-root
./wp plugin install email-verification-for-contact-form-7 --activate --allow-root
./wp plugin install gravityforms --activate --allow-root # https://github.com/pronamic/gravityforms
./wp plugin install gravityforms-nl --activate --allow-root
./wp plugin install gravityformsgutenberg --activate --allow-root
./wp plugin install gravityformsmailchimp --activate --allow-root
./wp plugin install gravityformswebhooks --activate --allow-root
./wp plugin install gravityformszapier --activate --allow-root
./wp plugin install https://github.com/pronamic/gravityforms/releases/download/2.7.15/gravityforms-2.7.15.zip --activate --allow-root
./wp plugin install https://github.com/pronamic/wp-gravityforms-nl/releases/download/v3.0.7/gravityforms-nl.3.0.7.zip --activate --allow-root
./wp plugin install header-footer --activate --allow-root
./wp plugin install pronamic-ideal --activate --allow-root # https://github.com/pronamic/wp-pronamic-pay
./wp plugin install pronamic-pay-with-mollie-for-contact-form-7 --activate --allow-root
./wp plugin install wp-2fa --activate --allow-root
./wp plugin install wp-crontrol --activate --allow-root
./wp plugin install wordpress-seo --activate --allow-root
# ./wp plugin install gravityformsgutenberg --activate --allow-root
install_zipped_ext gravityformsmailchimp https://github.com/wp-premium/gravityformsmailchimp/archive/refs/tags/2.4.5.zip
install_zipped_ext gravityformswebhooks https://github.com/wp-premium/gravityformswebhooks/archive/refs/tags/1.4.zip
install_zipped_ext gravityformszapier https://github.com/wp-premium/gravityformszapier/archive/refs/tags/3.3.zip
echo "Activate BIJ1 theme"
./wp theme activate simple-campaign --allow-root