Live data from Hacker News

Wordpress on AWS: smooth and pain free

cloudonaut.io

71–80 of 124 posts

Re: Wordpress on AWS: smooth and pain free

#71

Can someone chime in why hosting this behind Cloudflare is a bad idea? For something which is a blog/CMS (put another way the # of readers >> # of creators), I'm envisioning using a single instance behind Cloudflare with heavy caching turned on? Cloudflare caches and serves everything. For free (you can pay them if you want). Host your assets in S3 or GCS, also put them behind Cloudflare. If your instance goes down,…

> Can someone chime in why hosting this behind Cloudflare is a bad idea?

It's not a bad idea. Who said that?

Put your blog behind cloudflare. It will cache most of the requests and save a lot of load and bandwidth on your instances.

Re: Wordpress on AWS: smooth and pain free

#72
post #25

I can host several WordPress sites on a 5$ / month droplet. How much would this AWS version cost? In 99,99% of the cases it's not every an option

Stick CloudFlare as a CDN and configure it, enable some caching plugin on WP and you'll need some serious traffic to saturate that small droplet.

What's serious traffic?

The first page of HN can send 10k users to a blog in about one hour. (don't know the peak rate per second).

Re: Wordpress on AWS: smooth and pain free

#73
post #69

It's always validating to see someone else write a blog post of the same decisions you made. This guide is good. For doing the uploads folder onto s3, I couldn't recommend S3-Uploads more it has served me well https://github.com/humanmade/S3-Uploads

I work at Human Made (owner of the above repo, and an enterprise WordPress agency), and we run all our sites on an all-AWS stack. We have a few other plugins for related AWS pieces, including email via SES [1] and a dynamic image thumbnail generator that runs on Lambda [2] that might also be relevant. Using S3 for the uploads solves our problems without needing EFS, as we disable file system changes through other met…

Hey thanks for your work, I wanted to mention wp-cli, too, which is especially excellent. Especially with one of my applications where the content portion of the site is wordpress, and the "app" portion is other tech, I needed a way to integrate with the wordpress site, and found wp-cli made some tasks incredibly easily.

Re: Wordpress on AWS: smooth and pain free

#74

Yes, you can do this. But, what about a staging environment? How do you keep data and code in sync between environments? My company runs a lot of wordpress instances, and we've wound up shipping most of them to Pantheon. (pantheon.io) Not only does it take care of environment issues, but it gives you redis and implements caching as a service. As the post says, wordpress fights AWS a bit. We leave it to the people who…

Plug that site into GTmetrix.

Re: Wordpress on AWS: smooth and pain free

#75
This is one way to do it, though I can't recommend it as the best way.

The first step is building your WordPress site correctly, and for me, that starts with using trellis (https://roots.io/trellis) and bedrock (https://roots.io/bedrock).

He's partially correct about S3 for media and uploads, but you want to take it one step further and use Imgix for actual image (jpeg/png) delivery because it'll do all of the transformations, cropping, etc. for you without WordPress mucking it up. At that point you have a fairly stateless WordPress installation and can spin up any number of instances of it. Here's my plugin for handling both S3 and Imgix: https://github.com/jawngee/ilab-media-tools/

CloudFlare is really the best thing to happen to WordPress since Imgix. Using CloudFlare's ability to cache at the root and sending correct caching headers from WordPress to CloudFlare, you are virtually indestructible.

We run a news site that gets about 500K uniques a month off a $20 instance on Digital Ocean this way. Granted, it's static, eg no user directed dynamic content like comments, votes, etc.

We build a lot of WordPress sites this way.

Re: Wordpress on AWS: smooth and pain free

#76
post #75

This is one way to do it, though I can't recommend it as the best way. The first step is building your WordPress site correctly, and for me, that starts with using trellis ( https://roots.io/trellis ) and bedrock ( https://roots.io/bedrock ). He's partially correct about S3 for media and uploads, but you want to take it one step further and use Imgix for actual image (jpeg/png) delivery because it'll do all of the tr…

And avoid caching plugins. Most of them are garbage.

Re: Wordpress on AWS: smooth and pain free

#78
post #76
post #75

This is one way to do it, though I can't recommend it as the best way. The first step is building your WordPress site correctly, and for me, that starts with using trellis ( https://roots.io/trellis ) and bedrock ( https://roots.io/bedrock ). He's partially correct about S3 for media and uploads, but you want to take it one step further and use Imgix for actual image (jpeg/png) delivery because it'll do all of the tr…

And avoid caching plugins. Most of them are garbage.

If you're going to add (full-page) caching, Batcache [0] is the best solution. Combined with a Memcache plugin [1], you can use this to store your page caches in AWS Elasticache.

[0]: https://github.com/automattic/batcache [1]: https://github.com/tollmanz/wordpress-pecl-memcached-object-...

Re: Wordpress on AWS: smooth and pain free

#79
Most blogs consist of trivially addressable content (that is, everything has it's own URI, and the page is essentially "functional" -- the same URI will return the same content each time) and is thus trivially cacheable. Cloudflare or its many competitors will handle this extremely well.

It's trickier when there is content on a page that has to be dynamically generated fresh (or nearly fresh) per page load. Most blogs never get into this territory (or have no reason to, at least) and most of us have experience with WordPress at the "look y'all, ima start a blog" level of sophistication, so there's this kneejerk toward feeling like this is total overkill.

But it's not if you have the problems that owners of complex, interactive, heavily-trafficked WordPress sites have.

Re: Wordpress on AWS: smooth and pain free

#80
post #30
post #18

Why is anyone running WordPress anymore.? So many better options.100s if not 1,000s. The fact that you need elaborate guides to host it one of the most common hosting providers is yet another example. It's junk. Time to move on. Edit: and the down votes are why this piece of garbage lives on. Please stop trying to hide how awful WordPress is. We all know it's terrible. Just because you work on it for a living doesn't…

I manage a wordpress installation for a school community site - wordpress's greatest strength (and biggest source of frustration) is it's flexible and popular plugin ecosystem that gives me useful plugins, including a shopping cart system for fundraising, an events calendar and photo galleries, all managed from the same WYSIWYG interface as a blogging engine and a decent CMS. I could re-write all those plugins in ano…

> shopping cart system for fundraising

I'm not sure I would trust sensitive credit card information to any WP plugin, especially plugins with single maintainers that could abandon the plugin at any time. [1]

[1] http://labs.sucuri.net/?note=2016-10-17

Post reply on HN