WordPress 3.7 Complete

WordPress 3.7 Complete” is one of the books I picked up a few weeks ago, on the “Day Against DRM,” when Packt had all their books on sale for $10 each. I finished reading it last week, so I thought I’d post a quick review. (I’m going to cross-post this to Goodreads and Amazon.)

WordPress 3.7 Complete” is meant to be an end-to-end overview of WordPress, covering pretty much everything you’d need to know to get a WordPress site up and running. It was last revised in November 2013, so it’s pretty much up-to-date. (WordPress was at 3.9.1, at the time this review was written.)

There are two authors credited on the book, Karol Krol and Aaron Hodge Silver. The book is reasonably well-written, with a few grammatical quirks here and there. (In general, Packt books don’t seem to be too tightly edited for standard usage and grammar.)

The first few chapters do a pretty good job of walking you through the basics: getting a site up and running, either on WordPress.com, or self-hosted; a brief overview of the admin interface; and some details on how to create content and manage comments. (If you’re looking for really detailed information on how to self-host, and how to get past some common problems, this book isn’t the place to find it, though it will give you enough info to get started.)

The book then progresses into more detail about the structure and content of a WordPress site: pages, menus, media, and so on. This is followed by a chapter on plugins and widgets. This includes a list of must-have plugins, which is a good general list, though I might quibble with some of the details.

From there, we continue into a few chapters covering themes, starting with a chapter on choosing and installing themes, and then getting deeper into the subject, including a pretty good start on theme development. This was the most useful part of the book for me, personally, as I didn’t really know anything about WordPress themes, and wanted to learn more.

The book also contains one chapter on plugin and widget development. (Again, this was something I was interested in, as I knew very little about it.) I would say that this chapter gives you a good basic intro to the subject, but if you want to develop a non-trivial plugin from scratch, you’re going to have to do some more reading, elsewhere.

The book also contains a few random chapters that I wasn’t terribly interested in, on podcasting, community blogging, and creating non-blog web sites. I just skimmed through those.

Overall, I’d say the book is worth buying and reading, for someone (like me) who has a little bit of familiarity with WordPress, but wants to learn more, and really start digging into it. I can’t really compare it to any other books on WordPress, as I haven’t read any others, but I’d guess that it compares favorably to something like “WordPress for Dummies” or “WordPress: The Missing Manual”.

My New Theme

As you can see, I’ve switched this blog to a new theme. Since I moved the blog to WordPress a couple of weeks ago, I’ve been messing around with themes, on a test site. While I did like the Responsive theme that I’ve been using here, there were a few things I wanted to change. I poked around with quite a few free themes, and explored a number of commercial themes, and found a few that I liked, but nothing that seemed quite perfect. And I was leery about spending money on a commercial theme, without really being able to see the code first, so I could tell whether or not it would be easy to tweak, or if it was coded reasonably well.

In the end, I settled on using Stargazer as a base theme, and created a child theme to fix all the stuff I wanted to do differently.

Stargazer is a free theme from Theme Hybrid that was released late last year. While it looks pretty good as-is, there were a few things I wanted to tweak.

I have my child theme set up to show, on the home page, the full text of the most recent post, and excerpts for the next several posts. And I also changed it to always show full-width on single-post pages, and to show the sidebar on the right on other pages.

The most popular, and most useful, posts on this site are those where I include any program code. Recently, I’ve been doing that with Gists. In the past, I’ve done it with either plain <code> and <pre> tags, or with those tags, and some embedded CSS directives. I’ve set up my child theme to apply a couple of tweaks to both the Gists and the <pre> & <code> tags. I think this will give me some decent-looking code blocks that should be easy to read (and easy to copy & paste from, if needed).

I need to go back to some of my old posts and clean up the formatting on them, though. It always bugs me when I find a post on a programmer’s blog with useful code in it, but the formatting on it is all messed up. Well, I don’t want that to happen here, so I’m going to spend a little time trying to clean everything up.

Git cheat sheets

I’ve been a big fan of Mercurial for several years now, and, all other things being equal, I’d likely use it for all of my version control needs for the foreseeable future. But, in the real world, git has gotten a lot more traction than hg. Support for git is integrated into XCode, Xamarin Studio, and newer versions of Visual Studio. And the git command-line tool is available on my 1&1 account, but hg isn’t. So I’m putting a little effort into learning git. I’ve done enough with git to be able to take care of the basics, especially if I’m using a GUI, but I can never quite remember all the ins and outs of the command-line. So I went looking for a good PDF cheat sheet I could print out and keep handy.

