Posts in the Software category are about software applications for which I’ve gained experience either using, troubleshooting, or configuring.

Windows 8 Tutorials

Well I finally installed Windows 8 because, well… somebody has to, right?

Truth be told I was hesitant.  I’m normally not one to buck changes but when I saw what Microsoft did to the UI I felt concerned about what was going to happen to my work flow. To put it another way: WHERE THE HELL IS MY START BUTTON, MR. BALLMER?

Unfortunately we’ve gotten our first handful of Windows 8 devices at work and, since I’m responsible for desktop support, I pretty much have to learn it.

Fortunately (or unfortunately) for you, I’m taking all of you along for the ride.  Watch me screw up so you don’t have to!

 

Tutorial 1: Activating Windows 8

 

Multiple Editors in WordPress

I wanted multiple editors in a custom post type that I’m developing in WordPress. I spent my Tuesday cobbling together a solution from articles I found online such as How to Use Multiple WordPress WYSIWYG Visual Editors, Supporting Multiple Visual Editors over at the WordPress Support forum, and a bunch of other links that came up first when I was researching.  I got my multiple editors, but without the Visual/HTML tabs, and without the Media Uploader.

I started my Wednesday morning by finding wp_editor(). This function, introduced in WordPress 3.3, will output all of the HTML needed and enqueue all of the appropriate scripts and styles needed for any number of editors.  Unless you have to support older versions of WordPress, don’t waste your time writing your own solution, just use this amazing built-in function.

Choosing a WordPress Backup Plugin

One of the first things you should do after installing a new WordPress blog is configure backups. Though WordPress does feature an export feature that allows you to save much of your content to XML, there isn’t a full-blown backup feature built into the WordPress Core. You’ll need to download a WordPress backup plugin.

Features to Look For in a WordPress Backup PlugIn

These are the minimum features that I look for in a backup plug-in.  You may have different requirements than my own but if your backup plug-in doesn’t provide these features, you will eventually find it lacking.

  • Backs up the entire database, not just the core WordPress tables. In the event that your site crashes and needs to be restored, you’re going to need a backup of your database.  The last thing you want is to restore your database and find that plug-in content such as purchase records in a shopping cart plugin or images stored in a gallery plug-in no longer exist.
  • Backup the entire WordPress Directory. Some backup plug-ins only backup the database, but there is plenty of content that’s stored on the filesystem and not the database including uploaded media, plugins, and theme customizations. Choose a plugin that backs up the entire file system for your blog. That way when a crisis occurs, you can simply dump the files and database back to the server and continue business as usual.
  • Scheduling. Your backup plug-in should provide some sort of scheduling feature that can automatically perform backups as a daily, weekly, or monthly task. You shouldn’t have to remember to manually backup you blog, though a manual backup feature is helpful as well.
  • “Off-Site” Backup.Your backup plug-in should have some way of saving your backup off site. It could be by emailing them to you, uploading them to an FTP site: anything that duplicates your blog data to a second server in case your server is physically damaged. A plug-in that simply saves the backup to the same server that hosts your blog doesn’t protect you from the all-to-common hard drive failure, your hosting company going belly-up, or any other scenario that prevents you from getting access to  your data.

Backing Up WordPress to DropBox

I use DropBox to store business records and other important files, and so I’ve settled into using the WordPress Backup to DropBox plugin for most of my sites.  The plug-in provides all of the features that I mentioned above.  In addition it gives me access to those backups from my PC via the DropBox desktop application, and gives me confidences that my backups are occurring when I scheduled them because I can see the files updating in real-time.

Another excellent and popular plugin is Backup Scheduler. It allows you to specify what gets backed up (database, files, or everything), and has the option to send you the backup via email.

A WordPress Update is Available

Why You Should Wait Before Updating WordPress

A WordPress Update is Available

The Dashboard lets you know when a WordPress update is available.

Have you ever heard people who upgrade to the latest version of Windows complain about the experience?

When you upgrade to a new operating system there’s a good chance that the update will contain flaws that need to be addressed by hotfixes and service packs, your hardware manufacturer may not have compatible drivers yet, and certain applications just won’t work.

WordPress isn’t so different. When you update WordPress you can run into incompatibilities in plug-ins, themes, and even your own customizations. WordPress updates are usually trouble-free and will only break very complex or poorly maintained sites. But problems can and do occur, so I recommend holding off a few weeks before updating WordPress sites.

Unless an update contains a fix for a known security vulnerability, let early adopters work out the kinks first before updating your blog.

Don’t rush into an update unless you really need it. You can find out just how critical an update is by checking the WordPress Development Blog widget on your WordPress Dashboard or by clicking the Current WordPress Version link at the WordPress Codex . WordPress has a lively community and you can usually expect plugin compatibility to be tested within a few weeks or months of a WordPress update being released.

 

What To Do When Wpautop Attacks Your Markup

Professional WordPress Plugin DevelopmentThere are fewer things more annoying about the WordPress platform than watching your carefully-crafted markup go straight to Hell.  If you’ve used WordPress for more than 10 minutes you probably know what I’m talking about.

The primary culprit is a filter called wpautop that automatically applies to post and page content. The wpautop filter converts double line breaks to sets of opening and closing paragraph tags.  It works fine if your posts are text only, contain no images, no short codes, and only the most basic inline markup.  Throw a few block-level elements into a post or a shortcode or two, however, and watch your markup devolve into a tangled mess of improperly-nested tags.

How To Tell If Wpautop Is Causing Problems

You can usually tell if wpautop is causing HTML validation to fail if the W3C Validator is giving you the errors:

document type does not allow element "xxx" here

followed by

end tag for "xxx" omitted, but OMITTAG NO was specified

Seeing this combination of errors, particularly when the tag in question is a <p> tag, is a pretty good indication that wpautop is to blame.

Solutions

The following are a few common solutions for living with, or without, wpautop in WordPress.

Turn it Off

If you are comfortable with HTML markup you may be better-served by just disabling wpautop completely and specifying all of your own HTML markup when writing blog posts. You can disable wpautop either by installing a plug-in that does it for you (this one for example), or by adding the following lines to your theme’s functions.php file:

remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

Use wpauto-control

I like to use the wpautop-control plugin, which allows you to set wpautop to enabled or disabled by default, then switch it on or off on a post-by-post (or page-by-page) basis. This allows me to develop complex pages with wpautop disabled, but leave it enabled for simpler blog content created later by my clients.