Pressed for Time: First-time WordPress Installation & Customization in a Day

When the time came to create a personal blog – the one you’re looking at now – I decided it was finally time to try out the web’s most ubiquitous CMS, WordPress. Though I’ve been creating websites from scratch in PHP and MySQL for years, aside from a short stint with Joomla this was my first start-to-finish experience with a CMS.  My two burning questions coming into the project:

  • Is WordPress as easy to use as they say – not only the installation but also authoring and administration?
  • Is it customizable enough for someone used to coding everything from scratch?

I’ve documented my installation and early customization process – including any pitfalls encountered along the way, along with their solutions – in the hope that it’ll come in handy for anyone else debating whether WordPress is right for them.  I consider it a fair example of how far you can go in building and customizing a WordPress site in one or two work days.

The plan of attack:

  1. Install WordPress on a local server
  2. Install and set up a theme
  3. Test-post a first blog entry with featured image, category and tags
  4. Import previously written articles
  5. Add a contact form
  6. Customize the theme
  7. Install or create a plugin for star ratings
  8. Integrate Facebook and Twitter
  9. Migrate the local installation to a web server

Customizing a website obviously is a variable process, and choosing the right theme alone could take anywhere from a few minutes to several days. (In my own case it took trial and error customizing two different themes before settling on a third one that met my needs.) As such I’ve only documented time spent on code and customizations that made it to the final production site.

Enough talk, let’s get to installing…

Steps 1, 2 and 3:
WordPress Installation, Theme Installation and Test Post

Both the WordPress base installation and my first theme installation were as easy as promised. Making my first post was simple as well, amounting to filling in a few text fields and a WYSIWYG textarea. Only adding the post’s featured image took a second to figure out, the featured image link being inconspicuously located at the bottom right corner of the page.  Aside from that, the media library, image editing, and basic site-wide customizations like sidebar widgets and an “about” blurb were all self-explanatory stuff.  Cake.

Step 4:
Importing Content

With the foundation of my blog built, it was time to mass-import some content – in this case a stash of movie reviews I’d written for Flixster and Rotten Tomatoes. There are a plethora of WordPress plugins for importing data from different CMS and blogging systems, but when importing from plain text files, the free options appear limited to XML and comma-delimited CSV. Since the leading free option for XML import doesn’t support custom fields, I went instead with a CSV import plugin that does, WP Ultimate CSV Importer.

Importing my CSV file into WordPress was a quick and simple process – install plugin from dashboard, select CSV file to import, assign each CSV column to a WordPress field, done.

The one tricky part when importing posts lies with categories. If you don’t specify a category field when importing, each post is given the default category “Uncategorized”. And while you can assign categories in bulk via the WordPress dashboard, strangely you can’t bulk-remove them. Which means you’re stuck having that “Uncategorized” category in all your imported posts unless you remove – it one post at a time. To avoid this predicament just be sure to specify categories in your source file – adding an extra column if necessary – before importing.

With that done, my blog jumps from one post to 150. Now we’re talking.

Step 5:
Contact Form Setup

Since WordPress doesn’t have a contact form built in, adding one was a matter of installing another plugin. Contact Form 7 does nicely – it’s free and feature-filled yet simple to use. Once a contact form has been created, it can be inserted as a WordPress shortcode into any page or sidebar or footer widget.

Step 6:
Theme CSS Customization

Most of the really necessary tweaks to my theme were done easily enough in CSS, like hiding author attributions (since I’m the only author) and adjusting the layout of various page elements.

It’s highly recommended to avoid editing the source template files directly when making style changes.  Otherwise anytime the theme is updated all your edits will be history. Better to create a child theme and add an original style.css file there, that way you can make additions to the CSS without touching the original code.

Step 6 Part 2:
Theme Template Customization and Featured Images

Some customizations just can’t be done by CSS – you have to get in there and change the underlying HTML or PHP.  Again this can be accomplished with child themes.  Just copy the template files you want to modify from your source theme’s folder into the child template’s one and edit as necessary.  Even if the source theme is updated, your changes will remain intact.

In my own case, I used child theme templates to change my theme’s handling of featured images. I’d always assumed that featured images would be used as the post thumbnail on index pages as well as the nice large pics at the top of individual post pages.  Turns out this varies by theme – most themes will use the featured image as the post thumbnail, but many don’t show it on the post pages themselves.

To tweak my own theme to show featured images on post pages, I needed to copy the theme’s content-single.php file into my child theme’s folder, then insert the WordPress function the_post_thumbnail(‘large’) in my location of choice.  (This forum post explains the process nicely.)  Walla – nice big featured images.

Tweaking the index page template was a similar process – just copy the content.php file to the child theme folder and edit away.

Step 7:
Custom Fields and Custom Functions

