From 2efcf8608c124038d620bd28d44f72efe746533e Mon Sep 17 00:00:00 2001 From: jiggsfoo Date: Mon, 13 Aug 2018 10:59:19 +0800 Subject: [PATCH 1/2] Allow root install of W3 Total Cache plugin --- templates/aws-refarch-wordpress-04-web.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/aws-refarch-wordpress-04-web.yaml b/templates/aws-refarch-wordpress-04-web.yaml index 58bbcbc..9facd7b 100644 --- a/templates/aws-refarch-wordpress-04-web.yaml +++ b/templates/aws-refarch-wordpress-04-web.yaml @@ -620,7 +620,7 @@ Resources: " wp core download --version='", !Ref WPVersion, "' --locale='", !Ref WPLocale, "' --allow-root\n", " wp core config --dbname='", !Ref DatabaseName, "' --dbuser='", !Ref DatabaseMasterUsername, "' --dbpass='", !Ref DatabaseMasterPassword, "' --dbhost='", !Ref DatabaseClusterEndpointAddress, "' --dbprefix=wp_ --allow-root\n", " wp core install --url=", !If [ NoWPDomainName, !Ref PublicAlbHostname, !Join [ "", [ "'http://www.", !Ref WPDomainName, "'" ] ] ], " --title='", !Ref WPTitle, "' --admin_user='", !Ref WPAdminUsername, "' --admin_password='", !Ref WPAdminPassword, "' --admin_email='", !Ref WPAdminEmail, "' --skip-email --allow-root\n", - " wp plugin install w3-total-cache\n", + " wp plugin install w3-total-cache --allow-root\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_HOME', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_SITEURL', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " # enable HTTPS in wp-config.php if ACM Public SSL Certificate parameter was not empty\n", From d2b1c38cc0b0255e171360cb594415dcec6e58b9 Mon Sep 17 00:00:00 2001 From: jiggsfoo Date: Mon, 13 Aug 2018 12:00:45 +0800 Subject: [PATCH 2/2] Update W3 Total Cache install on other PHP versions --- templates/aws-refarch-wordpress-04-web.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/aws-refarch-wordpress-04-web.yaml b/templates/aws-refarch-wordpress-04-web.yaml index 9facd7b..3a08edf 100644 --- a/templates/aws-refarch-wordpress-04-web.yaml +++ b/templates/aws-refarch-wordpress-04-web.yaml @@ -828,7 +828,7 @@ Resources: " wp core download --version='", !Ref WPVersion, "' --locale='", !Ref WPLocale, "' --allow-root\n", " wp core config --dbname='", !Ref DatabaseName, "' --dbuser='", !Ref DatabaseMasterUsername, "' --dbpass='", !Ref DatabaseMasterPassword, "' --dbhost='", !Ref DatabaseClusterEndpointAddress, "' --dbprefix=wp_ --allow-root\n", " wp core install --url=", !If [ NoWPDomainName, !Ref PublicAlbHostname, !Join [ "", [ "'http://www.", !Ref WPDomainName, "'" ] ] ], " --title='", !Ref WPTitle, "' --admin_user='", !Ref WPAdminUsername, "' --admin_password='", !Ref WPAdminPassword, "' --admin_email='", !Ref WPAdminEmail, "' --skip-email --allow-root\n", - " wp plugin install w3-total-cache\n", + " wp plugin install w3-total-cache --allow-root\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_HOME', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_SITEURL', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " # enable HTTPS in wp-config.php if ACM Public SSL Certificate parameter was not empty\n", @@ -1037,7 +1037,7 @@ Resources: " wp core download --version='", !Ref WPVersion, "' --locale='", !Ref WPLocale, "' --allow-root\n", " wp core config --dbname='", !Ref DatabaseName, "' --dbuser='", !Ref DatabaseMasterUsername, "' --dbpass='", !Ref DatabaseMasterPassword, "' --dbhost='", !Ref DatabaseClusterEndpointAddress, "' --dbprefix=wp_ --allow-root\n", " wp core install --url=", !If [ NoWPDomainName, !Ref PublicAlbHostname, !Join [ "", [ "'http://www.", !Ref WPDomainName, "'" ] ] ], " --title='", !Ref WPTitle, "' --admin_user='", !Ref WPAdminUsername, "' --admin_password='", !Ref WPAdminPassword, "' --admin_email='", !Ref WPAdminEmail, "' --skip-email --allow-root\n", - " wp plugin install w3-total-cache\n", + " wp plugin install w3-total-cache --allow-root\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_HOME', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " sed -i \"/$table_prefix = 'wp_';/ a \\define('WP_SITEURL', 'http://' . \\$_SERVER['HTTP_HOST']); \" /var/www/wordpress/", !Ref WPDirectory, "/wp-config.php\n", " # enable HTTPS in wp-config.php if ACM Public SSL Certificate parameter was not empty\n",