Getting WordPress Running on Heroku

So, last week, Heroku announced that they are now officially supporting PHP on their platform. Now, they’ve actually been “unofficially” supporting PHP for well over a year now, so I was super happy to see that they have now officially given it the nod (especially since I’ve been running several production applications on the platform for quite some time now).

The instructions..

Ok, so, here’s what you do to get WordPress running on Heroku:

  1. Fork my repo: https://github.com/sinned/wordpress-heroku
  2. Clone your forked repo:
    • git clone [email protected]:sinned/wordpress-heroku.git awesome
      cd awesome
  3. Create the heroku instance
    • heroku create
  4. Add ClearDB
    • heroku addons:add cleardb:ignite
  5. Push to heroku
    • git push heroku master
  6. Go to your heroku app in a browser
    • heroku apps:open
  7. Follow the instructions to set up your WordPress.
  8. Log in to WordPress and then set up the S3 and Mandrill/Mailgun plugins (because of reasons we explain below)
  9. Done!

The details..

For those of you that are familiar with running WordPress on your own server, deploying it to Heroku should be pretty easy to understand, with a few main things to remember:

  • My github build is meant for you to be able to run a local version of WordPress and then push it to production. I find this handy for development — that said, if you are only going to push to Heroku once and then never redeploy, then I urge you to check out Mark Chung’s WordPress Buildpack.
  • The file system on Heroku is ephemeral, meaning that each time you deploy to it, anything not in the github repository is blown away. Most notably, this means that if you upgrade WordPress through the Admin UI, unless you upgrade your local repo, if you redeploy, bad things will happen. Additionally, your beloved /wp-content/uploads/ directory will also disappear.
  • So — to combat the file system issue, I’ve included an S3 plugin — that way, any media you upload is stored at S3 instead of your ephemeral Heroku file system. And, it’ll be faster that way anyway — S3 is much better at serving static content than Heroku dynos are. The WordPress Read Only plugin is another one to look at for this purpose.
  • The php ‘mail’ function on Heroku does not work — so, in order for the emails to work, you need to use something like wpmandrill or  mailgun (which I have included)

To dos

Mark Chung’s wordpress-on-heroku build is really fast, but mine is slightly different in that it allows you to run a local version of WordPress (with the MySQL credentials wordpress-heroku/wordpress-heroku). That said, I do have some things that I need to address:

  • The security salts are still stored in wp-config.php — I should probably move these to a Heroku setting of some sort for better security.
  • The AWS credentials are stored in the DB, so if anyone gets access to your database, that could be bad. Move these to a Heroku setting as well.

Anyway.. hopefully you find this post useful. Let me know if you have any questions or comments.

2013, in Cities. And 2012′s too.

Happy New Year all!!

In keeping with a tradition that I started back in 2005, here’s a list of all of the places that I’ve stayed over the course of the past year. And, of course, I just now found out that Dopplr shut down last year — I suppose the fact that I never noticed is indicative of why they did.

In any case.. 2013 was a great travel year, as it started off with a bang in Taipei, underneath the fireworks at 101. Then, Chris & Jerry’s wedding in Redondo, Front Sight Training, a big trip to Basel & Provence with my parents, Hersh & Alexis’ wedding in Napa, a Montreal Dude Trip, and Big Sur Backpacking with Niki. Thanks to diligent FourSquare checkins, I’m able to remember some of the exact places that I stayed.

Anyway.. here’s the list, in rough chronological order (multiple stays indicated by an asterisk):

  • Taipei, Taiwan
  • Ho Chi Minh City, Vietnam
  • Nah Trang, Vietnam
  • *San Francisco, CA
  • Las Vegas, NV (Chris’ Bachelor Party)
  • *Rubicon Bay, CA
  • *Los Angeles, CA
  • Redondo Beach, CA (Chris & Jerry’s Wedding)
  • *Kenwood, CA
  • Pahrump, CA (Front Sight Training)
  • Basel, Switzerland (ArtBasel)
  • Apt, France
  • Gargas, France
  • American Canyon, CA (Hersh & Alexis’ Wedding)
  • Chicago, IL
  • Montreal, Canada
  • Felton, CA
  • Monterey, CA
  • Big Sur, CA (Niki’s Birthday!)
  • Carmel, CA
  • Beachwood, OH (OHS Reunion)
  • Agonda, India
  • Anjuna, India

