Using WordPress Archive

How to Configure Your WordPress Site for Mobile Devices (in One Minute)

George Smyth asked me to do another segment on his One Minute How-To podcast, and I picked this as a topic.

First, log into your dashboard and go to “Plugins.” Select “Add New” from the menu.

search for plugins within WordPress

Type “WordPress Mobile Pack” into the search box and click the button that says “Search Plugins.”

WordPress Mobile Pack listing

Click “Install Now.” When the dialog box pops up and asks “Are you sure you want to install this plugin?” click “OK.”

Activate the plugin.

“Once the plugin is activated, you can modify settings under “Appearance.”

WordPress Mobile Pack settings

The plugin detects mobile browsers automatically. You can decide whether to include a link in your footer so mobile users can choose to see your regular theme instead of the mobile theme, and which mobile theme to use. (There are screenshots in your Themes directory.)

Instill-Leadership-New-Theme  WordPress MobilePack screenshot

The mobile theme isn’t as pretty, but it makes it possible to read the text on a narrow screen without having to scroll around.

There’s another popular mobile plugin, WPTouch, that people really like, but it’s just gone pro and costs $29. If most of your mobile visitors use touch-screen phones, it might be worth it.

It’s WordPress Plugin Developer Donation Day!

Scott Ellis designated March 1st WordPress Developer Donation Day and has urged us all to donate $5 to the developer(s) of our favorite plugin(s) and then blog or tweet about it with the hashtag #wppdd.

There are a lot of plugins I rely on and use in almost every installation. I’m working on getting descriptions of them all posted here, but it’s been slow going. Many of my sites have more than a dozen active plugins. If I donated $5 to a different plugin developer on the first of every month, it would take years to get through them all.

I chose the WordPress Database Backup plugin to donate to. It’s the plugin I’ve used most and could least do without. I’m experimenting with other backup plugins for WordPress, but this is the one I’ve successfully restored data from. It’s been around forever. I can’t remember when I first started using it, but it might have been as long ago as 2005, in my earliest WordPress days. Even if I ultimately replace WP-DB-Backup with a different plugin, Il Filosofo deserves the donation for all the years of service.

PreviewDNS Can Bork Your WordPress Install—But There’s a Fix

A couple of weeks ago a client decided to move her website and blog from Earthlink, and there was much rejoicing. Earthlink is a terrible place to have a WordPress install. You have to do manual upgrades.

The new host, GoDaddy (not my first choice for hosting, in all honesty, though I have some of my own sites there; their servers are slow as treacle), offers a service called Preview DNS so you can make sure everything works on your new site before actually transferring the domain. This is a handy thing to be able to do and a nice thing for them to offer.

There’s only one problem, as I learned to my detriment. If you install WordPress under Preview DNS, the database is going to be really confused and totally bork your blog when you transfer the domain, because WordPress will be looking for http://www.mydomain.com.previewdns.com when it should be looking for http://www.mydomain.com. This means it won’t call your stylesheet properly and you can’t log in. Eeek!

The nice young man I talked to at GoDaddy hadn’t seen the problem before either, but some of the the other tech support staff there had. In fact, they’d actually put together a help file explaining how to solve the problem of unintentionally changing your WordPress URL.

Fixing it involves editing the MySQL database where WordPress stores all its information. It’s been a long time since I’ve done anything with a MySQL database besides back it up or restore it, but if you follow the directions exactly, you’ll be okay.

First you have to log into PHP MyAdmin. If you’ve forgotten the username and password for this, don’t worry. They’re contained in your wp-config.php file, and you can get to that through FTP. (Or I could, because I set the FTP up with the numerical IP address, not the previewdns.com address.)

Once inside phpMyAdmin, you’ll see a bunch of stuff that doesn’t mean much to you (if you’re like me and stay out of SQL databases). What you need is in the upper left-hand corner.

image

Click the white button that says SQL (the other one is for the help file) and enter the following code into the box that pops up, replacing the URLs as appropriate.

UPDATE wp_options
SET option_value = 'http://www.newlocation.com'
WHERE option_value = 'http://www.oldlocation.com'

Hit the “GO” button and you should be all set, at least in terms of things like being able to log in, and WordPress finding the theme’s stylesheet.

As it happened, however, there were a few internal links to other posts and other references to the dread “previewdns.com” link. So I needed to figure out how to fix those. This time, it was Lorelle Van Fossen who came to my rescue, with her “Search and Replace in WordPress MySQL Database” article from 2005. With Lorelle’s help, I was able to replace those lingering links in the body of the posts.

Now that I know this, I’ll be less hesitant to venture into my WordPress databases again if I need to—but honestly, I prefer not to need to. I’m sure this isn’t the last site relocation I’ll ever work on, though, so I’ll probably encounter Preview DNS again.

How to Repair and Optimize Your Database in WordPress 2.9

This feature seemed especially likely to be useful to me for my older blogs, the ones that had gone through imports and exports and lots of different plugins. At first I wasn’t sure what you were supposed to do besides pasting the code define('WP_ALLOW_REPAIR', true); into your config.php file. (And when I pasted it the first time, I messed up, because for some reason I had backticks in there instead of straight single quotes.)

