Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WordPress Quick Start Guide

This article is marked as in need of editing. You can help Codex by editing it.

Get Set Up

The New To WordPress - Where to Start article accompanies this section, though it contains duplicate information and should be merged with this section.

Advantages of Self-Hosted WordPress Blogs

A self-hosted WordPress blog has a number of advantages over freely hosted blogs. With a self-hosted WordPress blog, you have complete control over your code, so you can implement any theme, modify it entirely, or create your own. You can add any plugin you want, and then hack the code. The application's code is completely open, allowing you total access to modify, tweak, or explore what you want.

There's much in store for the non-professional and non-technical blogger also, whose writing will revolve around casual and professional blogging without bothering about details how the website functions.

WordPress has a large community of enthusiastic bloggers who help each other in forums, create and share themes and plugins, and help move the software forward with new features and better design. With such freedom, what you can do with a WordPress blog can be a bit overwhelming. The WordPress Codex (the wiki manual for WordPress) has hundreds of pages and can be daunting in scope.

The intent of this WordPress Quick Start Guide is to get you up and running with WordPress and give you a brief overview of the most important concepts and techniques. It covers the most common setup tasks you need to technically launch, configure, and manage your blog. It then lays down some concepts for more advanced theme modification.

Note: WordPress.org differs from WordPress.com in a fundamental way. WordPress.org provides WordPress software that you can download and install on the server space you rent from a web host. In contrast, WordPress.com provides free hosting for your WordPress.com blog, but restricts the themes and plugins you can implement. With WordPress.com, you have to pay extra to modify your stylesheet, and you can't display ads or manipulate any of the code. All the media you store on a WordPress.com blog by uploading is saved on WordPress's servers, so you're not in full control here either. (For more information on the difference, see WordPress.com Versus WordPress.org.) Everything in this guide relates to self-hosted WordPress blogs.

Become Familiar with FTP

One tool you'll need to manage your WordPress files is an FTP program, such as Filezilla. Through FTP, you'll upload themes and plugins to your blog. If your web host doesn't provide any auto-installers, you'll need an FTP program to install your blog.

Filezilla is a simple program. All it requires is your web address, username, and password to connect to your web host. When you connect, the remote host's files appear in the right column, while your local files appear in the left column. You transfer files or folder from your local host to the remote host by dragging the files to the remote host column. After you enter your FTP details once, use drop-down arrow next to the Quick Connect button to connect immediately.

FTP programs like Filezilla can support you further. Through them, you can upload files in bulk. To show them up in your media library though, you'll need plugins, like the plugin called [dd32.id.au/wordpress-plugins/add-from-server/ Add From Server].

More Information:

Install WordPress on Your Web Host

You need a web host that has PHP and MySQL. To make the installation of WordPress as simple as possible, make sure your web host has cPanel (or something similar). In my experience, BlueHost probably has the best support of any web host, and it has the easiest auto-installer: Simple Scripts. After you sign up with a web host, navigate to the cPanel (or the equivalent) and look for Simple Scripts, Fantastico, or some other auto-installer for WordPress. If there isn't an auto-installer, you have to install WordPress manually following the "famous 5 minute install" instructions, which are fairly simple. See the resources below for instructions on the different installation methods.

To install WordPress on a Web host:

  1. Sign up for a web host plan (for example, at BlueHost.com).
  2. Log into your cPanel by going to http://yourdomain.com/cpanel.
  3. Click the Simple Scripts feature (or, alternatively, the Fantastico feature).
  4. If no auto-installer exists, follow the steps for the 5 minute manual install.
  5. Install a WordPress blog.

Directories of Files Uploaded

The WordPress installation arranges files in three main folders (wp-admin, wp-content, and wp-includes). It also installs loose files in the root folder. Most of the time, when you work with your WordPress files through FTP, you'll be uploading content to the wp-content folder.

Note:When you connect to your remote host, you may have to go into the public_html or www folder to see the WordPress files. Both folders open the door to your WordPress content. The folders simply mirror each other to deliver the same results when users go to either http://www.yourdomain.com or http://yourdomain.com.

