WordPress on Pantheon

Submitted by Mile23 on Thu, 04/24/2014 - 18:29

My mom has a WordPress site.

Pantheon announced they host WordPress.

Time to move my mom's site to Pantheon. :-)

Firstly: Let me just say that my mom's very cool and interesting and all-around pretty amazing. So yah. Learn for yourself: http://naomimitchum.com/

That site, naomimitchum.com, was formerly hosted on pair.com.

Pair.com is fine and dandy. There is absolutely nothing wrong with pair.com, except they don't have the super-cool flash of Pantheon's staged development model. Basically what I'm saying here is that the reason I moved this site was to see how much of a pain it would be.

I'm glad to be able to say it wasn't so bad. But there was a little pain, which I want to talk about here.

The Docs

You can read Pantheon's docs on the matter here: https://www.getpantheon.com/blog/importing-your-wordpress-blog-pantheon

That article discusses 'the hard way' and 'the easy way.' Pair.com only had PHP 5.3, so 'the easy way' was out for me, because it requires PHP 5.4 for a plugin called WordPress Duplicator. Really, either way is pretty easy, if you have command line skills.

The Process

The documentation says you can create a zip file out of the WP site, with a database dump in it. It then says you can upload this zip file as the site to be imported.

My mom's site is rather tiny, and it managed to be too large for the import process to upload.

I had to put the zip file on a web server somewhere so the importer could do the file transfer, rather than uploading through the web browser.

This is fine and dandy except now there's a public zip file which necessarily contains the entire database, unencrypted. So if this was a site of any complexity, there could be many names and email addresses exposed, and that's not good.

I'm not sure how the import process could be improved to avoid this situation, but security through obscurity isn't such a great thing.

So like I said, the only problem I had with the import was that this file was apparently too large to be uploaded by the browser. It was about 25mb, which doesn't seem that big, really.

After I made a zip file and put it in a publicly-accessible place, the import was very smooth.


One of the downsides of pair.com (at least at my account level, maybe not at others) is that if you allow someone else access to your site dashboard, you better trust them with your life. Because that's what you're giving them. One option Pair.com allows is for you to set up people as 'resellers,' and also to set up public ftp accounts, limited to certain directories. This is well and good for 2003, not so great for now-a-times.

Pantheon allows for different types of collaboration on the site, and uses a git-based workflow. You can push your codebase through different stages, as well: dev, test, and live. In fact, you must push your codebase through these stages, in order to have a live site. This means different team members can be doing different things on different staging sites.

As it turned out, my mom's site needed some updates. The import process itself did the WordPress core update to 3.9. There were some plugins in need of update love as well, and this is how that went. I'm a bit of a WordPress newb, so there might be an easier way to do it:

  • git clone the site's codebase to my laptop.
  • cd wp-content/plugins
  • Go through each plugin needing an update, and do the following:
    • Go to the WP plugin info page.
    • Control-click the download link and copy the URL
    • rm -r [plugin directory]
    • wget [paste]
    • unzip [item I just got]
    • rm *.zip
  • When all the plugins are updated: git add -A :/
  • git commit -m 'some updates'
  • git push origin master

This pushes the repo back to Pantheon, which does some magic and shows you the new commits in the dev stage. At this point you can make sure everything works as needed.

Then you click through to the testing stage and pull the new code. Then you do the same for the live stage, assuming your testing went well.

All that git stuff is second-nature if you're one of the git-initiated. If you're not, there's an SFTP file transfer mode. You set it to SFTP and then use the credentials it gives you. Then when you're done, you document your changes in a handy commit message box. Very simple.

The Verdict

I've been using Pantheon for a while, for some client sites. It's not cheap; every site will be at least $25/month if you want it to have a domain name. But all the other stuff you get for that money is completely worth it. Automated backups and one-click rollbacks for one.

The WordPress integration is pretty slick, and at least in my case worked out easily after some initial hiccups.

Do eet.