Update to Slimming Down Wordpress

Back in February I wrote a short piece about stripping down Wordpress to a more basic functionality (see Wordpress on a Diet ) and now I’ve just undertaken it for another site, so here is a bit more information, also making use of the latest version, Wordpress ‘StrayHorn’ 1.5.1.3.


You maybe want to read the original article, I’m just going to eloborate on that and
make a few more suggestions.

First, for those who ask “Why strip it down?”, I’m more and more convinced that Wordpress
is not just a very good blog system, but a very good Content Management System for those who want
something just for managing page content. There are a lot of people who want to be able to add
content to their web site and not employ someone to make every HTML change and yet not have to
get a degree in Computer Science to deal with a full CMS administration system.

The easiest way to limit someones administrative view of the admin panels is to give them a low
permission level, but this can sometimes be tricky. In addition to this I don’t need any comments,
pingbacks, trackbacks etc and neither do I want the files hanging around in case someone finds a
security weakness in six months time. Hence the Wordpress Lite described here.

The advantages of Wordpress are: it handles categories (and sub-categories) with ease, allows the user to
add articles to categories and to create static pages and the administration end can be cut down to just show the
bits that are needed by the user. Oh, and the code is well written and easy to work with.

The following notes apply to Wordpress V.1.5.1.3

Set the Options as administrator as described in the previous article.

Next off, create a user that will manage the installation and give them a user access level
of 4 (or 5 if they want Page and Link Management).

Now, modify the menu structure in wp-admin/menu.php so:

Menu structure:

    Dashboard -> 6
    Comments -> 6
    Awaiting Moderation -> 6

Now set the start page upon login to be the ‘Write’ page, by changing the redirect in wp-login.php
at about line 165 (note the $redirectto):

    case ‘login’ :
    default:
        $user
login = ”;
        $userpass = ”;
        $redirect
to = ‘wp-admin/post.php’;
        $usingcookie = false;

Having done all this, we should be able to log in as that user and see a minimal set of admin pages.

Most of the files can now be stripped out of the installation:
Remove some files:

     wp-atom.php
     wp-commentsrss2.php
     wp-comments-post.php
     wp-feed.php
     wp-mail.php
     wp-rdf.php
     wp-rss.php
     wp-rss2.php
     wp-trackback.php
     xmlrpc.php
     wp-login.php
     wp-register.php
     wp-pass.php
     wp-links-opml.php

If you are not using any plugins, then the whole plugins directory can be removed (I use Markdown for my customers
as that obviates them having to learn HTML).

Themes are not normally used in a stripped down situation (as Wordpress is being embedded in an existing site)
so the /wp-content/themes/ section can be removed and if any pages call in to the Wordpress system, be sure to
set the line:
    define(’WP
USE_THEMES’, false);
at the start of the file.

This will leave the only Wordpress files in the root directory as:

    wp-blog-header.php
    wp-login.php
    wp-settings.php
    wp-config.php

and the following folders:

    wp-content  <- only plugins
    wp-admin    <- unchanged
    wp-includes <- unchanged
    wp-images   <- is used by admin...

    
    and the following folders:

        wp-content  <- only plugins
        wp-admin    <- unchanged
        wp-includes <- unchanged
        wp-images   <- is used by admin...

There are some further items to clean up, see the previous article for more details for that…


3 Responses to “Update to Slimming Down Wordpress”

  1. jalal Says:

    test comment

  2. sad Says:

    asdasd

  3. wordpress pro Says:

    I would love to see a wordpress installation with a flat field database instead of a MySQL so I could use it as a website builder. Building a website consisting only a few pages with WordPress would be a lot easier if I didn’t have to install a database. Just a thought.

Leave a Reply