Wordpress is my favorite blogging platform, and until fairly recently that’s all I thought it was, but these days I build entire websites using the Wordpress platform. Whether it’s a simple static brochure site, a ’sales letter’ product site, a review sites or anything else, Wordpress is so versitile that it can be used for just about anything. There are many advantages to using Wordpress over a more traditional approach to creating sites – it’s easy to setup, even for non-techies, you can maintain your site from anywhere, it’s great for SEO and best of all it’s free!
Since Wordpress is a blogging platform, there are a few tweaks that need to be made if we’re going to build successful sites with it. Here is my method, step by step, for creating great looking, effective sites that are suitable for your Internet Marketing business.
Using Wordpress as a CMS
Download and install Wordpress
OK so this step is pretty simple. Head over to Wordpress.org and download the latest version. Once you’ve done that, unzip it create a database on your server. If you have a web control panel (like cPanel or DirectAdmin) then create a new MySQL database and jot down the details, if not don’t worry just ask your hosting company for one and they should email you with some login details and a database name.
Next you’ll need to edit the file wp-config-sample.php with details of your database. Use Nvu or Notepad (or similar) and edit the following lines:
define('DB_NAME', 'Your database name goes here');
define('DB_USER', 'Your usernamename goes here');
define('DB_PASSWORD', 'Your password goes here');
You should also change the line:
define('SECRET_KEY', 'Type anything you want here');
Everything else should remain the same, although if for any reason you have a problem check with your host that the DB_HOST should be set to localhost (Will be correct 99% of the time!). Save this file as wp-config.php
Once you’re done, upload the whole lot to your server (the root directory, assuming you’re using Wordpress for the entire site). Now you need to run the installation script so point your browser at yourdomain.com/wp-admin/wp-install.php
You’ll see the Wordpress welcome screen which will prompt you for your Blog Title (title of your site) and an email address. Fill these out and click Install Wordpress.
Next you’ll see a success screen telling you that Wordpress has been installed. It will give you your default username, admin, and a temporary password. Write the password down carefully, or copy it to the clipboard (it is a randomly generated password and without it you can’t login!) then go to yourdomain.com/wp-admin (this is the URL you’ll use every time you want to maintain your new site) and login with these details. Now before you do anything else, click on admin and change your password!
Make files and directories writeable
In order to make updating your site as simple as possible, you’ll want the ability to upload images and make changes right from within the control panel. In order to do this, certain files and folders on your server need to be given the right permissions. Fire up your favourite FTP client (I use AceFTP) and connect to your site. Next make .htaccess and /wp-content/uploads writeable by giving them a CHMOD value of 755 (in AceFTP right click and select properties). Do not set 777 as this is a potential security risk. This allows Wordpress to make necessary changes to these files. If you want to use the theme editor in Wordpress then set the same permission to your theme directory (/wp-content/themes).
Note 1: Depending on your server configuration, 755 may not be enough to allow Wordpress to write. While the Wordpress documentation suggests CHMODing to 777, I would suggest otherwise as it is a potential security risk, basically allowing anyone to upload anything to your server. You would be much safer uploading changes manually via FTP
Note 2: By default, many FTP clients have .htaccess as a hidden file and you may need to allow hidden files from properties before you can see and edit it!
SEO friendly URLs
Wordpress is great for SEO, but it needs a little tweak. Login to your admin control panel and select settings from the top menu, then click on permalinks. By default, URLs on your site will have the format:
http://www.yourdomain.com/?p=123
but what would be much better for SEO purposes would be:
http://www.yourdomain.com/category/postname
so that’s what we’ll do. Select custom structure and in the box enter /%category%/%postname%/ then click Save Changes. If you set the permissions of your .htaccess file above OK you’re all done, if not you need to copy the code which you’ll see at the bottom of the page into .htaccess and upload it. Now your URLs will be much better looking, and include your keywords!
Static front page, with separate blog
As a blogging platform, the index page (homepage) of your site will, by default, display the most recent posts in reverse chronological order. If we’re not running the entire site as a blog we want more control than that so here’s what to do…
First, create a new page (in the control panel go New > Page) as opposed to a post, call it Home and enter whatever information you want (text, images, links, whatever…) and create another new page called blog (or news). Now go to Settings > Reading and change the settings for Front page displays. Select static page, and set the front page to the new home page you just created, and posts page to the new blog page. What you now have is a homepage which you can have total control over, and a news/blog section which shows all your latest posts on the new blog page!
Conditional tags (advanced users only!)
If you don’t mind getting your hands dirty with a little PHP coding there’s one more very useful feature of Wordpress which I want to mention – conditionals. These are really useful when you’re working on a dynamic theme as they allow you to control what content is displayed on different pages. For example, you might not want a title on your homepage (so instead of ‘Home’ you can set it to whatever you want in the HTML instead) or you might want all pages in a specific category to have a submenu.
Here’s an example of how to use them. To display a different <title> tag based on which page is currently being displayed try this:
<title>
<?php
if (is_home()) {
echo bloginfo('name');
} elseif (is_404()) {
echo 'Error - 404 Not Found';
} elseif (is_category()) {
echo 'Category:'; wp_title('');
} elseif (is_search()) {
echo 'Search results';
} elseif ( is_day() || is_month() || is_year() ) {
echo 'Archives:'; wp_title('');
} else {
echo wp_title('');
}
?>
</title>
As you can see conditionals like is_home() and is_category(’reviews’) can be very useful in making your site more dynamic. If you’re not at all familiar with PHP or coding, or the above code scares you don’t worry – just ignore it, but in the back of your mind remember that Wordpress allows you to change content based on page type. That way if you get someone else to modify your theme you can ask them to do it for you!
So there we go, in no time at all we have a complete site based on the Wordpress platform. Of course, there are loads more features and tweaks but this is a great start. Tomorrow I’ll go through some of the best plugins for an Internet Marketer so you can really get the most out of your Wordpress site.