I found the answer in Technosailor’s 10 Things You Need to Know About WordPress 2.9 post. After you update your config.php file, you need to visit a special URL in order to run the repair script. That URL is http://yourdomain/yourWPinstalldirectory/wp-admin/maint/repair.php.

Once you get there, you’ll see the following message:

database-repair

I hit “Repair and Optimize” and was pleased (if mildly surprised) to see that all my tables were both okay and optimized already.

After the script finishes running, you get this message:

Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.

define('WP_ALLOW_REPAIR', true);

You might want to just comment the line out so it’s ready for you next time you want to run the script.

Manual Upgrades Are Not a Thing of the Past

image

What is it with certain webhosts? I mean, I know that none of the Fantastico-type installers have yet caught up to the fact that you can upgrade WordPress automatically from within the dashboard, so whenever you log into your control panel, it’s going to tell you that you need to upgrade even though you already did. (I found that “upgrading” through Cpanel when I have already upgraded is safe in BlueHost; I have not tried doing the equivalent with GoDaddy or DreamHost.)

But some web hosting companies seem determined to cut you off entirely from the automatic upgrade and install features of the latest versions of WordPress. And the absolute worst culprit I have yet discovered is Earthlink. Attempts at upgrading automatically not only don’t work, they manage to wipe out the active theme folder, much to the dismay of my client, who then needs me to go in, restore her theme, and handle the upgrade manually.

I have no idea why Earthlink sets it up this way, but the ability of WordPress to function rests on the existence of a file called Earthlink.dat, created when the Earthlink staff first installed WordPress. I’m not really interested in the technical details of why this problem exists, since I believe the best solution is for my client to switch web hosts. Their “starter site” plan costs more than twice what everyone else is charging, and I’m not hearing wonderful things about their service. (It was different back when my cousin Jason the Mac geek worked there.)

And this isn’t the only client whose WordPress site I’ve had to upgrade manually of late. In some cases, the installation was too old to upgrade automatically and wouldn’t work with the wonderful Instant Upgrade plugin. In others, there appeared to be some kind of permissions block. Either way, I’ve pretty much memorized the not-very-complicated instructions from the WordPress Codex.

Step 1: Replace WordPress files

  1. Get the latest WordPress. Either download and extract it to your computer or download it directly to the server.
  2. Delete your old wp-includes and wp-admin directories.
  3. Copy the new WordPress files to your server, overwriting old files in the root, except perhaps the wp-content folder (see “NOTE” below). Note that this means *all* the files, including all the files in the root directory as well. If you use the default or classic theme and have customized it, then you can skip that theme.

NOTE   The wp-content folder requires special handling, as do the plugins and themes folders. You should copy over the contents of these folders, not the entire folder. In some cases, copying the entire folder may overwrite all your customizations and added content.

Also take care to preserve the content of the wp-config.php file in the root directory. This file contains current settings for your existing installation, e.g. database sign-in information.

Step 2: Upgrade your installation

Visit your main WordPress admin page at /wp-admin. You may be asked to login again. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like http://example.com/wordpress/wp-admin/upgrade.php. Follow that link and follow the instructions. This will update your database to be compatible with the latest code. If you fail to do this step, your blog might look funny.

This is not difficult, or even very time-consuming. It’s just tedious. And it shouldn’t be necessary.

Theme Options vs. Plugins for Controlling WordPress Features and Functions

Arras Theme Options

The most popular premium (and free) themes almost all have Theme Options, places where you can go in and change the way your WordPress installation work. Sometimes theme options focus mainly on design, such as letting you choose between color schemes or upload a header image. Some themes have much more elaborate options panels where you can choose the home page display, configure slideshows, select categories to feature, and so forth.

As I understand it, theme designers create these added features by building WordPress plugins into their theme designs, either directly into the functions.php file or by bundling the plugins with the theme. Sometimes they use plugins from the plugin repository; sometimes they write the plugins themselves. (Watch out for errors when you try installing these themes through the WordPress dashboard. You’re going to want to unzip them first and upload them with an FTP client.)

Theme options are wonderful for new users, and they can save even experienced users time hunting through and testing plugins. (Is the one I used on the last site still up-to-date? Does it conflict with anything else I want to use on this site?) Also, a good theme designer will consolidate scripts, and that can speed up the site’s function; running too many plugins is not necessarily kind to your server.

But.

The first time a DIY type like me encounters theme options, they’re pretty baffling. For one thing, they can run counter to the way WordPress is designed to work. Woo Themes, for instance, won’t display their own home pages correctly if you have already set WordPress to use a static page as its home page. (This is true for many other magazine-style themes; I just happened to encounter it first with Woo Themes.)

WP Remix Banner

For a really drastic example of something that interferes with the normal actions of WordPress, you can try WP Remix. There are a number of good things about this theme, if you’ve got the design chops to make it look pretty. It comes with templates for enough different page layouts to make your eyes cross. But there are a couple of tricks to using it that will really trip you up if you don’t know them, and the documentation could be a little clearer on the subject.

First, you have to choose the template from the special field that the Remix editor inserts, not from the normal WP page template drop-down.

Then you have to click the “send to editor” button to activate the template. The editor box will fill with filler text and images. You have to replace that carefully so as not to mess up the layout. Naturally you can’t use an offline blog editor the way I am now.

But even when you’re not dealing with such an extreme case, controlling your site through theme options rather than plugins means that as soon as you change themes, all those features are going to go away.

So whatever time you saved in the beginning by using theme options, you might be losing as you scramble to re-create what you had.

And wasn’t part of the point of WordPress to keep things like design, function, and content separate?

Right now, on November 12, 2009, I’m using a theme with functions on this site. More and more themes have them. Maybe all themes will have them soon. But I actually hope they won’t. And I may still switch to a plain-vanilla theme and just install plugins if I want a featured content slider, etc and so on. That way all of those things will continue to exist if I change themes, and WordPress will continue to work the way the Codex says it does.

But I Thought WordPress Was Supposed to Be Easy!

The Truth About WordPress

by Sallie Goetsch of the Podcast Asylum and Jon Leland of ComBridges

wordpress-logo-stacked-rgb Recently, in a WordPress group on LinkedIn, the question was asked “Is WordPress the answer to all our prayers?” The writer was extending the conversation about his own blog post which objected vehemently to crazy claims that complete novices could build “killer websites” in minutes if they just used WordPress. It seems that the world of technology is filled with these kinds of false promises and unrealistic expectations.

For those of us who have hand-coded HTML back before tools like Dreamweaver were invented, and who have experimented and had learning experiences with creating web pages in a wide variety of ways, WordPress is an important new platform for website development. Compared to anything we’ve seen before, WordPress is amazingly simple and intuitive, especially given its array of powerful features. It lets you change your design without affecting your content, it has great built-in SEO (search engine optimization) features, and it’s free.

WordPress also has advantages over competing website publishing systems like Drupal and Joomla. For one thing, you can use easy offline editors (like Windows Live Writer and Ecto) to update content on WordPress sites. WordPress also began as a blogging platform, and as a result, it’s “natural” for WordPress websites to include blogs. For many website designers, even those who have never learned Java, never learned Flash, never learned PHP, and don’t know a single programming language, WordPress does answer many prayers.

But that’s very different from saying that anyone can use WordPress to design and implement a sophisticated website. If you try to take advantage of WordPress’ full capabilities as a content management system without knowing anything about HTML, CSS, or PHP—or about WordPress itself—you are simply asking for trouble. Yes, you can set up a basic blog using WordPress.com without knowing much, but to really make WordPress (or any other new software) sit up and do tricks, you have to put some time into learning how to use it. (More advanced users download WordPress from WordPress.org. The supply of tricks available at WordPress.com is limited.)

When you think about it, most people only know how to use the most basic features of the software that they use every day. They treat Microsoft Word like a glorified typewriter and don’t even know most of its tools and options exist, much less how to use them. They pay hundreds of dollars for Photoshop and only use the functions they could have gotten for free with Picasa. (Photoshop is so sophisticated that even advanced users can spend hours studying DVD tutorials to learn new things.)

So why should WordPress be any different? It’s not, but people get excited and apparently WordPress’ many benefits give birth to irrationally exuberant expectations. Either that, or there are some people out there who think that because WordPress is easy for them, it must seem that easy to everyone else.

For example, if you hear that there are 5,000 free plugins that extend WordPress’ platform, and hundreds of free themes in the theme repository, shouldn’t you expect that just looking through them and testing them to see which ones would be best for you might take quite some time?

And then there’s the fact that new versions of WordPress come out a lot more often than new versions of Photoshop. So you have to stay up to date, by doing things like attending meetups and Wordcamps, reading blogs, watching videos, listening to podcasts, or even reading books. (There are several good books on WordPress, but it is hard for print books to keep up with the rapid developments in the platform and its plugins.)

Because WordPress is a web-based platform, it’s much easier for geographically dispersed teams to collaborate on websites. But due to its popularity, WordPress sites are also open to server hacks and other attacks—as ComBridges discovered first hand recently.

While it doesn’t necessarily take a programmer to learn WordPress, if you want to create a sophisticated WordPress site, skills like PHP will come in handy. And, if you want to learn your way around, study the WordPress Codex, and be sure to allow some time to learn important fundamentals such as, for example, which plugins make it easier to use WordPress as a CMS (content management system).

Even though WordPress is easy enough for Sallie’s hairdresser to update, Sallie was the one to create the site, and had to provide more than one tutorial on posting to the blog and editing pages.

WordPress deserves to be praised for many reasons, but exaggerated claims about its ease of use for the complete novice do everyone a disservice. Let’s practice a little expectation management, people.

Jon Leland runs web design and internet marketing company ComBridges. Sallie Goetsch is a WordPress fangirl who maintains several WP sites for her own and clients’ businesses. They have collaborated on some occasionally nerve-wracking WordPress projects.

Cross-posted from the Reports from the Asylum blog.