So i made my first (successful) attempt using S3 option (yay).
Here’s my experience:
[context - original site hosted on a GCP Virtual Machine with WordPress on Debian 9 installation]
AWS BUCKET
Wanted to check if my bucket policies were OK: -->
-
Created S3 Bucket with name “mysite.com”,
–> assigned destination URL as https://mysite.com
–> assigned region
–> created new access key with ID and password -
Enabled “Static website hosting” in Properties
–> endpoint is therefore http://mysite.com.s3-website-ap-southeast-1.amazonaws.com -
Permissions
–> I have switched OFF “Block all public access” --> is this correct? (export won’t work otherwise)
–> (i didn’t touch Access Control List)
–> Bucket Policy{
“Version”: “2012-10-17”,
“Id”: “PolicyForPublicWebsiteContent”,
“Statement”: [
{
“Sid”: “PublicReadGetObject”,
“Effect”: “Allow”,
“Principal”: {
“AWS”: “*”
},
“Action”: “s3:GetObject”,
“Resource”: “arn:aws:s3:::mysite.com/*”
}
]
} -
(did not touch CORS configuration)
============================================================
NEXT:
I can see the files in the bucket (yay again). I need to check now:
-
Endpoint points to: http://mysite.com.s3-website-ap-southeast-1.amazonaws.com/
-
index.html points to: https://s3-ap-southeast-1.amazonaws.com/mysite.com/index.html
Embarassing question --> are the two above one and the same? One is secure and the other isn’t? What should my SSL considerations be at this stage?
For the purpose of setting up my DNS for Bucket with a custom Domain my A record should be s3-ap-southeast-1.amazonaws.com
===============================================================
OTHER:
-
As the site is a company 1-pager, the resulting static site came out ALMOST perfectly
–> BUT fontawesome ICONS are not showing / did not export correctly -
did a preliminary speed test on the above endpoint and index.html URL using GTMetrix and Google Developer Insights
–> speed / performance seems to be worse than existing site
–> not sure if it’s because at this stage i haven’t fully switched over from the existing site with the proper URLs etc
–> the difference at the moment seems to point towards “Reduce initial server response time”, with GTMetrix recommending enabling compression of
https://s3-ap-southeast-1.amazonaws.com/mysite.com/index.html could save 85.5KiB (71% reduction).
The export didn’t export over an .htaccess file, so i added one to try solve the file compression but i don’t think it’s working…
===================================================================
All in all - a ‘satisfactory’ experience in deploying via WP2Static, but more leg-work to be done to actually improve on my existing speed test scores (primarily for mobile - quite happy with desktop scores for now).
Any insights and recommendations would be most welcome!