WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress Amazon S3 Plugin

WP-S3 copies media files used in your blog post to Amazon S3 cloud. Uses only filters to replace the media urls in the post if media is available in t

  1. Copy plugin files to wordpress wp-content/plugins folder
  2. Make sure you create a folder named 's3temp' in your media upload folder and make it writable.
  3. Activate the plugin
  4. Goto Amazon s3 page under plugins and set up your Amazon S3 credentials
  5. This plugin will not create any S3 buckets. You have to create the bucket with public read access and use the same
  6. The plugin will not work until all the configs are completed
  7. If anything goes wrong just de-active the plugin and blog should go back to its old state

Theme & Plugin Developers can use these examples to make their theme / plugin assets load from CDN

To scan a full HTML Block for images, upload to CDN and replace them if uploaded.

<?php
if(class_exists('S3Plugin')){
    $output = S3Plugin::scanForImages($output);
}
?>

To check if a single media needs to be uploaded to CDN and replaced if uploaded.

<?php
if(is_singular()){
    $attachmentDetails = &get_children( "numberposts=1&post_type=attachment&post_mime_type=image&post_parent=" . get_the_ID() );
    if(!empty ($attachmentDetails)){
        $attachmentDetails = array_shift($attachmentDetails);
        $postImage = array_shift(wp_get_attachment_image_src($attachmentDetails->ID,'thumbnail'));
        if(class_exists('S3Plugin')){
            $cdnImageURL = S3Plugin::getCDNURL($postImage);
            if($cdnImageURL!==FALSE){
                $postImage = $cdnImageURL;
            }
        }
    }
}
?>

Requires: 2.3 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-25
Downloads: 5,501

Ratings

3 stars
3 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
0,2,0
0,1,0
0,1,0
100,1,1
0,1,0
100,1,1