WP-CLI on 1&1

After coming back from WordCamp, I mentioned that I wanted to start messing with WP-CLI. Well, today, I decided to give that a try under my 1&1 account. I first tried installing it with curl and running it, as described on the WP-CLI home page. But (to make a long story short), I had some problems getting it to work.

Then, I did some searching, and found some indication that WP-CLI might already be installed and configured on my account. So, I just typed in “wp cli info” and hey, it’s there and working. (Thanks, 1&1!) I’ve had some problems installing Jetpack updates from the WP admin page, so now I can just ssh in and type “wp plugin update jetpack”. Much smoother!

Of course, nothing’s perfect, so right now, some of the WP-CLI commands are throwing a whole bunch of warnings up on the screen, but they’re all working, so I’ll see if I can fix the warnings later.

WordCamp NYC notes

I just got back home, after attending WordCamp NYC this weekend. Overall, it was pretty good. The presentations were mixed, with a couple of really good ones, and a few that weren’t really useful to me (but might have been to others). I’m kind of surprised at how much they were able to do for only a $40 registration fee. Free t-shirt, and free breakfast and lunch on Saturday. And all in a nice hotel. (I guess a lot of the cost is borne by the corporate sponsors?)

I was going to write up a long post with links to some of the more interesting topics that came up, but I think I’m too tired to do that now. I’ll just link to two things that I’d like to look into a bit further: Piklist and WP-CLI. Maybe I’ll post more detail later, if I can find the energy.

 

WordCamp NYC

I’m Attending WordCamp NYC – August 2-3, 2014
I’m planning on going to WordCamp NYC this weekend, barring any unforeseen circumstances. I’m looking forward to it, since I haven’t been to anything like this since Drupal Camp in 2012. The schedule looks pretty interesting; I should be able to learn some stuff.

WordCamp won’t really make up for missing San Diego this year, but hey, it should be fun!

WordPress 3 Plugin Development Essentials

In my continuing quest to pick up some useful WordPress skills, I just finished reading WordPress 3 Plugin Development Essentials by Brian Bondari & Everett Griffiths.

This book covers all the basics you’d need to develop a plugin, from setting up a local dev environment, to pushing code to the WordPress.org plugin directory.

This is definitely an overview book, covering a bunch of stuff without trying to be exhaustive about any particular thing. There is some coverage of necessary PHP and JavaScript topics, though this wouldn’t be a good book for someone with absolutely no background in PHP or JavaScript. The coverage of the WordPress API in general is sufficient to cover the basics, and to point you in the right direction on the topics that it doesn’t cover.

The book was published in 2011, and is somewhat out of date. For example, there’s a whole chapter on using Subversion, which is still useful in some circumstances, but I think most people would be using git for their day-to-day work at this point. And the first example plugin is built around Digg’s API, from the previous version of Digg (before it was re-launched in 2012), so it doesn’t work anymore. (It’s still a useful example to read through, but you wouldn’t be able to make it work.) I’m not entirely sure, but I’m pretty sure that all the core WordPress stuff that’s covered is still recent enough to be useful.

The heart of the book walks through a number of sample plugins, devoting a chapter to each. The author builds each plugin up a little at a time, explaining what he’s doing, before going on to the next part. In general, he builds things up in such a way that the plugin is functional at each stage, so you can run and debug your code as you go. This is a good approach, especially for less experienced developers.

For my own purposes, I didn’t bother actually working through the examples, as I found the explanations clear enough, and I know enough about web development that I didn’t feel like I needed to. And I skimmed over a lot of the material that was either out of date (e.g. the Subversion stuff) or that I already know (e.g. PHP and JavaScript basics).

If there were an updated version of this book available, I’d recommend it to anyone looking to get started with WordPress plugin development. As it stands, though, I’d really only recommend it if you don’t mind skipping over the stuff that’s out of date. If you can get the ebook version when Packt is having a sale, it’s worth picking up.

A little more on Drupal vs WordPress

Here’s a link to an interesting question on Quora about WordPress vs Drupal that got a thoughtful answer from Dries Buytaert, the guy who created Drupal. A number of the other answers are pretty interesting too. It’s actually an older question, but it rose to the top of my Quora feed today, for some reason. Quora is sometimes very good at surfacing useful answers to questions, and avoiding the flame wars and trolling that would normally clutter up any “X vs Y” discussion on the internet.

And, hey, here’s an article on migrating from Drupal to WordPress. I’m curious as to why anyone would want to do that though. If you already had a site up & running in Drupal, what would you get by migrating to WordPress? I could see cases where you’d want to go in the other direction, since Drupal has some functionality that doesn’t exist in (base) WordPress. I guess I could think of a few cases where you’d want to go from Drupal to WordPress, if you were dealing with a simple site and didn’t need all the overhead of Drupal, and/or wanted the WP admin interface, which (for some things) is nicer looking & friendlier than Drupal’s.

