Wordpress S3



Recently, I started going over my monthly bills to see if there was an easy way to cutdown on expenses. One entry that stuck out like a sore thumb was the $60 a month I spend (or should I say, spent) for a VM on EC2. I’ve used this VM for educational projects, hackathons, and testing things in a cloud environment. But none of these uses justified having a continuously running VM. With one exception: my blog is also hosted on this VM, and just shutting down my EC2 instance would have meant losing the blog. So I had to migrate the blog somewhere. Ever since I saw Werner Vogel’s post on how he moved his blog over to Amazon’s S3 service, I’ve been meaning to try that out. However, I wanted to keep using WordPress to edit my blog. I had an idea on how to do this and yesterday I finally had time to do it!

Setting up Amazon S3. Make sure to install and activate the two plugins I mentioned above – Amazon Web Services and Amazon S3 and Cloudfront. Once done you should see an AWS menu entry in the WordPress admin. Clicking on it will allow you to enter your security credentials. Set your credentials in the form. (Click for a larger view.). When you add a media file using the WordPress editor or media library, your media file will be uploaded to both the WordPress blog and the chosen S3 bucket. The plugin will automatically rewrite URLs so that the media is served from S3 instead of from your WordPress host. WordPress defaults to storing everything locally on the web server. However, there are several plugins that make it easy to move static content to S3 and one example is W3 Total Cache. The advice here is relevant whether your site stores static content in S3 or not, and will accelerate your website in.

S3 stands for Simple Storage Service. It is a cheap, durable web service offered as part of Amazon AWS. Since Feb 2011, they’ve added the ability to hosts static web sites using an S3 bucket. There are two caveats that come with this: the site is static, and you can’t officially point your naked domain at the S3 service. Dealing with the second problem isn’t that bad and has several solutions. I use GoDaddy for my nameservers, and I simply forwarded my naked domain (slowping.com) to the www.slowping.com. Of course, I modified my www CNAME record to point at my S3 provided “website endpoint”.

All that is left is to resolve the fact that S3 can only host static files but I want to continue to use WordPress to edit my blog. The idea I had centered around having a local VM that mirrored my existing WordPress installation. I then proceeded to edit the hosts file on my home machine(s) whenever I wanted to access the WordPress blog on my local VM. The edit is very simple – I just add my domain name and the IP of the local VM. This makes editing my blog via a web browser very simple. Whenever I want to see the “actual” static blog site on S3, I just undo the hosts file modification. Simple as that!

Did I forget anything? Oh yes … the very important part of converting the dynamic WordPress site into a static one. I performed all these steps on the WordPress installation on my local VM. First, I disabled all the existing plugins (I didn’t have many and this probably made my life easier). I then installed/setup Disqus for commenting and Statcounter tracking hits. Both were fairly easy to do. I tried exporting the comments in my old WordPress system to Disqus, but that didn’t work out for me. I didn’t get any error messages – rather the Disqus system says it takes them 24 hours to process exports. If I get time, I’ll try to debug this further. Otherwise, goodbye old comments :’( Once I had the plugins sorted out, I ran Ammon Shepherd’s awesome “wpstatic” script to create a folder with a static version of my blog. In fact, I wrote a small script that called Ammon’s script first, and then called the “s3cmd” tool to upload the static files into S3.

The overall experience wasn’t that painful. Two big advantages I will get from hosting the blog on S3 are lowered cost and good scalability. If any of my future posts get on HN, it’ll be a good test to see if the new setup holds up under load. In terms of cons, I need to backup my local VM periodically. Also, the hosts file technique I mentioned works well when I want to edit my blog at home. Right now, I have no way to edit the WordPress blog when I am away from home. A few things don’t work correctly yet (e.g. the search box in the blog header, broke my old permalink structure). I’ll continue to iterate and improve.

References:

Wordpress S3

1) No Server Required – Jekyll & Amazon S3

2) Host Your Static Website on Amazon S3

3) Converting WordPress to static HTML

Description

Increase your website speed now!
Make your website blazing fast by offloading your files to AWS S3 with a top notch WordPress plugin that offers seamless synchronisation between your WordPress Media Library and AWS S3.

Our plugin comes with best integration between your WordPress Media Gallery and AWS S3.