Wow.. that’s a lot of places last year. And so many amazing memories!

And… I just realized that I forgot to do this for 2012.. oops! No better time than now to do it.. so here we go:

  • Vail, CO
  • *San Francisco, CA
  • *Kenwood, CA
  • Coalinga, CA (Pheasant Hunting!)
  • *Rubicon Bay, CA
  • Los Angeles, CA
  • Phoenix, AZ (Spring Training)
  • Las Cruces, NM
  • Marfa, TX
  • Austin, TX (SXSW)
  • *Chicago, IL
  • Hillsborough, CA
  • New York, NY
  • Ithaca, NY (Cornell Reunion)
  • Rochester, NY
  • Basel, Switzerland (ArtBasel)
  • Pescadero, CA (Ed & Zoey’s Wedding)
  • Hunter, NY (Audris & Dennis’ Wedding)
  • Seoul, Korea
  • Taipei, Taiwan

Phew!! That was fun. Here’s to a great 2014! Happy New Year Everyone!

Backpacking Sykes Hot Springs

For Niki’s 30th birthday, we went backpacking in Big Sur to Sykes Hot Springs..

Happy Birthday to Niki, the intrepid hiker. Had an amazing weekend backpacking at Big Sur, Sykes Hot Springs, and a Carmel Yurt with my beloved.

It was amazing. We drove down to Monterey Thursday night after my OEC class to get a head start on the hike into camp on Friday. It was a good plan, although, we somehow didn’t manage to get to the trailhead at Big Sur Station until about 2pm. But, in reading reports online, I had estimated that the 10 mile hike would take about 5 hours. Turns out, the estimate was a bit optimistic, but it didn’t really matter.. it was an absolutely gorgeous hike. Hills? Yes. The Yelp reports of the trail being crowded and litter-strewn were grossly exaggerated. Granted, we hiked in on a Friday in late September, but we felt pretty comfortable with the handful of people that we encountered.

By the time we arrived at Terrace Camp (the halfway point) it was almost 6pm — and with the sunset weighing heavily on my mind, we decided to press on. I figured that maybe we’d hike two more miles to Barlow camp and make camp there, and possibly just hike without packs to the springs at night. Thankfully, Niki urged that we press on the whole way to Sykes. So, the sun set, and though the moon was full that night, it had not yet risen, so we did the last few miles of the hike lit only by our headlamps. Niki was quite the intrepid leader, fearlessly trailblazing our way through the inky darkness towards our goal.

As we finally descended into Sykes at around 8 or 9pm, we encountered a few people from Berkeley that we’d seen on the trail before, and luckily for us, one of them had been there before, and gave us the layout of the area. The springs were to our left, along the river, on the left bank. Someone had taken the primo campsite across the river from the springs, but everything else was pretty much open. Sweet. I was expecting to arrive at a fully packed campsite, and having to gingerly set up our tent amongst the crowd, but we were in luck. We found a perfect spot on the riverbank, complete with two trees from which Niki could hang her ENO hammock. And, just a short (although harrowing, in the dark) walk from the hot springs.

IMG_5398

After setting up camp, and a cold dinner of turkey, mustard and lavash, and cold ravioli — the entire wilderness was on fire alert, so even stoves were not allowed — we donned our swimsuits and headed for the hot springs in the pitch black darkness.

Headlights lit our way as we climbed up and down the jagged rocks, in flip flops, and finally found the springs, led by the hint of sulfur in the air. The springs are four tubs built into the cliff wall by some benevolent previous spa-goers. Three of the tubs had folks in them already, but the fourth, a heart shaped tub that fit about two people was completely empty! We hopped in and had a glorious soak. Looking up through the forest was a clear sky, filled with stars and the milky way. Perfection. It was a great way to conclude a tough 10-mile hike.

IMG_5402

After a good night’s sleep, we woke up and decided to walk back over to the springs for a morning soak, and.. to our pleasant surprise, we had the springs all to ourselves – all four tubs were empty and not a soul in sight. A few folks did finally join us after a bit, which was nice, since they could then take our photo at the springs.

IMG_5415

