Web Development

Use Wordpress as the platform for your website

As a small business, you can easily manage and run your website by leveraging the capabilities of the WordPress platform. Here's how to do it.

What do the TechRepublic and CNN and websites have in common? Well, you're right if you guessed great news stories. But they also share a common publishing platform--WordPress. That's right, these and 20% of all websites on the Internet run on the WordPress platform. Other popular blogs that use the WordPress platform include the MTV Newsroom, the PlayStation Blog, People Magazine, University websites... the list is endless.

What makes the WordPress platform so attractive?  While most people still think of WordPress as a blog platform, it has since evolved into a fully capable CMS platform that is no longer limited to a specific use. For small businesses, this is one of the best platforms out there to manage your content. It's not only free but it's simple and easy to use. As a small business owner, you don't want to be bogged down with learning how to set up a CMS system, secure it and update it regularly. WordPress does all this for you using the countless plugins that have been created for it.

But what if you already have a website and would love to move it to a more easy-to-manage platform like WordPress? Again, this is fairly easy. WordPress uses themes that allow you to customize the look and feel of your website. Turning an existing web template into a WordPress theme is fairly easy as you are going to see.

1.  Create a folder with your theme name. Inside this folder, you will create the file "style.css".

Open the "style.css" file and copy info below (adding your specific information as needed.

/*

Theme Name:

Theme URI:

Description:

Version: 1.0

Author URI:

*/

The above information is important to help WordPress identify your new theme. Always remember that this goes at the very top of your  "style.css" file.

2.  Create another new file, "index.php" inside the theme folder and copy and paste the PHP code below into this file:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"
/>
<title>
<?php
wp_title(''); ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> at <?php } ?>
<?php
bloginfo('name');
?>
</title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php wp_head(); ?>
</head>

3.   Create a div inside the "index.php" file and insert the Loop PHP function code below:

<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
  <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="post-header">
        <div class="date"><?php the_time( 'M j y' ); ?></div>
        <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <div class="author"><?php the_author(); ?></div>
    </div><!--end post header-->
    <div class="entry clear">
        <?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?>
        <?php the_content(); ?>
        <?php edit_post_link(); ?>
        <?php wp_link_pages(); ?>
    </div><!--end entry-->
    <div class="post-footer">
        <div class="comments"><?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?></div>
    </div><!--end post footer-->
  </div><!--end post-->
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
  <div class="navigation index">
    <div class="alignleft"><?php next_posts_link( 'Older Entries' ); ?></div>
    <div class="alignright"><?php previous_posts_link( 'Newer Entries' ); ?></div>
  </div><!--end navigation-->
<?php else : ?>
<?php endif; ?>

The code makes your website posts and comments visible.

4.  Create another file, "header.php", in the theme folder. Open your old "index.html" file and copy the code between the <head> tags of that file. Copy that code into the new "header.php" file you just created. Save and close.

5.  Create two more files inside the theme folder, "sidebar.php" and "footer.php." Copy the appropriate code sections from your old files and into the new files as we have done with "index.php" and "header.php".

You should now have your old "index.html" file chopped into four different PHP files. We now need to put all these files back together.

6.  Open the new "index.php" you created and add the line below at the very top of the file:

<?php get_header(); ?> ?>

7.   Scroll to the bottom of the file and add the code below as well:

<?php get_sidebar(); ?>
<?php get_footer(); ?>

The theme as it is now, is ready to go live.

You can customize your theme further by adding "Template Tags" and "Template Files" if you so desire. The wide variety of plugins available allows small businesses the option of choosing what they need and upgrade as the business expands.

About

David Gitonga is an avid reader and writer and has worked with various companies to design, develop, and maintain their websites. He has worked with websites as an online content marketing strategist in the field of tech, social media, design, and de...

11 comments
shasha7
shasha7

I would rate wordpress 5/5. Best CMS for blogging.

peterjohnsongwb
peterjohnsongwb

I agree with you. Because WordPress Websites have many advantages like: Open Source Software WordPress is an Open Source software which allows it to be used free of cost. You can use it on any kind of personal or commercial website without have to pay a single dime for it. It is built on PHP/MySQL (which is again Open Source) and licensed under GPL. User Friendly You don’t really have to be experienced to use WordPress on your website. Nowadays most of the hosting companies provide the ability to install WordPress on your site at a single click of the mouse. The administration section is easy to navigate and its even easy to add articles/content to your website. Themes Support You will never run short of templates when using WordPress. If you don’t like the themes that come with the default installation of WordPress, you can hunt on the Internet and you will find thousands of free themes that you can download and use for your website. There are themes which can even make your website look like a regular site instead of a blog. Plugins Extend Functionality WordPress plugins allow you to do just about anything that you want and can be installed in a jiffy. For example, you want to paginate your blog posts, just look on Google and you can easily find the relevant plugin that will easily do the job for you. Standards Compliant WordPress is one software that follows all the Web Standards and keeps your blog or website compliant to all the rules that have to be followed when running a website. SEO Friendly Search Engines have to be definitely kept in mind when building a website. WordPress uses different functions which allow it to be search engine friendly. For example sending pings to other sites, making categories, tagging your posts, use of h1/h2 tags etc. Large community Support As per recent statistics, WordPress is used on more than 1% of the websites on the Internet in the world. There is a large user community backing the development of this software. So, whenever you face any problems, you can go through all the available WordPress forums and communities and find answers for all your questions.

Deadly Ernest
Deadly Ernest

Oh dear Lord, please give me a website that does what I want and works just right. One that's uses nice code, that's doesn't take ages to load. Just the minimum simple lines, not scripts from all over the vines.

mr.practical
mr.practical

I've never had the misfortune of using Wordpress for an enterprise website, but I know someone who has; and this very talented lady, who was tasked with building it, said it was a nightmare.

tom.marsh
tom.marsh

This is a column for the SMB which stands (if you're not aware) for "small and medium business." WordPress would be a bad choice for an enterprise, mainly because you can afford the excellent commercial CMS tools that are out there that put WP to shame. But for an SMB? WordPress is a god-send, inexpensive, easy to use means of publishing web-content without spending tens of thousands (or more) on a license for the CMS (before you've even spent a nickel building the site.)

Deadly Ernest
Deadly Ernest

that have so many third party script calls that my security stops that the page is almost blank and virtually unreadable without all the content sucked in from elsewhere. I've even seen a few sites that won't display the main page code until AFTER it's pumped all the ads onto the site, so blocking them stops the site from loading at all. The results from the above is that I don't do business there and they go on my bad site list that I tell people not to bother with.

Deadly Ernest
Deadly Ernest

WordPress based site I've been too is very script heavy and calls third party scripts from all over the Internet, many of which are related to data mining for targeted ads and delivering ads. Quickest way to get me to avoid your website and tell people it's crap is to have one that takes a lot of time to load due to excessive scripts and then have those scripts pushing ads at me.

Deadly Ernest
Deadly Ernest

those issues. Mind you, I've not seen every such site or every site made in WordPress. Just that the frequency seems to indicate it's their preferred way of doing things.

tom.marsh
tom.marsh

Of an individual admin that have nothing whatsoever to do with WordPress. Stock WordPress does none of the things you outlined... The amount of scripting is up to you: By definition, since it is written in PHP (which is a "script-language") it woudl be "script-heavy," but you're under no obligation to use plug-ins that call other sites resources, and under no obligation to run ads on your site.