Archive for the ‘Wordpress’ Category

Wordpress MU: Start with a different table prefix

With regular WordPress, when you install it on your server you are given the option to change the table prefix to something other than “wp_”; however, in Wordpress MU there is no option for this. So here is how you can do it from a CLEAN install.

In your wp-config-sample.php file find the following line

70
$table_prefix  = 'wp_';

Then change ‘wp_’ to anything you want preferably with an underscore at the end; something like the following would work.

70
$table_prefix  = 'muxyz_';

This will as mentioned previously only work on a Clean install so if you want to do this on a version of MU that is already running this won’t work unless you alter all your tables in your database as well.  Regular WordPress has plugins for this but I do not know if the they will work on MU and have yet to find one specifically for MU.

WordPress with Google Part 1 – Webmaster Tools Site Map

I’m an avid user of Google products ever since I opened up my first GMail account; It is pretty much my online hub. I use Chrome as my default browser (Firefox for development though), GMail for mail, Google Reader for RSS, iGoogle for everything newsie along with Analytics and the rest.

I’ve always been intrigued by Google Webmaster Tools; it’s a simple interface with nothing special but It helps me keep up to date with what’s going on with my site. Analytics is great for seeing trends, users and how people are finding you but that’s not what this article is about.

Step 1: Set up your site.

Google will ask that you verify that the site belongs to you; Since we’re using WordPress I would suggest grabbing the HTML file instead of updating the META tags. Why? If you change or update your theme you loose your Meta but not your HTML file. So Download the file, Upload it to your WordPress folder and then Verify.

Step 2: Submit a Sitemap

Grab a copy of Google XML Sitemaps plugin, upload and activate it.  There are full installation instructions on the Plugin’s WordPress Instructions Page; You can fiddle with the sitemap configuration along the way so that it best suits your site.  Now that your set up go on over to your Google Webmaster Tools account and under Site Configuration click on Site Maps.  This is the easy part now. Click on Submit a site map, finish of the url , click on the button next to it and voila! Go to Sitemaps.org for more information on sitemaps.

Step 3: Monitor and Adjust

Once you’ve set up your site map you have to wait for Google to index your site.  Check the sitemaps sections and see how things are doing.  If there fine good! if not then you need to do some checking.  The main culprit, go to Crawler Access under Site Configuration, I’ve had is my robots.txt and I found an article on Wordpress.org about SEO that helped with fixing my file.  There’s more information on that same page that will help with Technorati and others if that interests you at all.  Google also offers a robots.txt generator within the same section which you can play around with to get your file just right.  For more info on Robots.txt check out Robotstxt.org.

Final Thoughts

I figure the quicker you let Google know the quicker they find you and the sooner you get indexed.

WordPress MU as a CMS

Many people, myself included, are using WordPress for business by turning it into an easy to use CMS. Iv’e done a number of sites in WordPress and clients generally like it and it saves me time since the majority of my coding really just comes down to me creating a few WordPress pages and the styling the site.

The Problem/Task

A couple of weeks ago a previous client asked about ways they could update their site which was an old SHTML site.  We thought about using WordPress again for the same reasons we always do; however ever this site was fairly large and page heavy.  The goal wasn’t to trim down the site (unfortunately) but to make it editable without needing HTML experience.  The client wanted each area to have it’s own administrator to control over what is posted, event management, etc all your typical stuff.  A couple of coworkers of mine gave it a shot but what resulted was a website that was confusing hodge podge of pages and posts in categories that they weren’t organized in any simple fashion.  Add to that the admin area was a beast on it’s own trying to use rolescoper for permissions and it still just wasn’t working.

The Solution

The project was put on hold for weeks and then somehow made it’s way to me; I think I had some downtime so I was fair game.  I could remember how the last attempt just didn’t fly but figured that there still had to be a way to do it.  That’s when I remember about WordPress MU.  So I started building out the site by making major each section a new blog and then built each one separately.  I can’t remember what theme I used since I only used it because it supported child themes.  I ended up stripping it down to the barebones and using it on each blog.

Final Thoughts for WordPress MU as a CMS

I use it for development since I can create my development/test sites and manage them all from one area with one login and database.  And I’ve been thinking lately that it might be a good idea for creating a store section of the site (ie site.domain.tld).  It definitely has it’s uses though you at the same time it can be overkill if your just doing a simple blog or pamphlet/brochure website.

The Good Parts

  • Each Blog/Section could have it’s own administration
  • Plugins could be controlled better from the Site Administrator account
  • Users Could have access to only certain sections of the site admin
  • Advertising could be better targeted (though there advertising was lacking it had more potential)

The Bad Parts

  • Not every Plugin worked in WordPress MU
  • Some Plugins were ok to work separately on one site and not others but the rest were now harder to manage
  • limited MU specific plugins available

I guess I could have gone over security and updates but I figure that that is too much for this post so sorry if that is what you were looking for.


WordPress Cheat sheets

I’m always looking for better references than codex.wordpress.org. Today this wordpress reference link came across my RSS reader and it is definitely work a look at. Not only does it have great information for Template building it also has a great look and feel to it.

Web Design WordPress function list

Wordpress MU subdirectory fix

the install proces is creating half part of the table,
wp_1_comments ,
wp_1_links ,
wp_1_options ,
wp_1_postmeta ,
wp_1_posts ,
wp_1_terms ,
wp_1_term_relationships ,
wp_1_term_taxonomy ;

But not the other one, this is a new install.

I had this problem and it was caused by me having a plain wordpress install at the root level and MU install in a directory.

/ <- regular wordpress

/clients <- wordpress MU

to fix it open up the file “wp-blog-header.php”
look for

if ( !file_exists( dirname(__FILE__) . '/wp-config.php') &amp;&amp; !file_exists( dirname( dirname(__FILE__) ) . '/wp-config.php')) {

should be around line 10-11ish
once you have found this comment out from the “&&” to the bracket just after the last “wp-config.php”
so you should have

if ( !file_exists( dirname(__FILE__) . '/wp-config.php') /*&amp;&amp; !file_exists( dirname( dirname(__FILE__) ) . '/wp-config.php')*/) {

then try it again.


The problem is wordpress mu checks the current directory and then goes up one more level so for me it did the following

/clients – no wp-config.php
go up one level

/ – wp-config.php found
I’m sure that there is a point to this being there I’m just not sure what that is.
Hope that helps

Free Sprint phones for sale | Thanks to CD Rates, Reverse Phone and Registry Software