We figured that Saturday would start to get crowded, so we got out of dodge and packed up camp to head for another site. On our way out, we probably passed 60 or so people coming in, and almost every single one asked us how crowded Sykes was — I think the issue of crowds weighs heavily on almost every camper’s mind. Makes sense, since having to wait in *line* to soak in the tubs seems like a sad thing to do in the middle of the woods.

Despite having two soaks in the hot springs, the hike out was still a little tough with sore muscles — thankfully it’s more downhill on the way out, so it goes a little bit more quickly. After being caught in a pretty big cloudburst, we made camp beneath two huge redwoods, that were kind enough to shield the area beneath them from the rain.

We went to bed early and woke up on the day of Niki’s birthday, refreshed and ready to hike out of the wilderness. But — we couldn’t return home just yet! I found a yurt on Airbnb for our final night of the trip. Nestled in the Carmel valley, the yurt was a relaxing end to our weekend. Our hosts, Peg & Pete, own the last remaining video store in the Monterey area, and were some of the friendliest people I’ve ever met. I’d definitely stay with them again if I’m ever back down that way. Niki’s friends from SF joined us for dinner and cake, and after they left, Niki and I fell asleep to Annie Hall and The Darjeeling Express — movies graciously provided by our video store hosts.

It was an incredible weekend — it’s amazing how much you appreciate nature, life, and the people in your life after carrying yourself and your gear into the woods and back.

Happy Birthday Niki!

Nice Helmet

Scene: AT&T Park Ticket Window

*Dennis walks up to retrieve his willcall ticket, wearing his bicycle helmet*
(Thanks Ed !)

Ticket Lady at AT&T Park: “Have you ever tried your helmet?”
Me: “What?”
TLaAP: “You know.. tried it? Like.. fallen on your head? Does it work?”
Me: “Uh. No. Not yet.”
TLaAP: “It’s a pretty helmet. I wonder if it works.”
Me: “Uh. Thanks.”

2011, in cities..

Well.. we’re well into 2012 already, and this post is a bit late, but 2012 has already been an insanely busy year. In a good way. But, since the chinese new year JUST passed like a few days ago, I feel like I’m still within the statute of limitations for this post. And, it’s MY year (of the dragon) anyway, so yah..

Anyway — this is a tradition that I’ve been doing for quite some time now (2010, 2009, 2008, 2007, 2006, and 2005), so I am continuing it again for 2011. I feel like my dopplr account should be able to generate this post for me automagically; I tried to be diligent with keeping that one updated, but I’ll have to dig through my calendar to make sure that I didn’t miss anything…

Working for Infochimps, 2011 was marked with a ton of travel to Austin, where they are based — I basically went almost every month for a week, so that was pretty awesome. Austin is a wonderful place to have to go and visit, and I highly recommend it. I definitely think that I got to spend some quality time there, enough such that I felt like I was starting to get to know it as a local even. I think that since Austin Dennis has now lived there for over 3 months, I can kind of say that I’ve “lived” in Austin before now, no? Thanks to Alex & Carlo, whose place I stayed in whenever I was there — it was definitely a great home away from home.

Anyway.. enough chatter, here’s the list of places that I spent a night in (or more) for 2011 (places with multiple stays are marked with an asterisk).

In roughly, chronological order:

  • San Francisco, CA*
  • Rubicon Bay, CA*
  • Hillsborough, CA*
  • Austin, TX*
  • Sonoma, CA
  • Felton, CA
  • Honolulu, HI
  • Steep Ravine, CA
  • Washington DC
  • San Diego, CA
  • Vienna, MD
  • Easton, MD
  • Santa Rosa, CA
  • Nashville, TN
  • Avon, CO
  • Vail, CO

Wow.. not nearly as many locations as years past — but, with Austin taking up 10 trips this year, I suppose I still racked up a good amount of miles. Perhaps the craziest trip I took this year would be my Austin-DC-San Diego trip — I did those three cities in a little under 3 days. I was exhausted, but being out in DC lobbying congress was an experience that I didn’t even realize was on my bucket list. Lobbying members of congress? Check.

Anyway — 2012 started off well, ringing in the new year in Colorado. I already have trips planned for Austin for SXSW, and then Basel for Art Basel, so that’ll be good… I do need to get to NYC — I seemed to have missed that one last year. Oops.

Anyway.. happy new year all! Happy traveling!

the time is gone, the song is over, thought i'd something more to say…