Serious Simplicity

Richard’s blog on entrepreneurship, creativity and simplicity.

Using WordPress to Build Small Websites: Step by Step Tutorial

with 13 comments

Recently I found myself - for one reason or another - having to build a number of small websites. The kind that have a home page, an “About” section, a “Products” (or services) section, a Contact page and a blog/news page.

A big requirement in building these sites was that it didn’t take too much time and that post-launch, the sites would be editable by somebody who’s not me. Enter WordPress.

I decided to try my hand at using WordPress as a Content Management System (CMS). It worked wonderfully and, being a process freak, I took notes which I’m now sharing here. So, here’s how to quickly build a basic website using WordPress as your CMS.

What you need:

  1. A web hosting service that supports MySQL databases and PHP
  2. Download the WordPress source code
  3. A WordPress theme like this one: Fresh
  4. Ideally, PHP and MySQL installed on your local machine for faster testing
  5. If you have your own custom design/stylesheet, try to prepare the HTML in the following way
    • Have a big “wrapper” div that encloses the entire page
    • Have a “header” div that includes the main navigation
    • The main navigation should be structured in a way so that the menu items are <li> tags
    • Have separate “footer” div that contains the copyright notice, credits, etc
    • Keep all the page content (article and sidebar, if any) enclosed within one “page” div
    • If your “page” div contains a main section and a sidebar, make sure the sidebar markup comes after the page content.

Step 1: Install WordPress

  1. Create a new MySQL database on your server (local or remote) and take note of the host, username, password, and database name.
  2. If you’re working locally on a Mac, your host name is likely to be “localhost:/tmp/mysql.sock”
  3. Unzip the WordPress source code into the folder where your website will be located
  4. Make sure the folder containing the WordPress files has permissions that allow anyone to “Read/Write”
  5. Navigate to the website URL in your browser, e.g.: http://localhost/~richardmuscat/newwebsite.local, and run through the install.
  6. If you’ve done everything correctly you will be given an admin password and asked to login. Make sure you copy the password

Step 2: Setup Basic WordPress Settings

  1. When you login to your new WordPress account, the first thing you should do is click on your username (”admin”) on the top right and change your password to something more memorable than the random one WP gives you.
  2. Next, unzip the WordPress theme you downloaded and place it in the path: /yoursiteroot/wp-content/themes/newtheme
  3. In the WordPress control panel, click on the “Appearance” section on the left and activate the new theme
  4. Next, click on the “Pages” section on the left and add your website pages, e.g.: Home, About Us, Products, News and Contact. You can leave the pages blank for now. Make sure you click on the “Publish” button when saving the pages.
  5. Finally, click on the “Settings” section on the left and then choose the “Reading” sub-section.
  6. Set the first option - Front page displays - to “Static” page
    • Choose what you’d like to be your homepage from the drop down list.
    • Then choose which of the pages you just created - e.g. News & Events - you’d like to be your “blog” page that shows latest news, articles, events etc.
  7. Save your settings

Step 3: Customising your Theme

If you’re happy with the theme you’ve chosen, just go ahead and upload everything and you’re done! If however you have your own custom design for the website you will need to modify your chosen theme. Here’s how to do it assuming that you have an HTML/CSS version of your site’s layout.

  1. Open up your website in your preferred HTML editor, e.g. Dreamweaver or TextMate
  2. Navigate to the theme folder and open it up. You should have a bunch of PHP files, a stylesheet (styles.css) and an images folder.
  3. Stylesheet: There is usually only stylesheet associated with a WordPress theme. You can do the following:
    • Either edit the existing stylesheet to match your requirements,
    • Replace the contents of “stylesheet.css” with your own pre-defined stylesheet, or
    • Leave the stylesheet as is and include your own stylesheet in addition by referencing it in the header.php file.
  4. The PHP files: WordPress renders your page by ‘gluing’ a number of different php files together. The following image deconstructs what goes where:
What goes where

What goes where

That’s it! Well, I’m sure it takes a bit more than that (it always does for me) but those are the principal steps. There’s a whole bunch of tutorials and other information on the web, especially on the WordPress forums and support sites.

Enjoy.

Written by Richard Muscat

March 25, 2009 at 6:40 pm

13 Responses

Subscribe to comments with RSS.

  1. Enjoyed your tutorial. Do you think that it is possible to build a good web site (maybe web presence is a better term) using just wordpress.com? Obviously in this case you cannot get under the hood much but would it be good enough for a personal or small business purpose?

    Cheers.

    granthamtech

    March 25, 2009 at 7:16 pm

  2. [...] more here:  Using WordPress to Build Small Websites: Step by Step Tutorial … Posted in News | Tags: advertising, creativity, design, facebook, pages, Step By Step, [...]

  3. As always it depends on what the web presence is for. I recently read an article (can’t remember where) that said a number of small/micro businesses are finding that even a Facebook page is good enough for their purposes.

    WordPress.com has a lot of advantages: it’s free, can deal with huge traffic, constantly updated and plugs you into a social network.

    For a small fee you can also get a proper domain name associated with a wordpress.com account without needing fully-fledged web-hosting.

    Of course, If you want shopping, forums or other stuff it’s not a good choice there…

    Richard Muscat

    March 25, 2009 at 9:17 pm

  4. [...] Original post: Using WordPress to Build Small Websites: Step by Step Tutorial … [...]

  5. [...] Using WordPress to Build Small Websites: Step by Step Tutorial Serious Simplicity (tags: ping.fm) [...]

  6. hi,
    I’m new to the concept of web site designing.
    nor do I know too much….so I’m progressing only learning from the Internet from people like you.
    I’m trying to make a few web sites, very simple ones basically.
    had been able to install WordPress and login.
    then I tried making a post, and pressed on publish.

    however. the web site still shows the same default page. there is no change.

    also, based on some forum ; deleted the index.html file too from the road directly but still no change.

    can someone guide me..

    thanks

    Doc

    March 26, 2009 at 12:45 pm

  7. sorry, that should read “deleted the index.html file too from the root directory but still no change”.

    Doc

    March 26, 2009 at 12:48 pm

  8. I thought blog is for HTML dummies like myself. Your tips seem detailed but too difficult! Is there simpler way to do it?

    PR Mania

    March 29, 2009 at 5:14 pm

  9. Sorry… that tutorial is not quite for dummies and newbies :-)

    It’s meant for people who already know how to build websites. If you’re looking for a quick way to create your own website, I would suggest something like http://www.edicy.com/

    Richard Muscat

    March 29, 2009 at 5:36 pm

  10. [...] Using WordPress to Build Small Websites: Step by Step Tutorial … [...]

  11. Great work, thanks.

  12. Thanks, I will made one now itself. and will start publishing.

    Jazlert

    April 8, 2009 at 3:01 am

  13. [...] Step by step tutorial on building small websites with WordPress [...]


Leave a Reply

<>
Put a Highlighter on any web page: just create a link to http://roohit.com/go. You can even add a highlighter to comments you make on someone else's webpage!