Deploying WordPress as CMS


Here is the must read blog posts, for getting started with the Deployment of WordPress as CMS.

List of plugins, which I found very useful during my recent experience on deploying WordPress as CMS system

Active Directory Integration
http://wordpress.org/extend/plugins/active-directory-integration/

This plugin allows WordPress to authenticate, authorize, create and update users through Active Directory.

CMS Tree Page View
http://wordpress.org/extend/plugins/cms-tree-page-view/

Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. Use the tree view to edit, view, add pages and search pages (very useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won’t get any easier than this!

TagPages
http://wordpress.org/extend/plugins/tagpages/installation/

Adds post-tags functionality for pages.

ThreeWP Activity Monitor
http://wordpress.org/extend/plugins/threewp-activity-monitor/

Plugin to track user activity. Network aware. Track and display site or network-wide user activity.
Displays a multitude of user actions to keep the site administrator informed that all is well and that the blog or network is not being abused.

Table of Contents Creator (TOCC)
http://wordpress.org/extend/plugins/table-of-contents-creator/

Table of Contents Creator automatically generates a highly customizable dynamic site wide table of contents that is always up-to-date.  All entries are navigable making your site very SEO friendly. This plugin can be configured to display static pages, blog entries and forum comments. Another great feature of TOCC is the ability to include anchor tags on any page marked with a special class. This feature also allows links to articles, downloads or even other sites to appear within the table of contents as if they are part of your site’s navigation.|

TinyMCE Advanced
http://wordpress.org/extend/plugins/tinymce-advanced/

WordPress WYSIWYG editor

BackUpWordPress
http://wordpress.org/extend/plugins/backupwordpress/

Simple automated backups of your WordPress powered website. BackUpWordPress will back up your entire site including your database and all your files once every day.

WP Maintenance Mode
http://wordpress.org/extend/plugins/wp-maintenance-mode/

Adds a splash page to your site that lets visitors know your site is down for maintenance. Full access to the back- & front-end is optional. Works.

My favorite theme, which utilizes full browser width, and provides me a very pleasant experience when working on a large screen monitor.

Fluid Blue 1.7.2
http://wordpress.org/extend/themes/fluid-blue

Improved FTP backup for WordPress (Site Content + MySQL Database).

http://www.guyrutenberg.com/2010/02/28/improved-ftp-backup-for-wordpress/

Here is my modified version which allows, multiple backups a day. added hours-minute-second to the filenames. This script uses lftp, http://en.wikipedia.org/wiki/Lftp , a command line file transfer program for UNIX.

Script can be easily added to the crontab for automatic backup on remote FTP server.

#!/bin/bash
#
# Easily backup wordpress instances via ftp.
#

BACKUP_DIR="/root/localbackup/"
FTP_HOST="10.0.0.6"
FTP_USER="ftpusername"
FTP_PASS="ftppassword"
FTP_BACKUP_DIR="ftpdir/remotebackup"

BLOG_DIR="/var/www/html/mysite"

# end of configuration - you probably don't need to touch anything bellow

DB_NAME=`echo "<?php require_once(\"${BLOG_DIR}/wp-config.php\"); echo DB_NAME;" | php`<br ?>DB_USER=`echo "<?php require_once(\"${BLOG_DIR}/wp-config.php\"); echo DB_USER;" | php`<br ?>DB_PASS=`echo "<?php require_once(\"${BLOG_DIR}/wp-config.php\"); echo DB_PASSWORD;" | php`<br ?>DB_HOST=`echo " ${BACKUP_DIR}/${DUMP_NAME}
if [ "$?" -ne "0" ]; then
        echo "failed!"
        exit 1
fi
echo "done"

echo -n "Creating tarball... "
TAR_NAME=${BLOG_DIR##*/}-$(date +%Y%m%d-%H%M%S).tar.bz2
tar -cjf ${BACKUP_DIR}/${TAR_NAME} --exclude cache ${BLOG_DIR}
if [ "$?" -ne "0" ]; then
        echo "failed!"
        exit 2
fi
echo "done"

echo -n "Uploading SQL dump and tarball to FTP... "
lftp -u ${FTP_USER},${FTP_PASS} ${FTP_HOST} <<EOF
cd "${FTP_BACKUP_DIR}"
put "${BACKUP_DIR}/${DUMP_NAME}"
put "${BACKUP_DIR}/${TAR_NAME}"

EOF
if [ "$?" -ne "0" ]; then
        echo "failed!"
        exit 3
fi
echo "done"

How to avoid editing collision with multiple authors working on the same page/post

WordPress provides safe-guard with the warning if it finds multiple authors working on the same page or post, but does not block the user from creating edit conflicts.

Read more about this safe-guard – http://en.support.wordpress.com/editing-collisions/

If you need to lock down the page/post to allow only single autor editing at a time, here is the code you need to modify in /wp-admin/post.php file.
Modify the switch($action). Under the case “edit’, check the edit lock on the page using “wp_check_post_lock( $post->ID )”
Function Reference: http://wpseek.com/wp_check_post_lock/

Following is the modified case ‘edit’ code block. (WordPress 3.3.1)

case 'edit':
        $editing = true;

        if ( empty( $post_id ) ) {
                wp_redirect( admin_url('post.php') );
                exit();
        }

        $p = $post_id;

        if ( empty($post->ID) )
                wp_die( __('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?') );

        if ( !current_user_can($post_type_object->cap->edit_post, $post_id) )
                wp_die( __('You are not allowed to edit this item.') );

        if ( 'trash' == $post->post_status )
                wp_die( __('You can’t edit this item because it is in the Trash. Please restore it and try again.') );

        if ( null == $post_type_object )
                wp_die( __('Unknown post type.') );

        /////////////////////////////////////////////////////////////////////////////
        // Changed by: Divyen Patel - Ensure Lock Down Post/Page Edit for multiple users.
        if ( $last = wp_check_post_lock( $post->ID ) ) {
                wp_die( __('Someone else is working on this page. Please retry after some time.') );
        }
        /////////////////////////////////////////////////////////////////////////////

        $post_type = $post->post_type;
        if ( 'post' == $post_type ) {
                $parent_file = "edit.php";
                $submenu_file = "edit.php";
                $post_new_file = "post-new.php";
        } else {
                if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
                        $parent_file = $post_type_object->show_in_menu;
                else
                        $parent_file = "edit.php?post_type=$post_type";
                $submenu_file = "edit.php?post_type=$post_type";
                $post_new_file = "post-new.php?post_type=$post_type";
        }

        if ( $last = wp_check_post_lock( $post->ID ) ) {
                add_action('admin_notices', '_admin_notice_post_locked' );
        } else {
                $active_post_lock = wp_set_post_lock( $post->ID );
                wp_enqueue_script('autosave');
        }

        $title = $post_type_object->labels->edit_item;
        $post = get_post_to_edit($post_id);

        if ( post_type_supports($post_type, 'comments') ) {
                wp_enqueue_script('admin-comments');
                enqueue_comment_hotkeys_js();
        }

        include('./edit-form-advanced.php');

        break;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s