The ephemeral internet

In moving my blog to WordPress, I’ve accidentally created a little side-job (or mild obsession?) for myself: cleaning up old blog entries. I have over 1500 entries in this blog, so I can keep myself (pointlessly) busy for quite some time, just combing through old entries and cleaning them up a bit.

First, I have a lot of old entries that don’t have any categories assigned. This bothers me for some reason. So I’m going through those, a few at a time, and categorizing them. And the really old entries don’t have titles, because Blogger didn’t initially support post titles. So I’m adding titles to some of those. And I’m cleaning up random embeds, YouTube links, and the like.

Once thing I’m noticing is how many of the links on older posts are dead now. In particular, music-related links seem to be the most ephemeral. Links to old band websites are often dead, the bands in question apparently disbanded, the members having moved on to other bands, or living quiet lives with nine-to-five jobs, or whatever people do when their bands dissolve.

Many old domains are now in the hands of some fairly iffy companies that hoard domain names, and just put up ads on them, and/or offer to sell them for exorbitant prices. My brother Patrick’s old domain, for instance, can be bought for just $1995. Geez.

There are some really odd changes too. An old domain that used to be associated with The Pixies is now being used for a blog related to DIY home repair. I’m not sure if it’s a real blog, or a test site, or part of a scam, or what. Weird though.

I’ve found myself using the Wayback Machine site to look up some older stuff. Not everything can be found with that, but a lot of stuff can.

I’m also finding myself a little dismayed about how my brother Pat’s footprint is disappearing from the internet. I just went ahead and saved to PDF a couple of pages honoring him, just in case they disappear. I’ll probably upload them here, at some point. No point in getting too deeply into this right now, but it’s something that’s been on my mind lately. I know that dwelling too much on the past isn’t healthy, and I’m trying not to do that, but I can’t stop myself from engaging in a certain amount of nostalgia.

1&1 back to normal?

It appears that 1&1 is back to normal. Everything seems reasonably responsive, both on the front-end and in the admin. There’s been no explanation posted to the Twitter feed or on their status page, so I don’t really know what went wrong, or if it’s really fixed. That’s a little frustrating.

I started looking into the possibility of switching hosts today. Depending on how well 1&1 holds up, I may consider that. I’m paid up through November, so maybe I’ll revisit things in the fall.

1&1 woes

Well, it appears that the reason my site has been really slow for a couple of days is due to a problem at 1&1. They acknowledged the issue on Twitter yesterday:

Hopefully, they can get it resolved soon. Meanwhile, I guess I should take a break from messing with this site, and maybe go outside and get some exercise! (Too bad it’s been raining all week.)

UpdraftPlus Backup and other WordPress stuff

I finally got around to installing a backup plugin. After looking at a few possibilities, I settled on UpdraftPlus for now. The free version does scheduled backups, with e-mail notification, of both the database and the file system. For now, I’m just backing up to the local file system on my web host, but at some point I’ll try sending them to Google Drive or DropBox, both of which are possible with this plugin.

It looks like the free version will do everything I need it to, but if I want to switch over to the premium version, it’s $60, with one year of support and updates. Subsequent years are discounted a bit. Oh, and I should really try doing a restore, from my production site to my test site, just to make sure those backup files really work. (I have enough IT experience to know that I can’t assume that those files aren’t just filled with zeroes…)

One another front, I recently turned on the site monitoring feature in Jetpack. Based on the reports I’ve gotten over the last couple of days, my site apparently goes down more than I realized. I’ll have to keep an eye on it for a while, and see if this is an anomaly, or if 1&1 is just not as reliable as I thought. Or it may just be that my home page sometimes takes more than ten seconds to load, which is a separate problem. (Though I’d think the Jetpack monitor should be getting the static cached version of the page, which should load pretty quickly.)

And speaking of slow load times, the WordPress admin on my site is still working pretty slowly most of the time. I know I can’t fix that with caching, and I’m not sure what I can really do about it. I guess I can deactivate some plugins and see if there’s a particular plugin causing the slowdown. Using SSL might be contributing to the problem, but I don’t want to turn that off. So I guess I’ll do some research and some experimenting over the next few days. Fun!

WP Super Cache

So after seeing 10-20 second load times on my home page (via http://tools.pingdom.com), I decided that I really needed to install a caching plugin. So I went with WP Super Cache, as that seems to be well-supported and stable. So far, it’s working fine, and page load times are down to 2-3 seconds, which is much better.

Somehow, the idea of using a plugin to generate and serve static pages seems like a step backwards to me, but I guess if it’s well-written and intelligent about regenerating the static pages when needed, then it’s fine. I know I can’t expect WordPress to run at top-speed in a shared hosting environment, but I was surprised to see how slowly stuff was running.

Oh, and I have seen a slowdown in the speed of the admin pages since I switched them to SSL. I’m pretty sure there’s nothing I can do about that, short of moving to a faster environment or turning off SSL.