I found two good ones. Here’s one from Atlassian, and another from Github.

I’m thinking about putting my WordPress directory on 1&1 under git, so I can pull down a local copy with ease, and roll back questionable updates, and stuff like that. So that’s one more little project related to the blog. Hey, if it helps me learn my way around the git command-line, that can’t be a bad thing, right?

 

Somerset Patriots

I skipped most of the Tour of Somerville today, in favor of going to my first Somerset Patriots game. A friend got some free tickets, and gave me a couple. It was a nice way to spend a warm Memorial Day afternoon. I’m going to use a photo from the game as a “featured image” on this post, and see how that looks.

Oh, and I’ve also just realized that I need to figure out if I can increase the max upload size for this blog. It’s currently 2 MB, which isn’t enough for a full-size photo from my iPhone. I’m not sure if I’m bumping up against some arbitrary WordPress limit, or if this is the usual PHP upload limit.

[Update: I increased the PHP upload limit by creating a .user.ini file in my WordPress root folder, as indicated by this StackOverflow answer. I was already familiar with doing this through php.ini, but I hadn’t stumbled across .user.ini before. So I learned something new today!]

upload_max_filesize = 4M
post_max_size = 8M
file_uploads = On

more fun with WordPress

One more quick WordPress-related post. I just added a sitemap to this blog, using the “Google (XML) Sitemaps Generator” plugin. This is one of the plugins that was included in the default set provided with the 1&1 install. A number of those plugins seemed to be out of date, or of questionable usefulness, but this one was updated just a few days ago, and looks to be fairly professional. I’m not sure how much a sitemap really helps, but what the heck, might as well give it a try.

Also, JetPack 3.0 was just released, so I updated it and poked around a bit. I still need to learn a bit more about some of the modules, and mess around with them on my test site, but overall, it’s still a really nice collection of miscellaneous stuff.

 

WordPress themes and plugins

After the three posts I wrote up yesterday, I think I’ve covered most of what I wanted to cover, regarding my move from Blogger to WordPress. But I also want to write up an initial post on themes and plugins. I actually haven’t quite figured out exactly which plugins I’m going to use for everything, and I’m pretty sure I haven’t settled on a final theme yet, but I want to write up some initial notes.

Themes

The current default theme for a new WordPress install is “Twenty Fourteen“, which, I was pleasantly surprised to see, is actually a really nice, modern, responsive theme. I haven’t liked most of the older default WordPress themes, for various reasons. But, even if it’s a good theme, it’s always a bad idea to stick with the default, since it really doesn’t allow your site to stand out in the crowd. For now, I’m using the “Responsive Theme“, which was one of the pre-installed themes. (I’m not 100% sure if it’s part of the standard WordPress.org install, or just part of the standard 1&1 install.)

Looking around at different themes, I think I’ve figured out what I want in a theme: I want something responsive, that can look good on the desktop, and on mobile devices. And I want something that’s not too fancy, that looks good on a mostly text-based blog. Many of the commercial themes that I see out there are oriented towards a particular type of site, and it’s usually not a standard blog style site. I have found a few candidates that might work well for me, including “Responsive Pro“, the paid version of the free theme I’m currently using. Before I spend any money on a theme, though, I want to learn a bit about creating child themes. I may be able to jazz up my current theme enough, via a child theme, that I won’t feel like I need to buy a commercial theme.

Plugins

The standard 1&1 install of WordPress included an interesting array of plugins, most of which seem to be fairly useless and/or out of date. The one major plugin that I’ve activated so far is Jetpack. The main purpose of this plugin is to give self-hosted sites a lot of the same bells and whistles that are provided to blogs hosted on WordPress.com. This plugin bundles up quite a few bits of functionality, some of them major, and some minor. I’ve activated some of the sharing and publishing functionality, so I’ve got the usual “share this” buttons on my posts, and so that I can push notifications to Twitter and Google+ when I publish a new post. And I enabled the enhanced commenting functionality, so that people can leave comments on this blog via their WordPress.com, Twitter, Facebook, or Google accounts. So, basically, social networking obnoxiousness all around! There’s quite a lot of other functionality in Jetpack; I won’t get into all of it, but some of it is really useful.

As to other plugins, I’m not sure if I really need much more. I’ve been looking at a few backup plugins, but I can probably handle that via a shell script and cron job on 1&1. There’s a backup service called VaultPress that’s available via JetPack, but it costs $5 per month, minimum, and I’m not sure I really need to pay for backup.

Analytics and Adsense