The wp-content folder has two important subfolders: plugins and themes. When you upload a plugin or theme to these folders using FTP, the plugin or theme is available for activation inside your WordPress admin panel. Also, any images you upload when writing a post in WordPress are stored in the wp-content/uploads folder.

More Information:

Explore Your New WordPress Blog

Once you have WordPress installed, you should spend some time exploring it. To log in to your newly installed blog, go to http://yourblogdomain.com/wp-admin and enter the username and password you used when you set up the site.

After logging in, you'll see the admin panel that you use to write posts and modify your blog. Tour the admin panel. The Admin panel provides four main tabs at the top and three smaller tabs on the far right, described as follows:

  • Write tab: write posts and pages.
  • Manage tab: edit posts, pages, categories, tags, your blogroll, and more.
  • Design tab: change your theme, configure your sidebar, and see the code of your theme's files.
  • Comments tab: see the latest comments on your site.

Explore these main tabs and subtabs to see the different functions they perform.

More Information:

Configure General Settings

You need to configure some basic settings in your blog, such as the title, tagline, time zone, and your name. Click the Settings tab on the far right, and then browse through the available subtabs -- General, Writing, Reading, Discussion, Privacy, Permalinks, and Miscellaneous. Select the options you want.

As you're configuring your settings, be sure to enable permalinks and allow comments without moderation. Permalinks make your URLs intelligible names that reflect the title of your post, rather than something like ?p=123. Comments also need configuration. By default, comments must be approved before they appear on your site.

