Chapter 7
In This Chapter
Plugging in to plugins
Finding, downloading, and unpacking plugin files
Using the plugins that come with WordPress
Uploading and installing plugins
Activating and managing plugins
Uninstalling plugins
Exploring open source plugins
Half the fun of running a WordPress-powered website is playing with the hundreds of plugins that you can install to extend your site’s functions and options. WordPress plugins are like those really cool custom rims you put on your car: Although they don’t come with the car, they’re awesome accessories that make your car better than all the rest.
By itself, WordPress is a very powerful program for web publishing, but by customizing WordPress with plugins — add-on programs that give WordPress almost limitless ways to handle web content — you can make it even more powerful. You can choose any plugins you need to expand your online possibilities. Plugins can turn your WordPress installation into a full-featured gallery for posting images on the web, an online store to sell your products, a user forum, or a social networking site. WordPress plugins can be simple, adding, say, a few minor features, or they can be complex enough to change your entire WordPress site’s functionality.
In this chapter, you find out what plugins are, how to find and install them, and how they enhance your site to make it unique. Using plugins can also greatly improve your readers’ experiences by providing them various tools to interact and participate — just the way you want them to!
In this chapter, I assume that you already have WordPress installed on your web server. If you’re skipping around in the book and haven’t yet installed WordPress on your web server, you can find instructions in Chapter 3.
A plugin is a small program that, when added to WordPress, interacts with the software to provide some extensibility to the software. Plugins aren’t part of the core software, nor are they software programs themselves. They typically don’t function as standalone software. They do require the host program (WordPress, in this case) to function.
Plugin developers are the people who write these gems and share them with the rest of us — usually for free. As is WordPress, many plugins are free to anyone who wants to further tailor and customize a site to meet specific needs.
Literally thousands of plugins are available for WordPress — certainly way too many for me to list in this chapter alone. I could, but then you’d need heavy machinery to lift this book off the shelf! So here are just a few examples of things that plugins let you add to your WordPress blog:
Chapter 15 gives you a peek at some of the most popular plugins on the scene today. In the meantime, this chapter takes you through the process of finding plugins, installing them in your WordPress blog, and managing and troubleshooting them.
Before you start installing plugins on your site, it’s important for you to explore the Plugins page on your WordPress Dashboard and understand how to manage the plugins after you install them. Click the Installed Plugins link in the Plugins menu on your WordPress Dashboard to view the Plugins page shown in Figure 7-1.
The Plugins page is where you manage all the plugins you install on your WordPress site. By default, the Plugins page displays a full listing of all the WordPress plugins you currently have installed. You can filter the listing of plugins using the links shown directly below the Plugins page title:
With a quick glance at the Plugins page, you can easily tell which plugins are active — and which aren’t — by the background color of each plugin listed. A blue background means that the plugin is active. A white background means that the plugin is not active. In Figure 7-1, the background of the Akismet plugin is white and the background of the Hello Dolly plugin is blue. Akismet isn’t active, but Hello Dolly is (the figures in this book are black and white, so you cannot see the blue color — but you can see the different darker/lighter shades in Figure 7-1).
The Plugins page displays plugins in two columns, which give details for each plugin:
Plugin: This column lists the plugin name so that you can find it easily when browsing the Plugins page. Directly beneath the plugin name, you see a few links for easy plugin management:
Sometimes, a plugin will have a separate settings page; in that case, an additional link labeled Settings is displayed underneath the plugin name. Clicking that link takes you to the settings page for that plugin.
For a lot of reasons, mainly security reasons and feature updates, always use the most up-to-date versions of the plugins in your blog. With everything you have to do every day, how can you possibly keep up with knowing whether the plugins you’re using have been updated?
You don’t have to. WordPress does it for you.
Figure 7-2 shows an out-of-date version (2.5.9) of Akismet installed. WordPress notifies you when a new update is available for a plugin in four different ways, as shown in Figure 7-2:
WordPress gives you not only a message that a new version of the plugin is available, but also a link to a page where you can download the new version, or a link that you can click to update the plugin right there and then — WordPress’s one-click plugin update.
Click the Update Now link, and WordPress grabs the new files off the WordPress.org server, uploads them to your plugins directory, deletes the old plugin, and activates the new one. (If a plugin is deactivated at the time it’s updated, WordPress gives you the option to activate the plugin after your update process is completed.) Figure 7-3 shows the Updated message on the Plugins page that you see after the plugin has been upgraded.
At this writing, WordPress packages two plugins with the installation files:
I touch on Akismet a few times throughout this book. It’s my humble opinion that Akismet is the mother of all plugins and that no WordPress blog is complete without a fully activated version. Apparently WordPress agrees, because the plugin has been packaged in every WordPress software release since version 2.0. Akismet was created by the folks at Automattic — the same folks who bring you the JetPack plugin. Akismet is the answer to comment and trackback spam.
To use the plugin, follow these steps:
On the Plugins page, click the Activate link under the Akismet plugin name.
A box appears at the top of the page, saying Activate your Akismet account. Almost done — activate your account and say goodbye to comment spam. (See Figure 7-4.)
Click the Activate Your Akismet Account button.
Clicking this link takes you to the Akismet page in your WordPress Dashboard, where you can create an API key, required in order to use the Akismet plugin.
Click the Get Your API Key button.
This opens the Akismet website in your browser window at http://akismet.com/wordpress
.
Click the Get an Akismet API Key button.
This opens the signup page on the Akismet website. Because Akismet is hooked into the WordPress.com service, if you already have a WordPress.com account, click the I Already Have a WordPress.com Account! link; otherwise, fill in the text fields and provide your email address, desired username, and password to create one.
After you have done this, Akismet requests that you authorize your account with Akismet — click OK.
Select and pay for (if needed) your Akismet key.
After you’ve gone through the signup process, Akismet provides you with an API key. Copy that key by selecting it with your mouse pointer, right-clicking, and selecting Copy.
On the Akismet configuration page, after you’ve entered and saved your key (see Figure 7-5), you also have two options that you can select to further manage your spam protection:
Akismet catches spam and throws it into a queue, holding the spam for 15 days and then deleting it from your database. It’s probably worth your while to check the Akismet Spam page once a week to make sure that the plugin hasn’t captured any legitimate comments or trackbacks.
You can rescue those nonspam-captured comments and trackbacks by doing the following (after you’ve logged on to your WordPress Dashboard):
Click the Comments menu.
The Comments page appears, displaying a list of the most recent comments on your blog.
Click the Spam link.
The Comments page now displays all spam comments that the plugin caught.
If you locate one that’s legitimate, click the Not Spam link that appears directly below the entry when you hover your mouse pointer over it.
The comment is marked as legitimate. In other words, you don’t consider this comment to be spam. The comment is then approved and published on your blog.
The folks at Automattic did a fine thing with Akismet. Since the emergence of Akismet, I’ve barely had to think about comment or trackback spam, except for the few times a month I check my Akismet spam queue.
Matt Mullenweg, co-founder of WordPress, developed the Hello Dolly plugin. Anyone who follows the development of WordPress knows that Matt is a huge jazz fan. How do we know this? Every single release of WordPress is named after some jazz great. One of the most recent releases of the software, for example, is named Parker, after jazz great Charles Parker; another release was named Coltrane, after the late American jazz saxophonist and composer John Coltrane.
So, knowing this, it isn’t surprising that Mullenweg developed a plugin named Hello Dolly. Here’s the description of it that you see in the Plugins page on your Dashboard:
This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: “Hello, Dolly.” When activated, you will randomly see a lyric from “Hello, Dolly” in the upper right of your admin screen on every page.
Is it necessary? No. Is it fun? Sure!
Activate the Hello Dolly plugin on the Plugins page on your WordPress Dashboard. When you’ve activated it, your WordPress blog greets you with a different lyric from the song “Hello, Dolly!” each time.
If you want to change the lyrics in this plugin, you can edit them by clicking the Edit link to the right of the Hello Dolly plugin on the Plugins page. The Plugin Editor opens and lets you edit the file in a text editor. Make sure that each line of the lyric has its own line in the plugin file. This plugin may not seem very useful to you and, in fact, it may not be useful to the majority of WordPress users, but the real purpose behind the plugin is to provide WordPress plugin developers with a simple example of how to write a plugin.
This book does not cover topics on how to create your own plugin, but if you are interested in that, you may want to check out my other book, WordPress All-in-One For Dummies (John Wiley & Sons, Inc.), which covers that topic in detail.
In this section, I show you how to install a plugin in your WordPress blog using the built-in plugins feature. The auto-installation of plugins from within your WordPress Dashboard works only for plugins that are included in the official WordPress Plugin Directory (https://wordpress.org/plugins
). You can manually install plugins on your WordPress blog, a process that I cover in the next section.
WordPress makes it super easy to find, install, and then activate plugins for use on your blog. Just follow these simple steps:
Click the Add New link in the Plugins menu.
The Install Plugins page opens, and you can browse the official WordPress Plugins Directory from your WordPress Dashboard.
Search for a plugin to install on your blog:
Enter a keyword for a plugin you’d like to search for. For example, if you want to search for plugins that allow you to add features for integration with Twitter on your site, enter the word Twitter in the Search Plugins text box to return a list of plugins that deal specifically with the social network called Twitter.
You can also discover new plugins by clicking any of the provided methods at the top of the Add Plugins page: Featured, Popular, Recommended, or Favorites.
Figure 7-6 shows the results page for the Twitter search phrase. The first plugin listed is simply called “Twitter,” which is a plugin developed by the developers at Twitter — this is the one I want to install.
Click the More Details link below the plugin name.
A Description window opens, giving you information about the Twitter plugin, including a description of the plugin, version number, author name, and an Install Now button.
Click the Install Now button.
You go to the Installing Plugins page within your WordPress Dashboard, where you find a confirmation message that the plugin has been downloaded, unpacked, and successfully installed.
Specify whether to activate the plugin or proceed to the Plugins page.
Two links are shown below the confirmation message:
In the following sections, I show you how to find, upload, and install the very popular Twitter plugin, developed by Twitter. I’m using the Twitter plugin as a real-world example to take you through the mechanics involved in downloading, unpacking, uploading, activating, and using a plugin in WordPress.
The Twitter plugin gives your readers the opportunity to share your content on the Twitter social networking site.
The first step in using plugins is locating the one you want to install. The absolute best place to find WordPress plugins is the official WordPress Plugins Directory found at https://wordpress.org/plugins
where, at the time of this writing, you will find over 36,700 plugins available for download.
To find the Twitter plugin, follow these steps:
https://wordpress.org/plugins
.Locate the Twitter plugin on the search results page (see Figure 7-7) and click the plugin name.
The Twitter plugin page opens in the WordPress Plugin Directory, where you find a description of the plugin as well as other information about the plugin (see Figure 7-8). For example, in Figure 7-8, take note of the important information on the right side of the page:
Click the Download button for the plugin version you want to download.
If you’re using Internet Explorer, click the Download button and a dialog box opens, asking whether you want to open or save the file. Click Save to save the zip file to your hard drive, and remember where you saved it.
If you’re using Mozilla Firefox, click the Download button and a dialog box opens, asking what Firefox should do with the file. Select the Save File radio button and then click OK to save it to your hard drive. Again, remember where you saved it.
For other browsers, follow the download instructions in the corresponding dialog box.
Locate the file on your hard drive and open it with your favorite decompression program.
If you’re unsure how to use your decompression program, refer to the documentation available with the program.
Frequently, the plugin developer includes a readme file inside the zip file. Do what the title of the file says: Read it. Often, it contains the exact documentation and instructions that you will find on the plugin developer’s page.
Make sure that you read the instructions carefully and follow them correctly. Ninety-nine percent of WordPress plugins have great documentation and instructions from the plugin developer. If you don’t follow the instructions correctly, the best scenario is that the plugin just doesn’t work on your blog. At worst, the plugin creates all sorts of ugly errors, requiring you to start the plugin installation over from step one.
In the case of the Twitter plugin, the readme.txt file contains information regarding the requirements of the plugin and useful information on how to use the plugin once you have it installed and activated on your site.
Now you’re ready to upload the plugin files to your web server. In earlier versions of WordPress, you needed to upload the unpacked plugin files to your web server via FTP (see Chapter 3). Now, all you need to do is upload the zip file you just downloaded from the WordPress Plugin Directory. Be sure you are logged on to your WordPress Dashboard.
Unpacking the zip file you’ve downloaded is helpful because it can contain files that give you insight into the use of the plugin itself. Locate the plugin files you just unpacked on your hard drive. In the event that the plugin developer didn’t include a readme.txt file with instructions, check the plugin developer’s page for specific instructions on how to install the plugin in your WordPress blog. Specifically, the documentation in the readme.txt file and/or on the plugin’s website should address the following points:
To install the Twitter plugin via the WordPress Dashboard, follow these easy steps:
Click the Add New link in the Plugins menu.
This opens the Install Plugins page on your Dashboard.
Click the Upload Plugin link at the top of the Install Plugins page.
The resulting page gives you an interface for uploading a plugin in zip format.
Click the Choose File button.
In the resulting File Upload dialog box, you can locate the zip file for the plugin you’d like to install. In this case, the file is twitter.1.0.1.zip (see Figure 7-9). Click the file to select it and then click the Open button to return to the Install Plugins page.
Click the Install Now button.
WordPress uploads the plugin’s zip file into the /wp-content/plugins/ folder on your web server, unpacks it, and installs it. Figure 7-10 shows the Installing Plugin page with messages for you during and after the (hopefully successful) installation.
All plugins listed on the Plugins page are either active or inactive (except the Drop-In plugins, which are active by default). When you want to activate an inactive plugin, follow these easy steps (in this case, you are activating the Twitter plugin that you installed in the previous section):
Click the Installed Plugins link on the Plugins menu.
The Plugins page opens, listing all the plugins installed in your WordPress site.
Locate the Twitter plugin.
If you have a lot of plugins installed on your WordPress website, you can narrow your search by clicking the Inactive link, which lists the currently inactive plugins.
Click the Activate link below the plugin name.
The Plugins page refreshes, and the Twitter plugin now appears as an active plugin on the page.
If you’ve followed all these steps in your own website, congratulations — you now have the Twitter plugin installed. Great job!
Some, but not all, WordPress plugins provide an administration page where you can set options that are specific to that particular plugin. You may find the plugin administration page in any of these places:
You can find the Twitter Settings page by clicking the Twitter link in the main Dashboard navigation menu. The Twitter Settings page opens (see Figure 7-11).
After all this talk about installing and activating plugins, what happens if you install and activate a plugin and then at some point decide that it just isn’t what you want? Don’t worry — you aren’t stuck forever with a plugin that you don’t want. WordPress lets you be fickle and finicky in your plugin choices!
To uninstall a plugin from your WordPress blog, follow these steps:
Click the Installed Plugins link on the Plugins menu.
The Plugins page opens.
Click the Deactivate link below the plugin title.
The Plugins page refreshes, and the plugin now appears as deactivated (or inactive).
Click the Delete link that now appears below the plugin title.
The Delete Plugin page opens, and a confirmation message displays asking you whether you’re sure you want to delete this plugin. (See Figure 7-12.)
Click the Yes, Delete These Files and Data button.
The Plugins page refreshes, and the plugin you just deleted is gone from the lists of plugins, with a message displayed at the top confirming the deletion of the plugin.
Bang! You’re done. That’s all it takes.
The WordPress software was built on an existing platform called b2. Matt Mullenweg, co-founder of WordPress, was using b2 as a blogging platform at the time the developer of that program abandoned it. What did this mean for its users? It meant no more development unless someone somewhere picked up the ball and continued with the platform. Enter Mullenweg and WordPress.
Apply this same concept to plugin development, and you’ll understand that plugins sometimes fall by the wayside and drop off the face of the earth. Unless someone takes over when the original developer loses interest, future development of that plugin ceases. It’s important to understand that most plugins are developed in an open source environment, which means a few things for you, the end user:
I don’t want to make the world of WordPress plugins sound like gloom and doom, but I do think it’s very important for you to understand the dynamics in play. Consider this section to be food for thought.
18.118.193.232