-
Notifications
You must be signed in to change notification settings - Fork 15
Description
When I click Generate Static Files, I'm taken to a blank screen (the WP header + sidebar render, but there's no page content). No files are sent to my bucket.
I checked my Apache error log and found this:
PHP Fatal error: Uncaught exception 'S3Exception' with message 'S3::putObject(): [PermanentRedirect] The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.' in /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php:707\nStack trace:\n#0 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php(707): S3::__triggerError('S3::putObject()...', '/var/www/html/m...', 707)\n#1 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/class-simply-static-archive-creator.php(257): S3::putObject(Array, 'mybucketnam...', 'mysite/wp-js...', 'public-read')\n#2 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/class-simply-static.php(257): Simply_Static_Archive_Creator->publish_to_s3('mybucketnam...', 'MYAWSACCESSKEYID...', 'MyAWSSecretAccessKey...')\n#3 [internal function]: Simply_Static->display_generate_page('')\n#4 /var/www/html/mysite/wp-includes/plugin.php(525): in /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php on line 707, referer: http://www.mydomain.com/mysite/wp-admin/admin.php?page=simply-static-s3
It looks like I'm not referencing my bucket correctly. It's defined in the plugin settings as "mybucketname". I tried changing it to the bucket endpoint instead: "mybucketname.s3-website-us-east-1.amazonaws.com". This caused a new error on generation:
PHP Fatal error: Uncaught exception 'S3Exception' with message 'S3::putObject(): [NoSuchBucket] The specified bucket does not exist' in /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php:707\nStack trace:\n#0 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php(707): S3::_triggerError('S3::putObject()...', '/var/www/html/m...', 707)\n#1 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/class-simply-static-archive-creator.php(257): S3::putObject(Array, 's3-website-us-e...', 'mysite/index...', 'public-read')\n#2 /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/class-simply-static.php(257): Simply_Static_Archive_Creator->publish_to_s3('s3-website-us-e...', 'MYAWSACCESSKEYID...', 'MyAWSSecretAccessKey...')\n#3 [internal function]: Simply_Static->display_generate_page('')\n#4 /var/www/html/mysite/wp-includes/plugin.php(525): call_user_func_array(Array, Array)\n#5 /var/www/html/mysite/wp-admin/admin.php(236): do_action('toplevel in /var/www/html/mysite/wp-content/plugins/simply-static-s3/includes/libraries/S3.php on line 707, referer: http://www.mydomain.com/mysite/wp-admin/admin.php?page=simply-static-s3
It's not clear to me how I'm supposed to reference my bucket. I've tried every permutation I can think of including...
- s3-website-us-east-1.amazonaws.com
- s3-website-us-east-1.amazonaws.com/mybucketname
- mybucketname.s3-website-us-east-1.amazonaws.com
- mybucketname.s3-website-us-east-1.amazonaws.com/mybucketname
I also tried removing the region (leaving "s3-website.amazonaws.com") and replacing the region portion with "us-standard". All of my attempts resulted in one of the two errors above. I don't know what else I can try.
I'm new to S3, so apologies if my questions are ignorant. Actually I hope they are – that would probably mean an easy fix!