5 ms·
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 u
by jawngee 10y ago
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 https://roots.io/trellis) and bedrock (https://roots.io/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/ 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.
- jawngee 10y agoAnd avoid caching plugins. Most of them are garbage.
- rmccue 10y agoIf 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 https://github.com/automattic/batcache [1]: https://github.com/tollmanz/wordpress-pecl-memcached-object-cache https://github.com/tollmanz/wordpress-pecl-memcached-object-...
- chuckreynolds 10y agoYou see Taylor Lovett's SimpleCache plugin? nice solution to those too https://wordpress.org/plugins/simple-cache/ https://wordpress.org/plugins/simple-cache/
- velox_io 10y agoYou really can't use WP without some form of caching (be it a plugin or proxy). I do wonder how much energy is wasted from poorly optimised websites & systems?
- URSpider94 10y agoThe root post of this thread is pointing out that you should always run WP behind a CDN like CloudFlare. That will handle all of the caching that you need. If you're running a truly static site, then you're going to have very few actual hits to your server.
- briandear 10y agoI would recommend Fastly for caching. It's brilliant.
- pavs 10y agoPlease try to avoid CloudFlare when possible. StackOverflow recently dumped CF. http://www.slashgeek.net/cloudflare-making-internet-little-bit-faster-select-group-people/ http://www.slashgeek.net/cloudflare-making-internet-little-b...
- jamroom 10y ago$20 a month for the DO droplet, but out of curiosity what's the monthly bandwidth bill from AWS? That's always the kicker - bandwidth from AWS is not cheap.