As the majority of my imported articles were reviews, I wanted a way to show a star rating for the featured item in each post. None of the plugins I looked into would quite do the trick – some left duplicate meta tags any time I edited a post (sloppy), while others took too much time to enter and too much space to show. Which set the stage for my first custom WordPress function, one to display a “rating” custom field as a star image.

Adding custom fields in WordPress is easy – just fill in the name and value fields at the bottom of the edit post page. (You may have to click the “screen options” link at the top right of the screen to display them.) Accessing those custom fields from template files is almost equally simple – just include get_post_meta($post->ID, ‘rating’, true) in files like content.php and content-single.php to get, for example, the “rating” custom field.

More advanced custom fields processing, as well as other custom PHP scripting, can be added by creating a functions.php file in the child theme’s folder and putting any custom functions there. I added my own function to check if the rating field is specified and output the corresponding star image if so.

Step 8:
Social Network Integration

There are quite a few WordPress plugins that enable authors to broadcast posts to their Facebook and Twitter accounts, and several others that allow outside visitors to log in and comment on a WordPress site via their their own social network accounts. The Social plugin by Mailchimp not only does both of the above, it can even pull responses from Facebook and Twitter posts and show them as comments on the originating WordPress site.

As par for the course, installing and configuring the plugin was easy, though the CSS styling took a fair amount of tweaking.  A worthy investment for the functionality the plugin offers.

Step 9:
Migration to Web Server

The last major step was to migrate my local WordPress installation to an online server. The WordPress Codex’s guidelines for this are well-written as far as official documentation goes, but I found that an article at Smashing Magazine explains things a little more clearly.

When moving to a new server, be sure that the wp-content/uploads directory has the right file permissions for WordPress to write images to it.  If you want to install plugins and themes directly through the WordPress dashboard without using FTP, those directories will need to be writable as well. And using permalinks for pretty URLs will require some changes to the .htaccess file in the base WordPress directory; fortunately the WordPress dashboard provides the code to just copy and paste right in.

With all that done my first WordPress site – content imported, design customized and features added – was online and ready for consumption. With my first customized WordPress installation behind me, would I recommend it to others? The plain and simple answer: yes. The more accurate answer: it depends (but still mostly yes).

  • Non-developers and just get it out there types:
    For people who want a quick and easy way to get their content on the web, as well as the capacity to customize and expand that site without dealing with the nitty gritty details, it’s hard to go wrong with WordPress. Content creation and moderation is a snap, and more complicated tasks like changing themes or adding new plugin functionality are really not that complicated at all. I’d say the only part a beginner would likely have trouble with is the Unix file permissions (and that’s common to any CMS anyway). The rest should be smooth sailing.
  • Developers and tweak-till-it’s-perfect types:
    The field is more open here since the other CMS systems out there are accessible enough for developers, and many undoubtedly offer greater functionality. Still, between the template system, plugins, hooks and custom queries there’s a lot of room for customization in WordPress, and the time investment required to give it a whirl and see if it can handle the job isn’t very substantial.

Advice for First-Time WordPressers

Know Your Options

Specifically, the “Screen Options” tab at the top right of most dashboard pages. If some expected functionality seems to be strangely missing, it may well be tucked away up there.

You Must Choose (Your Theme), but Choose Wisely

Choosing a theme will likely be the biggest early decision in building a WordPress site. People who don’t intend to do much tweaking to the code can just find a theme that looks good and has useful features, and as long as it plays nice with any needed plugins should be good to go.

For people who tend to do lots of tweaking, though, as important as finding a theme that looks nice is finding one that sticks to WordPress standards and conventions. The first two themes I tried both looked great and had some nice features, but changes as basic as modifying the templates or just changing the site’s tagline became a hassle because they used their own particular methods. It’s enough to learn a new CMS without having to learn a different set of rules for a theme (especially when it may not be well supported).

A couple suggestions to avoid wasting time on a hard-to-customize theme:

  1. Play around with the default theme first
    It’s plain I know, but it does give a good idea of the core functionality to expect from other themes.
  2. Browse the documentation
    Having some knowledge of WordPress fundamentals will make it easier to know whether a theme sticks to them or not. Speaking of which…

Read Up

The WordPress basics are easy enough to understand without doing any research, but for people who plan to customize their site beyond the regular dashboard options, an early look through the following WordPress documentation will probably save some time in the long run.

Just Try It

Installing WordPress, switching themes and adding plugins is such a quick and easy process that in about the time it takes to debate whether WordPress is right for a project, you could just as easily install it and find out in practice.  Assuming the site isn’t live and there’s no unrecoverable data at stake, I suggest just installing away, adding themes and plugins at will to get a feel for the options and functionality available.  If the time comes to go through with a production site, creating a fresh install with only the necessary plugins and child themes intact is just a matter of minutes.

In my own early experience I’ve found WordPress earns its reputation as a simple yet flexible blogging platform, and to anyone with similar criteria for their web project I’d certainly recommend giving it a try.