Wordpress

Wordpress is the standard Content management system. Quick to install and requiring relatively low resources, it is very popular. Here you will find tips and thoughts I gathered from my experience using Wordpress. [sb_child_list]

Wordpress: Enable multi site

Will expand at some point but here is the gist of it: mkdir wp-content/blogs.dir chmod 777 blogs.dir define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); $base = '/'; define('DOMAIN_CURRENT_SITE', 'blog.webdevpower.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L]   # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*.php)$ $1 [L] RewriteRule . index.php [L]

10 wordpress plugins

Here are a few plugins I use on most wordpress installs:

Moving wordpress install across domains

As wordpress hardcodes urls to posts in the database, it can be very annoying when you alternate between a production and a dev server. Luckily, it is possible to overwrite this global url by specifying two lines in wp-config:
define('WP_SITEURL', 'http://www.mynewsiteaddress.com/');
define('WP_HOME', 'http://www.newsiteaddress.com/');
Please note that some plugins that use the file system like ssome caches may have to be reconfigured or the cache may be reconfigured. Rather than hardcoding the domain name, you can even use $_SERVER['HTTP_HOST']; Alternatively, you can replace the values in the database with the search and replace plugin http://wordpress.org/extend/plugins/search-and-replace/ . Note, some images in the database such as 2011 theme header images or absolute link will not be affected by this trick. To avoid problems, I suggest using relative urls (most importantly, avoiding putting in the domain name).

Child Themes

If you want to heavily customize your themes, you probably want to start with themes such as blank slate or twitter bootstrap. However, for a quick prototype or if your need are relatively simple, you can override wordpress's base themes (2012 and 2011) relatively easily and the nice thing a lot of things are customizable from the admin. To Create a child theme, simply create an empty directory with your theme's name and put the following in a file called style.css:
/*
Theme Name: Your child theme name
Theme URI: http://www.example.com
Description: This is my child theme
Author: Your name here
Author URI: http://www.yoururlhere.com/
Template: twentyeleven
Version: 1.0
*/