Amazon S3 plugin for WordPress
117 Comments
Current Version: 0.4
Plugin Downloads:
download mirror | past versions
Get notified of when updates are made to this plugin.
Other Related Links:
Project Page,
Support Group
This WordPress plugin allows you to use Amazon’s Simple Storage Service to host your media for your WordPress powered blog.
Amazon S3 is a cheap and cost effective way to scale your site to easily handle large spikes in traffic (such as from Digg) without having to go through the expense of setting up the infrastructure for a content delivery network. Startup companies are embracing it for their online storage solution, and even bloggers are starting to use it to host their images and other static media (such as mp3 files for their podcasts).
Pricing is really cheap. There are no setup fees, no minimum costs, and you literally only pay for what you use, even if it’s just a couple cents a month. If you have a WordPress powered blog, and have a lot of media (such as images or mp3s), this plugin will help you easily utilize Amazon S3 for bandwidth and storage.
Once setup, this plugin transparently integrates with your WordPress blog. File uploads are automatically saved into your Amazon S3 bucket without any extra steps. Once saved, these files will be delivered by Amazon S3, instead of your web host. Any image thumbnails that get created are saved to Amazon S3 too. You’ll also find an “Amazon S3″ tab next to your regular “Upload” tab, which allows you to easily browse and manage files that were not upload via WordPress.
Author: Joe Tan (joetan54@gmail.com)
License: GPL
Requirements:
- A WordPress powered blog hosted on your own server.
- An Amazon S3 account (there are no setup or monthly fees if you want to just try it out).
- PHP 5
Features:
- Easily browse Amazon S3 hosted files, upload new files, and create new folders without having to leave the WordPress edit screen.
- All your WordPress uploads are transparently saved into Amazon S3 for storage and delivery.
- Infinitely scalable with no limits, use Amazon S3 to store as many files as you want.
- Reduce the load on your server by offloading static media to Amazon’s content delivery network, with 99.99% availability.
- Supports BitTorrent for large media files.
- Supports virtual host names (eg: sub.example.com). See Amazon’s notes for more information.
- Supports WordPress MU setups. Can be configured to automatically install and use one common Amazon S3 account for all blogs.
Installation:
- Download and unzip the plugin.
- Upload the entire “tantan” directory to the WordPress
wp-content/pluginsdirectory. - Login to your WordPress admin, click “Plugins”, and then activate the “Amazon S3 for WordPress” plugin.
- Click “Options”, then “Amazon S3″ to bring up the configuration screen.
- Enter your AWS Access Identifiers to authenticate and link up the plugin with your Amazon account.
- Select an existing bucket, or create a new bucket. A bucket can be named whatever you want, but must be globally unique. If you want to use virtual hosting, enter in a subdomain as the bucket name and update your DNS settings. More info >
- Click “Save” and you’re done! You’ll now see an “Amazon S3″ tab next to your “Upload” tab in the WordPress edit screens.
- Bonus: Enable the”TanTanNoodles Version Checker” plugin to automatically get notified of when updates to this plugin are available.
Support:
If you are having problems setting up or customizing this plugin, please
visit the support group for help.
Someone may have already posted a solution to your problem!
More Documentation: Modification History, Known Issues and Bugs
Bug Reports:
If you find a bug or have a feature request for this plugin, please post them to this Google Project page.
Developers:
Browse this plugin's source code at the Subversion repository.
Want more WordPress goodness? Check out some of my other plugins and scripts >
Joe and Victoria
openbox9
Laity Lodge Youth Camp
Parkside Services
South Shore Baptist
Parkside Youth
Military Ministry
Campus Ministry
Know H2O
IFCJ
117 comments
Plugin currently generates an unspecified (blank) error.
I not the Secure Access Key has slashes, is that a problem?
Is there a way you can get this to work with subdomains?
Plugin refuses to authenticate to AWS. No error message beyond ‘Error:’, which is not at all useful.
Nice idea, all the same.
As a side note, it may be worth updating the release information to include that one or more buckets MUST exist (i.e. using s3fox plugin or some such) once the account is created, otherwise it will fail to work.
Seems to work so far.
Brendan, I’m not sure what the problem is, are you still having problems authenticating? Perhaps try generating a new access key and let me know if that works.
And the next version will have the ability to create buckets.
Andy: Yes, this plugin will work with subdomains. Just create a bucket named as the subdomain you want, and then point the CNAME record to amazon’s servers. More info on how to do that here:
http://docs.amazonwebservices.com/AmazonS3/2006-03- 01/VirtualHosting.html
Joe,
All go – as I mentioned, there needs to be at least one bucket or the error occurs, worth making a note in the install guide, perhaps?
Brendan, thanks for the suggestion
I’ve added the bucket step into the install guide.
Plug-in is asking for WordPress 2.1, but I have 2.2.2 installed?
Andrew: that is strange, is anyone else getting this error? I’ve tested it on WP 2.2.2, and don’t get that error…
To manually get around this error: modify the beginning of line 39 of the file wordpress-s3.php to be
if (true || version_compare ...snipped...
I have a noobie question -I see it states above that it requires PHP5, but is this strictly PHP5 or is it also backward compatable with PHP4? Wasn’t sure if PHP works like some software or not.
Sorry, this plugin will not work with PHP4 or older versions.
FYI… Just loaded the plugin on a clean WP 2.3 Beta 1 and the plugin doesn’t work. I can initially load the plugin config page, load my S3 info, submit it, and then… nothing. The plugin config page no longer loads and I can no longer add attachments to a post.
If I then disable the plugin, normal post attachment functionality returns, but of course the S3 functionality is unavailable.
Platform: Windows Server 2003, Apache 2, PHP 5, WP 2.3 Beta 1
Just to be sure, I did the same install test on a WP 2.2.2 installation — same result. Plugin loads, but goes “blank” and non-functional once my S3 account info is loaded. Same platform as before, but with WP 2.2.2.
Be sure to test your page download speeds via WebPerf.org or some similar tool. Your mileage may vary.
I tested this on my site for about three months. You’re right, the bandwidth was cheap. Unfortunately, it turns out my user experience is better delivering the files off my own server rather than via Amazon, amazingly enough.
However, if you’re on a shared host that is overloaded and slow, this could dramatically improve your page download speeds. At the very least, it’s probalby a cheaper way to host podcasts and large media files than through your own server.
Rich
BlogRodent
My host admin told me they have PHP5 if it is called in a special way. Otherwise version 4.4.7 is used. How can i take advantage of PHP5?
How and where do I have to create the bucket?
You can use this Firefox extension to manage your S3 account: http://www.rjonna.com/ext/s3fox.php
Joe,
Can you please ensure you add an ALT= tag to images when posting from AWS? Right now images are missing that tag, which of course breaks XHTML web standards.
Thanks for the great plugin
Your support group links just go back to this page.
When delete an image from the upload page (with upload replacement option enabled), it doesn’t seems remove the file at S3 – Is it a bug?
Amazon is a monster!
Support Group Link not working or not linked properly
I downloaded the plugin and unzipped it in to the right directory, then activated it inside the wordpress blog. Then I tried to configure it and after entering my S3 authentication codes I got the following error:
Fatal error: Call to undefined function curl_init() in /var/www/wordpress/wp-content/plugins/tantan/lib/curl.php on line 23
I assume this is probably a curl problem but I don’t know much about curl either. Can anyone help?
I didn’t have the curl problem on this install of the plugin, but, I still didn’t get past the configure step. This time after entering the S3 authentication key and id I got the following error message:
Error : The difference between the request time and the current time is too large.
Several attempts trying to be fast didn’t help, anybody?
I have posted 2 issues to the Google Project page that it would be great if you could help address. Here is a quick summary:
1. Files aren’t deleted from your S3 account when deleted via the WordPress uploader.
2. The plug-in incorrectly states that you CNAME record is setup incorrectly when you enable virtual hosting of your bucket.
Please see the Google Project issues for more specifics. If you need further information please let me know.
Love the concept of this plugin. Is there any way to get it to override the standard upload process when creating posts with images in the blog editor that creates posts via xmlrpc.php?
Hi!
First of all thanks for this great plugin!
I’ve tried to use it with UK buckets and it doesn’t list or upload files to them… is it a know issue?
Thanks again!
bye
This seems like just what I’ve been looking for… except it doesn’t seem to work with WordPress 2.5. I’d be very grateful if it was updated!
The plugin seems to still work partially with 2.5, the files get put on S3, however thumbnails aren’t generated. Fingers crossed for a fix soon…
I installed the new plugin version, and the [gallery] tag doesn’t link the photos to the S3 version. Is this the expected behavior or is it likely something is messed up on my end?
@Jay Hepburn: Try the new version, should do the trick.
@Stephen: I actually didn’t think of to test the [gallery] tag feature. I’ll make a note to make sure it properly references the S3 version for the next update.
Thank you for this plugin, its awesome.
I just installed the newest version of the Amazon S3 plugin. This is a new install on my blog as I had previously never used it however I am somewhat familiar with the S3 service, I have used it for backups for some time now.
When I attempt to save my setup I receive the following error.
Your DNS doesn’t seem to be setup correctly to virtually host the domain assets.alexrodrigueznotebook.com. Make sure the following entry is added to your DNS:
assets.alexrodrigueznotebook.com CNAME assets.alexrodrigueznotebook.com.s3.amazonaws.com.
I have tested the C-NAME on both the server hosting my WP blog and from the outside and it is resolving.
Any assistance you can provide will be appreciated.
Thanks again!
the CNAME should just be assets, not assets.alexrod……
The error message is actually just a warning message, and doesn’t affect any of the plugin’s functionality. If your cname’d bucket is working and you can get to it, you don’t need to worry about it.
@Kyle, it actually should be assets.alex… since the domain name is basically the bucket name.
I installed this on my WP 2.5, and set up a S3 account, but when I try to verify my account on the plugin page I get a blank “ERROR:” message at the top.
I tried refreshing my secret key but got the same blank error.
I tried it on a second install (different domain, same server) and got the same blank error.
I can see the attempts to communicate with S3 in the access summary on S3, so I know it’s talking with the plugin in some way, but I can’t seem to get it to work. Any ideas? I had to set up a .htaccess line to ensure PHP 5 is used before the plugin would work at all (my server defaults to PHP 4.X).
I’m not having much luck with using the plugin on WordPress Mu. I’ve placed it in the mu-plugins directory and manually entered my AWS and bucket details, but nothing appears in the bucket when I upload a file via WordPress.
Is there some additional step or configuration required to work with Mu as opposed to regular WordPress?
Thanks for posting about Amazon. I do some development myself with their e-commerce api and even started messing around with probably the first ever Amazon Associates Video Podcast http://www.youtube.com/user/PuReWebDev thanks, PuReWebDev
I have the blank “ERROR:” message like jason. I’m on WP 2.5 too (hosting (mt) with PHP5). Any idea ?
jason and ced, I got the same error until I have created at least one bucket
Ok it works now
I have the same problem as Ray: “Error : The difference between the request time and the current time is too large.”
WP: 2.5.1
Plugin: 0.3.2
As a side note I tried this plug the first time on WP 2.5 but experienced some issues mentioned above. I did manage to point it to the correct bucket(s) (tried a few) and it authenticated alright on my S3 account, but didn’t actually get the files up there at the time. This latest message has only happened today, after upgrading my (previously disabled) plugin after seeing there was a new WP 2.5 compatible version of it, but alas, not working for me this time either, but in new ways.
Hi Thanks for the plugin. I have it working and was wondering about some of the details with it. I am new to wordpress so they maybe simple questions
Quote:
Any image thumbnails that get created are saved to Amazon S3 too.
How do you create these thumbnails? How would one create a gallery using photos stored on Amazon S3?
This is a great plugin but how do I embed an flv that I have stored on S3?
This plugin only creates a link…is there a way to actually embed the videos?
Thanks
This plugin works good for public accessing to S3.
But I want to customize it for accessing private or authenticeted S3 files only for logged-in user.
Where I can start?
@Paul: the thumbnails are created by WordPress. All this plugin does is really just uploads files WP generates onto S3. Image source URLs are automatically rewritten inside WP to point to the appropriate spots on S3. So with the latest WP 2.5, you can use the builtin [gallery] feature to create simple image galleries.
http://codex.wordpress.org/Using_the_gallery_s hortcode
@tracyselena: you will need to have a flash video player that can take in a flv file. probably something along the lines of:
http://jeroenwijering.com/?item=JW_FLV_Media_Player
@Randy: this plugin doesnt support this feature. feel free to add the feature request here:
http://code.google.com/p/wordpress-s3/issues/list
Great plugin. I have it installed etc, BUT for some reason none of the images that I upload using it are working. If I upload images to S3 myself though, I can grab them nicely and they display properly. If I use this plugin to upload, then the images just show up as the filename. Any thoughts?
Something is happening in the upload process that is corrupting the files. Any ideas?
Hello, any idea why the file is uploading to both the host server and also to the Amazon S3 server? The file inserted in posts is that of the Amazon S3 link, but I have no idea why the file is being uploaded to my website’s server as well.
Also, when I delete an image through the Media Library, it deletes the files that was uploaded to my website’s server (within the uploads/2008/07 directory) instead of deleting the file located on the Amazon S3 server. What’s going on here?
I was having a similar issue as Matthew (I only want the contents of my ‘uploads’ stored on S3 – not on my webhost). After studying Tan Tan’s code, I see that I can’t bypass the content being uploaded to my webhost, but I can delete it after its been copied to S3.
I know there are cleaner ways to do this – like adding a ‘Do you want to store your uploads only on S3?’ option to the plugin setup screen – but I’m in a rush. This is what I did to get that effect:
Open the “{plugins-folder}/tantan/wordpress-s3/class-plugin.php ” file.
Look for the following line of code in the wp_update_attachment_metadata method:
“if ($this->s3->putObjectStream($this->options['bucket' ], $prefix.$file['name'], $file)) {”
At the END of this if statement (just before the ‘else’) add the following line:
unlink($data['file']);
Thanks again for the sweet plugin.
@Matthew and @Mertonium,
Yeah, uploaded files must pass through the WordPress application, since thumbnails need to get generated, and other meta data about the files registered. I’ll look into seeing if there’s a way to upload directly to S3, but one of the roadblocks that prevented me from doing this was that Amazon S3 doesn’t really support direct file uploads via a browser.
As for deleting files after they’ve been uploaded, this is an option on my todo list. But one of the reasons I didn’t automatically delete the files was so that if the plugin was disabled (for whatever reason), then references to your uploads would automatically revert back to your blog. So in a way, it acts as a backup for your media.
Thanks for the feedback!
@C.K. Sample III, I’m not sure what is going on. check the permissions on your bucket… perhaps something is not set correctly?
Is this working with WP 2.6?
I got it to work for WP 2.5 – but in WP 2.6 I keep getting DNS errors when saving the bucket name in the settings.
just got this one…
http://www.project-tina.com
i thing its very good if we have compare it with wordpress…
I just have got idea when some of my friends have sucsess compare it with His joomla…
Any idea ?
So here is a bug, depending what env you are on.
Its related to the function dns_get_record.
If you are getting a DNS record message, do the following (add a pre-fix ‘.’ to the string ‘s3.amazonaws.com’:
class-plugin.php (line 108)
Change:
if (($record[0]['type'] != ‘CNAME’) || ($record[0]['target'] != $_POST['options']['bucket'].’s3.amazonaws.com’)) {
TO:
if (($record[0]['type'] != ‘CNAME’) || ($record[0]['target'] != $_POST['options']['bucket'].’.s3.amazonaws.com’) ) {
Hope that helps.
BTW: Why are files still stored in wp-content/uploads/ (in addition to S3) when using this plugin? Is there any way to NOT create the files in ‘uploads’ – seems a waste of space since it is never used.
Is there any way to get the file to save in a directory under a bucket? Like I have a bucket named media.digiratidad.com and I want my files saved in a directory called images. Is this possible?
I set my “Store uploads in this folder” in Misc option as “files/media”
On top of that, in the config.php file I set WP_CONTENT_DIR to $_SERVER['DOCUMENT_ROOT'] . ‘/files’
Whenever I upload a file, it would be saved correctly on my website i.e. http://domain.com/files/media/2008/08/11/filename.txt but on S3 it would go to root/files/uploads/2008/08/11/filename.txt
It still upload to a directory called “uploads”. I wish for the files to be directly hosted in “files” directory or at least the same as the above, “files/media”
Please advice. Thanks.
Well done! Thank you for this plugin.
-adam
hello,
just wanted to ask how this works with wpmu? I put it into plugins folder and activated, still the menu show under the settings menu so it is no good, I don’t want every blog owner to be able to modify this, the settings should be under site-admin menu and global for the whole blog community…
can you explain a bit or did I do something wrong?
Hi there,
Has anyone gotten this to work with WP 2.6? I am running 2.6.2 and cannot get this to work.
Thanks
Nick
Amazon S3 plugin for WordPress…
Amazon S3 plugin allows you to use Amazon’s Simple Storage Service to host your media for your WordPress powered blog….
Also cannot get this to work on WP 2.6.2.
Thanks,
Tri
hi,
i wonder how can i make this plugin work on PHP 4.x version ?
please let me know if there’s a way to do this.
thanks!
Working fine on WP 2.6.2. Great work. Thanks!
Also wandering if your plugin can be modified to run in PHP 4.x version, Thanks a lot!
Hello.. It keeps saying error when I enter both of my keys… umm.. i have never used A3 before.. if someone can get this working for me I will pay you..
Thanks,
Steve
good post very nice blog keep up the good work
Wow! Great Plugin. Really what I needed on my slow server. Saving the the media on a second server has also the advantage of faster loading of the pages. Two domains mean doubled number of open connections so the page loads faster. A trick used by many big sites.
I had on 2.6.3 only a small problem – on my s3 Account I have already a few buckets, but had problems creating a new one with the plugin. So I made one by myself and used it.
I will donate a few bucks tomorrow
Ciao
great pluging for amazon wordpress site
Looking like this plugin is defunked. Shame! I’m running version 2.6.3 and this plugin does not work. When you enter your codes, it comes up with an “Error:”, which of course offers no error.
Frank
Take last comment. After opening up the comments from main page, found that I had to create at least one bucket beforehand.
Just need to figure it all out now!
Frank
any plans on making this work with the just released CloudFront?
Is there any way to make the URL signed? That way we can prevent hotlinking
I had this working with my WP 2.2 but today it just stopped. I would try to post and get a blank page with the words, �hmm, error?� I was able to post just to my WP blog when I deactivated the plugin, or checked the tick box that says �Do not post to Xanga�.
I really hope this can work again, I love it.
Just want to let everyone know about a great Website Design company.
I was a sceptical because of the price, but boy did they deliver for about
$200 they did the most amazing work for me. I just wanted to pass that along to
you guys.
you can check them out at: http://www.leadsware.com/renovastar/index.html
I would LOVE to see a version of this that works
with lower versions of PHP & MySQL. I can’t control
the versions on some of my hosting servers, but
would love to use this software.
Just my two cents — and thanks for putting this
great plugin together!
-Will
good projected nice documents.
This doesn’t seem to work with WP 2.7. When I try to add any media file using the WP flash loader, I receive an “HTTP error.” Using the S3 link works fine.
any suggestions?
@ William. If your provider isn’t keep php updated, i’d find one that does.
Just tried this on WP 2.7 and keep getting the following error:
Error : The difference between the request time and the current time is too large.
I’ve tried the support forum link but it keeps coming back here. Any ideas?
Thanks
Tom
How about a plugin that works with the free Coral CDN?
I am having an issue with the plugin. Seems that when I upload an image, it successfully gets created in my bucket, the URL works, etc… but any images I upload using the plugin seem to be served blank – here is one – http://media.reelseo.com/wp-content/uploads/searchandreplace .png
And another http://media.reelseo.com/wp-content/uploads/tania-yuki-comsc ore1.jpg
Please advise. Thanks.
Are there any issues with this in that version.
Great plugin. Thanks!
Hi,
Do you have any plans on a wp-uploads to s3 upload conversion/transfer tool. I have a few sites with a lot of files already in the blog system, having a tool to automatically move them and update links would be a great asset.
Thank you,
Hilyin
Anyone experiencing the blank Error message upon entering Access Keys, there is a solution here:
http://code.google.com/p/wordpress-s3/issues/detail ?id=15
Basically go create a bucket on your S3 account first.
thanks for the plugin
Mr. Tan is a genius, plain and simple. Not only does the plugin work as advertised, it exceeded my expectations this morning by uploading files to S3 when using WP’s Add Media feature. I’m in awe and will be donating as soon as I can find the link
I can honestly say your work makes mine possible. Thanks again.
beyondesign
Bumping Brandon’s Post, are there plans to integrate this plugin with CloudFront?
Perhaps. I havn’t had time to fully look into it… I’ll post an update when I get it figured out!
Leave a comment