One more topic for this post: I have added my Google Analytics code to this site, via a little text box that is (I think) provided by my theme. There are plugins specifically for Google Analytics, but I don’t think I really need one of those. I also get analytics through the JetPack plugin, and those look interesting. I won’t really get a good picture on those until the blog has been up and running for more than a week, but honestly I could probably remove the Google Analytics code and just use the JetPack stuff.

And I’ve gone ahead and stuck some Adsense code inside a text block on my sidebar. I have mixed feelings about that though. I had Adsense ads on my Blogger site for several years, and I still haven’t broken $10 total in ad revenue. I think I average 2 cents per month. I really just put it on the site out of curiosity. Looking at the ads I’m getting, some of them are reasonable (Verizon, Aereo, and other tech stuff), but some are a little skeevy. I think I’m probably going to drop the ads, unless, for some reason, the revenue picks up, and/or I stop seeing the really questionable ads.

 

Philip Marlowe: Product of a Hard-Boiled Time

From “Murder, My Sweet“:

My feet hurt, and my mind felt like a plumber’s handkerchief. The office bottle hadn’t sparked me up, so I’d taken out my little black book and decided to go grouse hunting.

via Philip Marlowe: Product of a Hard-Boiled Time : NPR.

I’m pretty sure my mind has felt like a plumber’s handkerchief on occasion too. In fact, it may feel like that right now…

Migrating from Blogger to WordPress

Ok, here’s my third exciting post on my Blogger to WordPress migration. After failing miserably with my attempt to migrate from Blogger to Drupal, I wasn’t sure what to expect from the WordPress Blogger import tool.

Drupal’s importer is a third-party module that hasn’t been updated recently. (There might be another one out there that I don’t know about, but I never found one.) It imports from an XML file that you export from Blogger. WordPress, on the other hand, uses Google’s API to connect to Blogger directly, and read all your posts. It pulls in posts, comments, and images. My old blog had about 1600 posts, and it pulled them all in, pretty quickly.

After importing, I used this guide to help me figure out how to set up my permalinks to (pretty much) match Bloggers, then run a PHP script to fix up the permalinks to exactly match Blogger’s. I also had Blogger putting a “.html” at the end of the post URLs. (I’m not sure if that was standard, or if that was an artifact from when I switched from Blogger’s FTP publishing, where I was actually creating HTML pages for each post.) So I had to create a rewrite rule in my .htaccess file to deal with that. Now that I’ve done that, I’m pretty sure most individual post URLs from the old blog will redirect correctly to the corresponding pages on the new blog.

In terms of the DNS stuff, I had to change Blogger to point to a new subdomain (“oldblog” in case you’re curious), so I could free up “blog.andrewhuey.com” for the new WordPress install. I hit a slight snag there, as I deleted the “blog” subdomain in 1&1, with the intention of letting the “click & build” install recreate it. But it turns out that deleting a subdomain in 1&1 can take a while, and the subdomain is basically locked while you’re waiting for it to happen. So I got an opportunity to run out for an iced coffee.

One other minor snag I hit involved DNS. I’ve had my router configured to use Google’s DNS servers for a while now. Well, Google didn’t quite want to let go of “blog.andrewhuey.com”, and got a bit confused about it, so I had to switch to using my ISP’s DNS servers, so I could actually reach the new blog. (Weirdly, it had worked fine for a while, then just stopped, and started returning errors. At first, I thought there was something wrong with the WordPress install, but then I found I could get to the blog on my phone.) At some point, I’ll switch back to Google DNS, or maybe OpenDNS.

I plan to write up at least one more post on my WordPress migration, covering themes and plugins. Maybe tomorrow.

Update: I spoke too soon!

I just figured out that the Blogger importer stripped out all JavaScript embeds in my posts, or at least certain ones. The end result of this is that all my GitHub Gists are missing. So any posts with source code now have no source code. So the most useful posts on my site are now kind of useless. Great!

Finding all the posts with Gists is proving to be a bit of a challenge too, since I can’t search for text within script tags via the Blogger interface, so I can’t just search for “gist.github.com” or anything obvious like that. But I think I’ve found most of them now.

Oh, and in WordPress, you can apparently reference a Gist simply by pasting the URL to the Gist in, and it gets magically expanded. Which is nice. (It looks like this is part of Jetpack, rather than core WP. And there are a bunch of other cool shortcodes you can use.)

But I’m also seeing now that my current WordPress theme isn’t the best for rendering Gists. But one thing at a time. Let’s try to get them all back in there first, shall we?