To configure your settings, at the very least do the following:

  1. Enable permalinks by going to Settings > Permalinks. Select the Day and Name option (if you select another option, it's more difficult to set your page URLs).
  2. Enable comments to appear immediately by going to Settings > Discussion. In the "Before a comment appears" section, select only the Comment author must fill out name and e-mail check box.
  3. Set the blog title and tagline by going to Settings > General. Usually the blog title and tagline automatically appear in your blog's header.
  4. Set the correct time zone by going to Settings > General and selecting the appropriate UTC number in the Timezone section.

More Information:

Import Your Content from Blogger or Elsewhere

If you're transitioning to WordPress from another blog platform, you can import your old content. Go to Manage > Import and select the specific software you're importing from. Almost all blogs can be imported into WordPress. However, when you import content from another site, only the posts, categories, and tags import, not any pictures.

More Information:

Create Content

Write a Post

Posts are the regular blog entries you write that appear on your home page. You write posts by clicking the Write tab. By default, the Posts subtab is selected. Complete the fields and information, select or create a category, and then click the Publish button. Writing posts is the most common activity you'll do in the admin panel. When you write blog posts, keep your paragraphs short, use subheadings, include images, and avoid a stuffy tone. To insert a "Read more ..." tag, click the Read More button on the toolbar.

More Information:

Create a Page

Pages are for content such as "About Me," "Contact Me," etc. Pages live outside of the normal blog chronology, aren't included in your RSS feed. They're often used to present information about yourself or your site that is somehow timeless -- information that is always applicable. You can use Pages to organize and manage any amount of content. Other examples of common pages include Copyright, Legal Information, Reprint Permissions, Company Information, and Accessibility Statement. (By the way, it's a good idea to always have an About page and a Contact page -- see this advice from Lorelle.)

More Information:

Make Categories for Your Posts

Categories help make sense of the hundreds of posts you'll be writing. By assigning the posts into different categories, you can allow readers to browse archives of only that category. To create a category, click the +Add New Category link in the Categories section below the post you're writing. You can select multiple categories for the same posts. To manage your categories, go to Manage > Categories.

Additionally, through categories, you can manipulate your posts in advanced ways, such as excluding certain categories from your home page, or specifying where certain categories should appear. This is a common technique for magazine-style layouts, where you have different sections on the home page and you want posts from those categories to always appear in those sections.

You can also give each category its own unique layout and design. For example, if you copy the content of your archive.php file, rename it to category-24.php (or whatever the category ID is), and then modify the file (such as removing the sidebar, or changing the header), the archives for that category will use the category-24.php file rather than archive.php file.

More Information:

Add Tags to Your Posts

Tags are like micro-categories or index keywords for your posts. Your site should probably only have 7-12 categories, but you can have hundreds of tags. Clicking a tag name below your post will show all posts with the same tag, helping readers find similar content (most readers arrive at your site through searches for a specific topic). You add tags to your posts by typing the tag names in the Tags section below the post. You can also manage your tags by going to Manage > Tags.

If tags are enabled in your theme, you will usually see them below the published post. If not, you can add a php tag to make it appear. (Because tagging is new with WordPress 2.3, many themes don't have the Tag template tag added by default.) If you go to Design > Theme Editor and click the single.php file, you'll see the code that generates your posts. Add <?php the_tags(); ?> to this file where you want the tags to appear (usually after the <?php the_content ?> tag, which generates your post content).

More Information:

Edit a Page or Post

One of the neat things about WordPress is that you can edit any post or page by clicking the Edit link that usually appears at the bottom or top of each page. You can also edit your posts and pages from the Manage tab, but sometimes it's easier to just navigate to the content you want to edit and click Edit.

To edit a page or post:

  1. First log in to your site by going to http://yourdomain/wp-admin.
  2. Click the Visit Site button at the top of the page to return to your site.
  3. Navigate to the page or post you want to edit.
  4. Click the Edit link that appears on the page or post.
  5. Make your changes, and then click Save.

If the Edit link doesn't appear, it's because your theme designer has omitted it from the code. You can add it by going to Design > Theme Editor. Click the single.php file, and then add the following code after the <?php the_content(); ?> tag:

<?php edit_post_link('Edit', '', ' | '); ?> 

Now when you view a post, an Edit link appears at the bottom, after the content. If you log out, the Edit link is hidden.

More Information:

Style Your Site

Change Your Theme

WordPress allows you to apply any theme to your blog. All themes include a CSS stylesheet that defines the design and layout (the colors, arrangement, and shape) of your site. In WordPress, the content is completely separate from the format, so you can change themes at any time without having to alter your content.

In the past, WordPress attempted to create a central theme repository called the WordPress Theme Viewer. However, due to numerous issues with the repository, themes for WordPress are now scattered all across the web. Weblogtoolscollection often features newly released themes. The footer of most blogs identifies the theme the user has applied. You can search for "WordPress themes" and find a good variety of them. You can also buy a well-designed theme usually for $100 or less (search for "designer WordPress themes" or "premium WordPress themes"). In general, when choosing a theme, find one that's simple and focuses your eye on your the content. You can always change it when you get tired of it.

To apply a new theme to your site:

  1. Download the theme to your computer.
  2. Right-click the zipped file and unzip it using a tool such as 7-zip or Winzip.
  3. Open your FTP program (such as Filezilla), connect to your web host, and upload the entire theme folder to wp-content/themes.
  4. Log in to your blog's admin panel and go to Manage > Themes. The theme you uploaded should appear there.
  5. Select the theme. Now check out how it looks on your site.

After selecting a new theme, you may need to configure the sidebar, page navigation, and header. Always make sure it looks good in both Firefox and IE. If you have a question about a theme, try visiting the author's site first. If that doesn't work, go to the theme section of the WordPress forum.

More Information:

Modify Your Sidebar

Themes usually have at least 1 or 2 sidebars. Sidebars are the narrow columns to the left or right of your blog posts. Each section in the sidebar is known as a "widget" that you can move up or down. Sidebars commonly list your pages, contact information, top posts, RSS feed, some about text, links, and ads.

To configure your sidebar:

  1. Go to Design > Widgets. The Widgets subtab has two columns: Available Widgets and Current Widgets.
  2. In the Current Widgets section, select the sidebar you want to configure, and then click the Add button next to a widget in the Available Widgets column. The widget is added to your current widgets.
  3. Click the Edit link on the widget to set any additional details, such as the title and number of items displayed. Most of the widgets are self-explanatory, except for the RSS widget. The RSS widget doesn't display your RSS feed, but rather allows you to display the latest items from an RSS feed somewhere else.
  4. In the Current Widgets section, drag and drop the widgets into the order you want.
  5. Click the Save button.
  6. Select another sidebar, if your theme has one, and configure the widgets for that sidebar as well.

More Information:

Customize Your Header Image or Background

One of the most common ways you'll want to customize your theme is by changing the banner image. Exactly how you do this depends on the theme you're using. But in general, here's how you alter the banner image:

  1. Find out the exact size of the banner image. In your theme's folder, the banner image is usually stored in an images or img subfolder.
  2. Note the name, file type, and dimensions of the file.
  3. Using a graphics program such as Photoshop or SnagIt, create your custom replacement image with the exact same dimensions and save it as the same file type and name.
  4. Use FTP to upload the new image file to the same folder where the original banner image is stored (usually wp-content/themes/themename/images).
  5. When prompted, select to overwrite the original.
  6. Refresh your blog's page to view the new image.

Alternatively, you can keep the original file, but just change the file name in the stylesheet.

The header style in your stylesheet may look like this:

#header {
  background: url("<?php bloginfo('stylesheet_directory'); ?>/images/wc_header.jpg") 
  no-repeat bottom center; }

By changing the background attribute (wc_header.jpg), you can change the header image/background.

Sometimes the header doesn't have an image at all, but instead uses a background color. To change the background color:

  1. Go to Design > Theme Editor.
  2. Click the Header file. See what styles are defining the header section. Alternatively, use a tool like the Firefox Web Developer Extension to see what styles are defining the header.
  3. Click the Stylesheet file (within Design > Theme Editor).
  4. Update the header style you noted in step 2 with the attributes you want.

More Information:

Configure How Your Pages Appear

Different themes show pages in different ways. Themes that have buttons or tabs at the top sometimes populate those buttons/tabs with your pages automatically. Other themes generate your list of pages in the sidebar. Other themes require you to manually type the page URLs.

You should know several things about the ordering of pages. If a list of pages (that you created) automatically appear on your site, you can change their order through the Page Order field that appears below the page.

To change the page order:

  1. Go to Manage > Pages.
  2. Click the page you want.
  3. In the Page Order section below the page, set the page order by typing 1, 2, 3, and so on. A page with an order of 1 appears before a page with an order of 2.
  4. Click Save.

Tip: If you're listing your pages in your sidebar, the Pages widget has an Edit link that allows you to define the way the pages are sorted and what pages are excluded.

Note: If you have a theme with 5 tabs across the top (coded to automatically fill these tabs with your pages), yet you have 10 pages, you'll either want to manually code the links in your header.php file (available by going to Design > Theme Editor), or modify the arguments in the wp_list_pages tag to exclude pages you don't want to appear in your header. The Pages sidebar widget provides easy fields to note exclusions. But if your theme has a navigation or tab bar, editing the pages is trickier. The list of pages is automatically generated in your code through the <?php wp_list_pages('arguments'); ?> tag. You can modify the "arguments" text with different parameters that define how you want your pages to appear. For example, you can include or exclude pages from the list, include child pages, define their sort order, and so on. See the instructions about the wp_list_pages template tag for more information.

More Information:

Make It Easy to Subscribe to Your RSS Feed

One of the most important features of your site is your RSS feed, which subscribers will use to add you to their feedreaders. All WordPress blogs have RSS feeds by default, and even categories and specific posts have RSS feeds. You can see your feed by adding /feed after your domain. For example, if http://idratherbewriting.com is my domain, then http://idratherbewriting.com/feed is my RSS feed.

However, unless you redirect your feed through Feedburner, it's hard to know how many people are subscribed to your blog. You may have seen little chiclets on blogs showing how many people are subscribed. This is a Feedburner chiclet that you can easily insert on your site.

To direct your feed through Feedburner and add a subscriber chiclet on your site:

  1. Find your RSS feed by adding /feed to the end of your URL.
  2. Go to Feedburner.com and sign up for an account.
  3. In the main field on the Feedburner home page, below the text "Start Feedburning Now," type your site's RSS feed. If you plan to include podcasts, select the I am a podcaster check box. (By the way, using Feedburner for your podcast feed will automatically include the necessary iTunes specifications.)
  4. Title your feed, select the feed name you want, and then click Activate Feed.
  5. Click Next and set other options as needed.
  6. If desired, download the Feedburner Feedsmith plugin. Unzip the file and use FTP to upload it to your wp-content/plugins folder. Then click your Plugins tab and activate the plugin.
  7. In Feedburner, click the Publicize tab. Then do the following:
    • To get code for your RSS button, click the Chiclet Chooser subtab.
    • To get code for an email subscription form, click the Email subscriptions subtab.
    • To get code for the reader count chiclet, click the Feedcount subtab.
  8. Return to your blog, and go to Design > Widgets.
  9. Add a text widget to your sidebar and insert the desired code (RSS, Email, or Feedcount) to display this feature.

Note: If you don't use the Feedburner Feedsmith plugin, readers may still be able to subscribe to your blog's default feed rather than the redirected Feedburner feed. When Firefox and IE sense an RSS feed on a site, they display an orange RSS button to the right of the web address field. If readers click this button, it shows the site's default feed rather than the Feedburner feed. You can change the feed that appears in the web address field by editing the feed listed in your site's header file.

To change the feed in your header:

  1. Go to Design > Theme Editor.
  2. Click the Header file.
  3. Replace the auto-generated feed with your specific Feedburner feed, and then save it.

For example, a line in your header that specifies the feed looks something like this:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

The <?php bloginfo('rss2_url'); ?> automatically populates with your feed. Swap your Feedburner feed in there instead. For example:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="http://feeds.feedburner.com/tomjohnson" />

More Information:

Add More Functionality

Install a Plugin

WordPress plugins are scripts you install to extend the functionality of your blog. For example, one common plugin is Subscribe to Comments Reloaded. When added, it allows readers to receive notification of follow-up comments for posts they've commented on. WordPress doesn’t ship with this feature already included — you must install it via a plugin.

WordPress's philosophy is to keep the core light and simple. And then allow people to add, in a cafeteria style, the plugins they need for the functionality they want. The process of discovering new plugins — and suddenly transforming your blog into something more — can be exciting.

You install a plugin in the same way you install a theme, except you upload it to wp-content/plugins rather than wp-content/themes. However, in contrast to themes, you can update plugins directly from within WordPress (when the plugin author has updates). This is because plugins are centralized in a WordPress plugin repository that your WordPress software hooks into.

To install a plugin:

  1. Go to WordPress plugin repository.
  2. Browse for the plugin you wan to install, such as the Subscribe to Comments Reloaded plugin.
  3. Click the Download button and download the file.
  4. If the file is zipped, unzip it using a tool such as 7-zip or Winzip.
  5. Look for a readme.txt file included with the plugin to see if it has special installation instructions.
  6. Open your FTP program (such as Filezilla), and upload the plugin to wp-content/plugins.
  7. Log in to your blog's admin panel and click the Plugins tab on the far right.
  8. Click Activate next to your plugin.
  9. Configure the specific plugin settings as described in the readme.txt file, and then save it. Usually the plugin has a subtab available when you click the Settings tab on the far right. You can then define options you want for the plugin. If the plugin is a widget, go to Design > Widgets and add the widget to your sidebar.

More Information:

Activate Akismet to Stop Spam

Spam robots will flood your posts with spam unless you take some protections and activate Akismet. WordPress includes Akismet by default, but you have to first activate the plugin and then enter an API key.

To activate the Akismet plugin:

  1. Click the Plugins tab.
  2. Click Activate next to Akismet.

After you do this, you'll see a link that prompts you to enter your WordPress.com API key. Here's where it gets a little bizarre. You have to sign up for a WordPress.com account before you can get a WordPress.com API key, even though your blog has nothing else to do with WordPress.com.

To get an API key:

  1. Open a new browser tab and go to http://wordpress.com.
  2. Click the Sign Up Now button.
  3. Complete the fields.
  4. In the option button at the bottom, select "Just a Username, please", rather than "Gimme a Blog."
  5. Click the Next button.
  6. Verify the email WordPress.com sends by confirming it in your email inbox.
  7. Log in to your WordPress.com account by entering the username and password you set up.
  8. From the My Account drop-down in the upper-left corner, select Edit Profile.
  9. Copy the API key that appears right below the header in the intro text. It's a number like 69368a463006.
  10. Return to the admin panel of your blog.
  11. Click the enter your WordPress.com API key link that appears in yellow highlighting near the top of the page.
  12. Paste the key in the field, and then click Update Options. If the key is accepted, the prompt to enter your API key disappears and Akismet is activated.

You can see how much spam Akismet stops by going to Comments > Akismet Spam. It's a good idea to periodically check the spam to make sure no legitimate comments land in there. If your blog is brand new, you may not get much comment spam. But the more hits your blog gets, the more comment spam it attracts.

Some people make the mistake of requiring users to log in to comment, or they moderate all comments before they appear. In general, it's easier to delete the occasional comment spam than to approve each comment.

More Information:

Create a Regular Database Backup

Every post and page you write in WordPress is stored in a MySQL database. There aren't separate files for each page or post. It's important to regularly back up your database in case something goes wrong (such as with a rogue plugin or a misguided upgrade attempt). You can manually back up your database by using a tool like phpmyadmin, but it's much easier to simply use the WordPress Database Backup plugin.

To create a regular database backup schedule:

  1. Download and install the WordPress Database Backup plugin.
  2. In your blog's admin panel, go to Manage > Backup.
  3. In the Backup Options section, select Email backup to and then enter your email address.
  4. In the Scheduled Backup section, select Once Weekly.
  5. Select any tables you want to include. These tables refer to data from any plugins you've added, not to your posts and comments.
  6. Click the Submit button at the bottom.

Each week, you'll receive an email with your database. The database is light and won't take up much space in your email program. If your site ever crashes, you can restore your entire site's posts, pages, categories, and tags (but not images) through the database file. Images are stored in wp-content/uploads folder

More Information:

Include a Contact Form

Readers should be able to contact you in two ways: (1) by leaving a comment under a post, and (2) by contacting you through an email address or contact form. Several plugins provide immediate contact forms you can implement on your site. This way when a literary agent contacts you for a book deal, or a conference organizer wants to ask you to deliver the keynote, the person can actually contact you.

Two contact forms you can use are as follows:

The first contact form is more robust than the second. Both work well. To implement either contact form:

  1. Upload and then activate the plugin.
  2. Go to the Settings tab, and then look for the contact form's subtab to configure the settings.
  3. Go to Write > Page and create a new page.
  4. Include the contact form's special code on the page, as per the contact form plugin's instructions.
  5. Add the page's link where you want it to appear on your site.

Install Other Needed Plugins

WordPress has hundreds of cool plugins that add functionality to your blog. The following list includes my favorites. Note: Every plugin serves a different purpose, so these plugins may not meet your needs. For example, you may have a community site and need a way to include a robust calendar, group authoring, and password protection, but I haven't listed them here. There are plugins for almost everything you can imagine. The following list is by no means exhaustive.

  • Subscribe to Comments Reloaded. Allows people who comment on your blog to be notified of follow-up comments. (Without this plugin, people have to just keep checking back to see if you've responded to their comment.)
  • WordPress Automatic Upgrade. Allows you to upgrade your site using an easy-to-follow on-screen wizard rather than having to manually upload and overwrite certain files when you upgrade WordPress.
  • Twitter Tools. Adds your latest tweets from Twitter onto the sidebar. Not using Twitter yet? Check out [1]. Twitter can help you build community and let readers know when you have new content.
  • Better Comments Manager. Allows you to see and respond to all your site's comments in one easy interface.
  • One Pixel Out Audio Player. A Flash player that plays MP3 audio files in your posts. This audio player simply works, and I've never had compatibility issues with it when WordPress comes out with a new version.
  • Full Text Feed. Makes your entire post appear in people's feedreaders, even if you split your post with a Read More tag.
  • Kimili Flash Embed. Allows you to embed .swf files into your posts, which is crucial if you plan to do screencasts using a tool such as Camtasia or Captivate.
  • Popularity Contest. Pulls together the top 10 most popular posts on your site. You can configure how the popularity is determined, such as by number of comments, hits, or trackbacks.
  • WordPress Video Plugin. Allows you to embed videos from almost every video client imaginable directly into your posts.
  • Google Ajax Search. Integrates an Ajax-enabled Google search into your blog. With the Ajax technology, you don't have to leave the page to see the search results.
  • Simple Recent Comments. Displays comments from recent visitors in a way that is styled differently from the default Recent Comments widget.
  • WordPress Reports. Shows reports from both Google Analytics and Feedburner directly in your blog's admin panel.
  • Google Analytics for WordPress. The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin. You must sign up for a Google Analytics account at http://google.com/analytics.
  • Google Sitemap Generator. Generates a sitemap of your entire site, making it more searchable by Google.

Understand the Code More

Understand A Little Bit About Template Tags (PHP)

As you explore the code in your theme's files (Design > Theme Editor), you'll see that the code consists of XHTML and PHP tags. PHP is the scripting language that WordPress uses to pull information from the database, where your blog's data is stored. WordPress uses different PHP tags to call different types of information from the database. When the user clicks on a page that has a PHP tag, WordPress dynamically calls the data from the database and displays it.

PHP tags begin with a <?php and end with a ?>. The text between this tag is the function. For example, the following PHP tag shows all your categories, but with a specific parameter to exclude categories 10, 11, and 12:

<?php wp_list_cats('exclude=10,11,12'); ?>

WordPress has many different template tags similar to wp_list_cats. You can view all the different template tags here. Each tag calls different information and allows you to pass different parameters in the parentheses (). Read up on a tag to see exactly what it calls and how it's used.

More Information:

Modify Your Theme's Appearance

Your blog's style -- the colors, the fonts, the widths, and so on -- is mainly styled by your theme's stylesheet. To make adjustments to your blog's style, go to Design > Theme Editor, click the stylesheet file, and make changes. Since themes are individually created by a wide variety of people, stylesheets from one theme to the next all look a bit different (but all conform to CSS standards). The theme designers create styles to define different sections, but one designer's style names may vary with that of another designer's names. Additionally, some use CSS shorthand and compress the info into a small space, while others break out each of the selector's attributes onto a different line.

To find the name of a style, you can use Firefox Web Developer extension to identify the CSS of a specific element, and then go into your stylesheet to modify that element. The more familiar you are with CSS, the easier it will be to modify the styles. See W3schools' tutorial on CSS for a good foundation.

Understand Your Theme's Files

Each theme has a collection of files with names like index.php, archive.php, single.php, and so on. WordPress dynamically pulls together these files based on what the user clicks. For example, if the user clicks your blog's home page, the home.php or index.php file is used (WordPress first looks for home.php first; if no home.php exists, it looks for index.php).

Additionally, the home.php or index.php file includes several other files, namely header.php, footer.php, and sidebar.php. While the files exist separately, they are pulled into one file through include statements in the home.php or index.php file. If you remove the <?php get_sidebar(); ?> include tag from your index.php file, the sidebar won't show anymore.

It's important to know which user queries call which templates. The following are the theme templates used when a user clicks something on your blog:

  • If a user clicks your blog's home page, the home.php file is used. If the home.php file doesn't exist, index.php is called.
  • If a user clicks a post title, single.php file is used.
  • If a user clicks a category archive, WordPress first looks to see if any category archive templates are available for that category (e.g., category-25.php, where 25 is the ID number of the category). If no category template is available, archive.php is used.
  • If a user clicks a page, the page.php template is used. (If you've created a unique page template, you can select it from the Page Template section when writing the page. WordPress will then use that specific page template for that page.)
  • If a user clicks a tag, the tag.php template is used.
  • If there's a bad link and the database returns an error, the 404.php template is used.
  • If an author name is clicked, the author.php template is used.
  • If a user searches for something, the results are displayed on the search.php page.

Some themes have more template files than others. When a template file is absent or simply not used, usually the index.php file substitutes. Also, sometimes the index.php has some conditional statements that show different code based on different queries, so your blog may actually have different views for the home page versus a single post, but the differences are defined within the same file through conditional statements.

More Information:

Recognize the Loop

As you explore the code, one thing you should learn to recognize is "the Loop." The Loop is a section of PHP code that tells WordPress to display the latest posts from the database on your blog. It's an important piece of code because the appearance of each post on your blog is controlled by what's inside the Loop.

For example, on many blogs, there's no byline because the blog is written by a single author. But on group blogs, you need an author byline beneath each post, something that says By Tom Johnson, or whoever the post author is. Yet the author tag won't appear in every post if it's not included inside the Loop. To show the author tag on every post, you have to add <?php the_author(); ?> inside the Loop.

To see the loop, go to Design > Theme Editor and open the single.php file or index.php file. The Loop begins with this code:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

And then usually some template tags come after this line, so that your post title, post content, the time, and comments appear. You would add the author tag somewhere between the start and end of the Loop, depending on where you want the author byline displayed. The end of the Loop is identified by this code:

<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

You may also want to alter the way the other post content appears. So it's good to be aware of the Loop.

Additionally, if you're playing around with the code and you alter the Loop's start or end tags, your content won't display at all (and you'll probably start hyperventilating). If you recognize the Loop, you can easily fix the code.

Finally, some plugins will require that you add a certain line of code "inside the Loop." When that's the case, you open up your index.php, archive.php, or single.php file or any other file that has the loop, and insert the code between the starting or ending point of the Loop.

More Information:

Learn How to Upgrade Your Blog Software

Unlike with commercial software, upgrading WordPress currently requires you to manually replace most of your old files with the latest release. Major upgrades are released at least three times a year, with minor upgrades released more frequently. When it's time to upgrade your blog, you'll see a note in your admin panel prompting you to upgrade to the latest version.

You can upgrade your files manually, which includes backing up your database, overwriting most (but not all) of your WordPress files, and going to an upgrade file to run an upgrade script. However, a much easier way to upgrade your software is through the WordPress Automatic Upgrade plugin. This plugin automates most of the upgrade steps through an on-screen wizard. (If you use the WordPress Automatic Upgrade plugin, choose the manual mode rather than the automatic mode.) Eventually the WordPress core will offer one-click upgrades rather than requiring this tedious upgrade process.

Upgrading plugins is much easier because WordPress hooks into the plugin's code. To upgrade your plugins, go to the Plugins tab and click the Upgrade Automatically link that appears as a note above plugins that have available updates.

More Information:

Learn How to Get Help

One thing to remember with WordPress is that it's an open source project, with many people from different backgrounds and countries contributing themes, plugins, and other code. As such, sometimes the plugins and themes break, or are incompatible, or have other issues. At some point, you may need help with WordPress, either because your theme doesn't look right, or because a plugin is causing an error. If you need help, use the following resources:

  • WordPress Codex. This is the core wiki manual where you'll find most information related to WordPress. The Codex is a bit daunting in scope, some of the information is outdated, and it's not always explained with the graphics and clarity of commercial applications. Still, it's a powerful resource. This is where you can really expand your knowledge of WordPress.
  • WordPress Support Forums You can pose questions and hope that forum volunteers help you. The forums also contain a rich repository of questions already answered. Unfortunately, the forums don't offer email notification for follow-up responses. You can check responses to your questions by clicking the View Your Profile link in the upper-right (or by subscribing to the RSS feed of your question). Searching the forums is an excellent way to find answers to your questions.

Note: One must-know tip is how to search both the forums and Codex. Rather than using the built-in search feature, do a site-search using Google. Go to Google.com and type something like site:wordpress.org upgrading wordpress. You'll find that searching through Google yields much better results than using the built-in search features in the Codex or forums.

More Information: