Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
WordPress on Heroku (github.com/xyu)
80 points by tiefenb on July 25, 2014 | hide | past | favorite | 29 comments


Where content is semi-static (e.g. blogs, informational sites like WebMD, sites in which the information updates infrequently on a per-page level), we have flipped the approach/architecture and it has proven to be a HUGE boon for us. With the approach, we get performance that is essentially unmatched via any traditional server setup, nearly unlimited read scalability, vastly reduced infrastructure costs, improved usability for end users with direct benefits to engagement and SEO, and much more. It certainly is not a fit for every site. For instance, Twitter could not work at all this way. But, for semi-static sites it works like a charm:

  - Host all content via CDNs, which is dynamically managed via backend servers (see
  below).

  - Allow user interactivity via events being pushed to pub/sub event servers. On the
  other side, in other DCs entirely, are the more traditional servers
  which await said events. Said events are processed, aggregated, and then pushed back
  up, via CDN APIs, to the CDN servers.

  - Use eventual consistency concepts to simulate real-time interactivity for users.
  For instance, when a user posts a review/comment we show it client-side to them,
  knowing that the CDN update should be coming momentarily.
Besides the pub/sub servers, servers can be housed just about anywhere across the globe (latency isn't a huge issue any longer). If you are based in the US, you might be surprised to find out just how competitive/cheap the European market is for servers. Previously, it would have been insane to consider them, but now we can leverage them for a large reduction in costs. For example, compare Rackspace dedicated servers to OVH dedicated servers. It is roughly one order of magnitude less costly.


This sounds interesting. What are you using for your pubsub servers might I ask? And what are the scalability and fault-tolerance requirements on them? Are pub/sub servers in different data centres essentially independent with consistency handled by other servers colocated in an origin datacenter?


I've been using servers wherever they're cheapest for some time - currently I run most of my work out of Germany, with spin-up/spin-down of ad hoc systems from various cloud providers, distributed around the world


An alternative that worked well for me and seems a bit more streamlined to install: http://mchung.github.io/heroku-buildpack-wordpress/


I'm also using it and it works perfectly for me: http://blog.flaviocaetano.com (no spam intended)


Another suggestion is to use Varnish. It's extremely easy to set up and just put in front of your Wordpress install, regardless of whether you're using Nginx/Apache.


Unlike most technologies which promise it, Varnish is magical webscale sauce. It's awesome.


Definitely. Only thing I wish is being able to use logic other than regex to handle which urls get cached and which don't.


For easier experimentation, I have created a Terminal.com snapshot with this setup.

https://atharwat.wordpress.com/2014/07/26/wordpress-on-termi...


No credit card required!


So Heroku makes the setup pretty automatic, right? Otherwise you'd have to setup and configure each of those elements one by one, right?


A credit card entered @ Heroku is required in order to do this. It won't be billed if you follow the readme.


For which parts would you need to enter a credit card? The addons? I've used Heroku for some assorted Ruby and Python programs, but I have not had to enter a credit card. However, what I have done has only scratched the surface of what Heroku offers, so I am not surprised if I missed the the parts that require credit card info.


When I tried to add cleardb, it said I had to fill in the CC information


you could always use heroku's postgres instead of mysql, avoiding having to put in a CC.


Where is the wp-admin directory and the files in wp-includes?


It's installed through Composer. In composer.json it sets up a custom repository to download the latest version of WordPress, and then uses the "extra" section to install it to a custom directory (in this case the public directory).


ah I see. Thanks andrewryno.


Why not add MariaDB to that also?


Will this work on the Free plan


yes, I think so


pros and cons vs wpengine.com?


One obvious con will be that you have to set it up yourself while WPEngine is hands-off.


Also, WP Engine do all the updates for you, which is not the case for this setup.

That's one of the major reasons I run most of my WP sites on a managed service - I'm a bit too busy to keep on top of all the updates that come out.


Price maybe? $29/mo is pretty expensive for a personal blog.


It's not the type of website that decides what hosting price is expensive, it is the amount of visitors.

If your site is visited enough to require non-trivial optimization, then 30 dollars a month is probably the least of your worries.


any performance comparison?



Nice article, thx




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: