I cannot overstate how simple it is to get a WordPress site up and running, or how easy it is to deploy a site on Heroku. I might assume, therefore, that deploying a WordPress site on Heroku would be just as simple and easy, and this was largely true. There are a couple of hiccups however.
First was lack of good documentation. Since my
heroku fu is a little rusty, I looked around for step-by-step instructions. The first article I read (I won’t link it here because that would give them traffic) had very poor English, backwards instructions and overall bad process. It started by telling the user to create a new Facebook app… anyway, after I found a good article, I was set to go.
The next hurdle came when I tried to install a plugin through WordPress’s dashboard.
Abort class-pclzip.php : Missing zlib extensions Uh oh! No matter, I can download the plugin, add it to the codebase by hand, and push it up. Done.
Third, I discovered that pushing up to Heroku will wipe out any uploaded media. It makes sense now that I think about it. Media is stored in
wp-content/uploads/ by default, and any push will wipe out the whole codebase, including these files. Well, I’m sure I can find some plugin that makes it super simple to host media files on another server. In the meantime, I can upload media to my personal server and link to it from WordPress, instead of uploading it directly to WordPress.
Update: WP Read-Only sounds perfect for this!
So far though, I’m super pleased with how easy it was to set this up. If I have any more trouble or insights I’ll update this post.
I wanted to have prettier permalinks, so I went into WordPress’s settings and changed the url structure. It seemed to work! Later on (after the web dyno had spun down) I tried going to the page again and got a 404–mind you, not even my 404! So I uploaded the recommended
.htaccess like I usually do. We’ll see what effect it has. If I have to go back to ugly permalinks I will, but I won’t be happy about it.
.htaccess totally worked!