Desh Deepak Dhobi
Desh Deepak Dhobi

Reputation: 357

WP offload s3 media lite wordpress plugin not able to upload images and files to s3

I am using WordPress 6.0.1 with PHP 8.1.8 I set the WordPress to use the wp offload s3 media WordPress plugin but it's not working as expected.

When I upload the images it's not going to the s3, instead referencing the server location only. enter image description here

I have double-checked for the permissions of the IAM user credentials and the s3 credentials, everything is fine at the AWS level.

when looking into the debug.log file, I got the following error logs:

[12-Aug-2022 05:12:34 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wordpress/wp-includes/formatting.php on line 2772

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Cookie/Jar.php on line 63

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Cookie/Jar.php on line 73

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Cookie/Jar.php on line 89

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Cookie/Jar.php on line 102

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Cookie/Jar.php on line 111

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /var/www/html/wordpress/wp-includes/Requests/Transport/cURL.php on line 345

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

[12-Aug-2022 05:12:39 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51.

Upvotes: 3

Views: 2794

Answers (1)

Desh Deepak Dhobi
Desh Deepak Dhobi

Reputation: 357

After an extensive amount of research, I have finally solved this issue. This was an issue that was related to the AWS S3 bucket only.

I have to go inside the respective bucket and in the permission, section goes to the Object ownership section and tick the ACLs enabled option, and check the "Bucket owner preferred" checkbox as shown in the screenshot below. enter image description here

And the issue will be solved with images starting to be uploaded to s3 directly.

enter image description here

Upvotes: 4

Related Questions