File tree 3 files changed +21
-4
lines changed
3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -194,10 +194,16 @@ Default password: techtospeech.com
194
194
Change these on first log in or specify your own in module instantiation.
195
195
196
196
You will find WP2Static with S3 Add-on installed. Go to the WP2Static Menu->Addons, and click the 'Disabled' button to
197
- Enable the Add-on.
198
-
199
- The configuration of the plugin has been set up such that no additional configuration is required unless you wish to
200
- change any options.
197
+ Enable the Add-on. Enable enabling, click the Configure icon on this page. In the S3 table, change "Object ACL" from
198
+ "public-read" to "private". In the CloudFront table, copy the region from the S3 table and enter your CloudFront
199
+ Distribution ID. You can find the ID in the AWS console. Then click "Save S3 Options". See
200
+ [ this GitHub issue] ( https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues/15 ) to automate
201
+ these changes.
202
+
203
+ Finally, you'll need to configure permalinks to a format that is supported on static sites. Go to Settings -> Permalinks
204
+ in the sidebar. By default, ` plain ` is likely selected. You need to change this to any other format for static
205
+ publishing to work. Click "Save Changes" to confirm the change. You can confirm you have selected a valid choice by
206
+ viewing WP2Static Menu -> Diagnostics.
201
207
202
208
You may now edit Wordpress as you would normally, customize your site as you like, and when ready proceed to the 'Run'
203
209
section of the WP2Static plugin, and click the 'Generate Static Site' button. This will take some minutes depending on
Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ data "aws_iam_policy_document" "wordpress_bucket_access" {
40
40
effect = " Allow"
41
41
resources = [" arn:aws:route53:::hostedzone/${ var . hosted_zone_id } " ]
42
42
}
43
+
44
+ statement {
45
+ actions = [" cloudfront:CreateInvalidation" ]
46
+ effect = " Allow"
47
+ resources = [module . cloudfront . wordpress_cloudfront_distribution_arn ]
48
+ }
43
49
}
44
50
45
51
resource "aws_iam_policy" "wordpress_bucket_access" {
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ output "wordpress_bucket_arn" {
6
6
value = aws_s3_bucket. wordpress_bucket . arn
7
7
}
8
8
9
+
10
+ output "wordpress_cloudfront_distribution_arn" {
11
+ value = aws_cloudfront_distribution. wordpress_distribution . arn
12
+ }
13
+
9
14
output "wordpress_cloudfront_distribution_domain_name" {
10
15
value = aws_cloudfront_distribution. wordpress_distribution . domain_name
11
16
}
You can’t perform that action at this time.
0 commit comments