Why should you offload your images?

Better SEO

All your files will be served from AWS S3 servers taking load off your server and increasing the speed of your website. This has a huge impact on your Page Speed score therefore ranking better in search engines like Google.

The tools you need

You can move your files to and from S3, switch buckets, create buckets using advanced file transfer interruption protection. And of course everything wrapped in a beautiful and smart design.

The image editor works!

Our solution works perfectly with the native WordPress image editor. You can rotate, crop or edit any image and it will be served from AWS.

Easy image maintenance

Wordpress S3

You can store remotely any type of files that WordPress supports: Images, Documents, Audio, Video. And the great part is that you can do that without any AWS knowledge, directly from your WordPress Media Gallery.

Lowers website footprint

By storing all your files on AWS S3, your website consumes less space on your server.
In conclusion you can decrease website hosting charges, you can do more backups and you can do faster backups.

Built in Security

No more worries about backup, security or time consuming tasks regarding your files. Your files will be secured on AWS S3 servers with automated backups any many more advantages.

Wordpress

Better website cloning for development

You can now clone your website any the local machine without needing to copy all the images.

Free features

  • Quick setup
  • All new files are uploaded to AWS S3 and delivered to everyone from AWS S3 servers
  • All new files are deleted from local server (they will exist only on AWS S3)
  • You can store remotely any type of files that WordPress supports: Images, Documents, Audio, Video and others
  • You can list your buckets
  • You can select the bucket where to store your files.
  • Increased security (encrypted credentials)
  • Unlimited files
  • You can choose if you keep a local copy of your files or not
  • Object uploader combined with Multipart Uploader so you can upload files faster

PRO features brings you a whole new experience

All the free features +

Wordpress
  • Email support
  • Premium updates
  • Bucket creation tool
  • (NEW) Filter what files will be uploaded to AWS S3 based on file mime type
  • Tool to move all files from local storage to S3
  • Tool to move all files from S3 to local storage
  • Deliver your images tos your visitors through a CDN like Amazon Cloudfront
  • CDN support with possibility to setup the delivery of files from your custom domain.
  • Support for huge files up to 5Tb
  • Tools now can be used in background mode so you can continue browsing without worries.
  • File transfer interruption protection (you can always resume your transfers from where you left off if you close the browser accidentally)

Installation

Installation and Configuration

To configure the plugin all you have to do is to follow these simple steps:

  1. Install Upcasted S3 Offload either via the WordPress.org plugin repository or by uploading the files to your server.
  2. Activate the free license for the free features or the paid license for the PRO features
  3. Go to: Admin dashboard -> Media -> S3 Offload Settings
  4. Add your Access key ID, Secret access key and Region
  5. Click on Save Settings
  6. Choose your bucket
  7. Click on Save

All done!

Now you have a seamless integration between your WordPress Media Library and AWS S3.
All the future images you upload in your WordPress Media Library will be automatically be moved to AWS S3 and are served to you and to your visitors from S3 servers.

FAQ

Uploads

Does this plugin copies or moves local files to AWS S3?

AWS S3 for WordPress Plugin by Upcasted moves the files you upload in WordPress Media Gallery to the S3 Bucket chosen after you activated the plugin.

How can I move my old files to S3?

Wordpress S3 Upload

You need to upgrade your plan to PRO. You will have tools to move files to and from S3 bucket. You can do that by installing the free version and then press Upgrade under Media Gallery > S3 Offload Settings > Upgrade

Is AWS S3 for WordPress compatible with WooCommerce?

Yes, AWS S3 for WordPress by Upcasted is compatible with Woocommerce.

Is AWS S3 for WordPress compatible with Elementor?

Yes, AWS S3 for WordPress by Upcasted is compatible with Elementor.

Wordpress S3 Plugin

Is AWS S3 for WordPress compatible with LearnDash?

Yes, AWS S3 for WordPress by Upcasted is compatible with Learndash.

Is AWS S3 for WordPress compatible with EasyDigitalDownloads?

Yes, AWS S3 for WordPress by Upcasted is compatible with Woocommerce.

Amazon S3 And Wordpress

Reviews

Wp Aws S3

The picture shows a lot of settings, in fact, only 3