Blog Marketing Tools and Strategies for Business

Tools, tips and learning resources to use your blog as an online business, marketing and communications platform.

WordPress 2.8.6 ERD / Database Schema

I thought I’d post this since I’ve had the opportunity to work in depth with the WordPress database in one of my more recent projects. This ERD is what I came up with through my observation by doing a fresh install and looking at what changed with each post / page / link / category is added.

The documentation I could find in the WordPress codec showed the ERD for version 2.5, and it has changed since.

I’ve omitted the columns of the tables – this is just a simple diagram to give you an overview of the relationships between the tables.

wordpress 286 erd

If you understand what ERDs are at all, most of the tables names should be descriptive enough for you to understand what is stored in them, and why they are related to other tables… but I thought the wp_terms_taxonomy and wp_terms_relationships stuff need a little bit more explaination.

So here is what I observed. (I shall go thru all the tables anyway)

Let’s start with the simplest.

  • wp_options – WordPress options (blog name, description, permalink settings etc)
  • wp_users – For each user you have in the database, you have one row here. Simple yeah? This table stores only the very commonly used fields
  • wp_usermeta – To store other information about the user, like your name details, settings, and preferences. These are stored in a meta_key and meta_value pair
  • wp_comments – One comment, one row. Each row is linked to one post.
  • wp_posts – Stores the bulk of your WordPress data – your posts and pages content
  • wp_postmeta – Like usermeta, this table stores additional information for each post, like your custom fields for each post.
  • wp_links – Information on the links you have defined in WordPress admin -> Links section
  • wp_terms – Stores a list of terms used in the database. A term can be a tag, a link category, or a post category
  • wp_terms_taxonomy – Each row here is references a row in wp_terms, and basically it provides information about what this term is used for. In the case, say where you have a link category and a post category with the same phrase, you could have two rows in this table pointing to the same row in wp_terms.
  • wp_terms_relationship – This table just links up the wp_posts and wp_links tables to the wp_terms_taxonomy table. Technically, things can go wrong here if you link up the wrong things, e.g. linking up a wp_posts row to a wp_terms_taxonomy row that defines a link category, so beware.

With this database design, the WordPress admin module does a lot of work to make sure the terms, taxonomy and relationships tables do not get messed up. The “three way relationship” you see between wp_terms_relationship, wp_links, and wp_posts is intentional – each wp_terms_relationship references to only EITHER a wp_posts record OR a wp_links record.

For example, it edits and appends a “-2″ to the slug for the term when you edit an existing link category to match an existing post category. However, when you create a new link category with the same name an existing post category, no new terms are created, only new taxonomy. There are still some small bugs in the way this is managed, but I must say the implementation has been fantastic so far!

If you are just starting out developing functionality for WordPress or doing heavy tweaking of codes, I hope this has given you a better overview of how things work in the backend!

AWeber’s New Web Form Generator

If you are using AWeber’s email marketing services, you should have heard from them regarding their new web form generator.

They’ve really taken a notch up with their new web form generator – allow you not only to choose color schemes and background designs for your forms, but also customize your thank you pages with smart videos that teach your subscriber how to confirm your subscription.

Amazing.

Aweber Webform Generator

Go read about it and have a video walkthrough on their blog post, and read what people have to say too!

Commendable Support from Hostgator Web Hosting

Here is something commendable. I must say I am very impressed with the web hosting support from Hostgator.

I am in the process of migrating a domain over to a their servers, and I was experiencing some issues getting a big mySQL database file imported. I headed to their live chat, and I was advised to submit a support ticket for my issue.

So on I went to submit a support ticket thru email, explaining my case. MINUTES later, there was a reply in email asking for confirmation, and within 20 minutes, I received another reply (from a separate support administrator) saying the database has been imported successfully.

Here’s my screenshot from Gmail.

Great Suppot from Hostgator

I don’t know about you, but I think this support is awesome. I’ve had experience with other hosting companies that take MONTHS to resolve a technical issue.

Well done Hostgator!

If you are considering a web hosting service, consider Hostgator.

New Theme for Blogopreneur.com

I’ve finally gotten down to work on the new theme for Blogopreneur.com. This is the 3rd time there is a radical change in design, and the new theme is put in place so I can add more content to this site apart from the blog posts.

So new things are coming, change is on the way. :)

Here’s the old theme:

blogopreneur old theme

and this is the new (current) one:

blogopreneur new theme

In the process of changing the theme, I decided to take away my free e-course (its long outdated), and also did a lot of cleaning up – my categories, tags and stuff. Well this means a lot of work is still pending in the backend, fiddling with my .htaccess files. I’m expecting it to be nothing less than a nightmare! Haha!

But change is good, change keeps up moving, so do let me know what you like about the new theme, and how I can further improve it!

Google Chrome Frame

Today, Google released Google Chrome Frame, a plugin for Windows XP / Vista users to take advantage of richer javascript experiences. After installing a the plugin, you can specify a separate meta tag on your website, so users with the plugin installed can indentify themselves, and take advantage of the functionality.

I haven’t given Chrome Frame codes a go yet, but as much as I am excited about the possiblity of the new functionality, I also know in the back of my mind how long I’d have to wait for advanced web technologies like this to reach even 1% of a website’s audience (that especially if you are expecting a non tech savvy audience).

Back in 2005, Seth Godin posted about “stats that cannot be true“, and he mentions that its “inconceivable to me that 40% of the audience knows how to use their browser to erase their cookies.”

And what he says is true today, 4 years down the road.

Today, I see people in Singapore (a country with one of the highest Internet Penetration Rates in the world), still using Internet Explorer 6, Windows 98/95, and not knowing the difference between Microsoft Windows (the OS) and Microsoft Office (the applications suite).

So much for advanced web technologies.