Configure Wordpress As A CMS

Status
Not open for further replies.

maffs

Small Member
Sep 11, 2007
214
5
0
South Wales
Ok first off this isn't mine. It's from h**p://designadaptations.com.

I've seen a few requests for using Wordpress as a CMS on WF and when I saw this thought it may be useful to some of you guys.

Start-----

After wading through a headache-inducing number of Codex pages, and stumbling through various articles which briefly touch on using Wordpress as a CMS but don’t actually explain how to set it up that way… I decided to write my own version of how to do just that. Powering your entire site (not just your blog) using Wordpress as a content manager can be done with a minimum amount of configuration, while still affording you the ability to maintain a tidy file structure, i.e. installing Wordpress to its own directory. This way, your blog “virtually” exists in the root, allowing you to create static pages and offering control over the site-wide content you develop. Yay! Let’s get started.
Step I: Install Wordpress In Its Own Directory

  1. Create a folder in your file structure where you want to install Wordpress. Unpack and FTP all the files into that folder.
  2. Navigate to the new folder in your browser and follow the prompt for setting up your database and logging in
  3. In your admin area, go to Options > General and make sure the address currently in the box labeled WordPress address (URI) matches the name of the folder you installed to, for example Pimp it out People !!
  4. Change the address currently in the box labeled Blog address (URI) to reflect your root - Pimp it out People !!
  5. Save your changes
  6. Still under Options, go to the Permalinks tab, and change the structure to whatever pretty links you wantNote: The purpose of changing your permalinks at this point is to force the .htaccess file to show up in the remote file structure, where it would normally be hidden (even if you have “show hidden files” selected in your preferences)
  7. Download .htaccess (thereby forcing it to be visible on the local side as well)
  8. Copy the index.php and .htaccess files from your blog root to the site root.
  9. Open index.php and change this line: require('./wp-blog-header.php');
    to read:
    require('./yourblog/wp-blog-header.php');
  10. You should now be able to navigate to your site root Pimp it out People !!, and see your blog content, rather than a static front pageNote: (make sure you don’t have something like index.htm in your root, which would override index.php)
Update: The following portion of this tutorial is no longer necessary since the release of WP version 2.1, which added the ability to create a static page from within the Admin UI.
Step II: Create a Static Index Page

Done? Right on. Now that you’ve got WP installed, it’s time to configure it as a CMS. First, a little clarification:
Standard websites use a home page to serve as an introduction to visitors… “Here’s who we are, here’s what we do.” On a blog site, there’s typically no static page but rather a database generated page showing the latest post or whatever. The content changes every time there’s new activity.
Because you want to use Wordpress to manage all your content, you may also want to set up a static landing page where you can have more precise control over the elements that appear there. In other words, you may not want your latest blog entry to appear when someone enters your URL.
Your static page can be set up as a hybrid, in which specific portions of the content are dynamically generated and the rest is manually updated, or if you’re really picky you can have it be completely static. Either way, you can customize it to display whatever information you want. Here’s how to accomplish that:
  1. Create your own index page duplicating the index.php page residing within your theme folder, and rename it home.php
  2. Move home.php to your root directory. This will now serve as your new “index” page, or static home page. Make any modifications you need to the design to accommodate your content.
  3. Open .htaccess from your root folder. Above the existing lines of text insert this: DirectoryIndex home.php index.php
  4. Save and upload.
Note: You must still list index.php as a second choice or you won’t be able to access index.php in any of your subdirectories unless you specifically list the URL. For instance, Pimp it out People !! won’t work.
Step III: Tie It All Together

To integrate WordPress with your static landing page, you can call the header, sidebar and footer as includes, carrying out a consistent theme across all pages of your site. To include the header, add the following to the top of the page:
<?php define('WP_USE_THEMES', false); require('./yourblog/wp-blog-header.php'); get_header(); ?>
To use the sidebar and/or footer, it’s a bit simpler, just add the following at the bottom of your page:
<?php get_sidebar(); ?>
and/or
<?php get_footer(); ?>
You can also use The Loop to display dynamic content, as mentioned earlier. Want to add a list of recent blog posts to your home page? No prob. Use a scaled down version of The Loop as a feeding mechanism to call any posts from the database associated with the category you want to display. Conversely, you can code your home page to retrieve the permalink for each article. Refer to the Wordpress official Codex to find snippets of code and make the job a snap. Then use CSS to style the results any way you like!



End-----
 


I don't see what the point of trying to hack Wordpress into a CMS when there are hundreds of CMSes out there already.

There are numerous basic functionalies of a CMS that Wordpress doesn't offer. Workflow and modules (the sidebar is lame and limited) are two big ones, decent multiuser support (customizable user roles etc) are another.

I love WP but I use it as nothing more than a 'zine/blogging platform. Other CMS' might be hard to learn, but the pay off is worthwhile IMO.
 
Status
Not open for further replies.