Learning WordPress : files and database

There are a numerous blog posts and forum discussion about WordPress.  However you can read all of them back and forward and still not know how the system works.  If you seek the real understanding of WordPress, there are two and two things only that you need to go through : its database scheme and its source code files.  And it’s not as hard as it might seem.

While you can download WordPress source code and go through each file using your preferred text editor or programming IDE, that might not be the best of fastest way to learn it.  Instead, I’d recommend a web-based interface available at PHPXref.com .  It might not necessarily have the latest version of WordPress, but usually it’s not that far behind.  For example, it currently features WordPress 2.7, with WordPress 2.8.1 being the latest version available for download.

WordPress at PHPXref.com
WordPress at PHPXref.com

The coolest things about such an interface are syntax highlighting and cross-reference within WordPress source code, as well as links to PHP manual for native functions.

WordPress database scheme (ERD)
WordPress database scheme (ERD)

As for the database, you have three things going for you here.  Firstly, WordPress database scheme is very small, simple and straightforward. It’s only 10 tables with just a few fields each.  Secondly, it’s very well documented.  And thirdly, when you do a fresh installation of WordPress, you have some sample data in your database, which helps to understand what goes where.  You’ll find one post and one page (to see the difference), one comment (to see how those are linked to posts), one category, one user, and a few links in the blogroll.  Just inspecting that fresh database will clear up your head and sort things out.

Spending a few minutes going through the source code and understanding the database scheme is very worth it.  Firstly, you’ll better understand what WordPress can and cannot do.  Secondly, you’ll get inspired (that I can pretty much guarantee you).  Thirdly, you will automatically get the understanding of how almost each and every WordPress plugin works.  Not in details, but you’ll be able to reverse engineer them in your head easily.  And fourthly, you’ll become much more efficient with WordPress customizations – you’ll just know where to put things and how to better change stuff.

Forget the URL

Just yesterday I was talking with a few people about the Web and how things are changing, and the subject of URLs came up.  And I shared my opinion on the matter – URLs don’t matter.  Before you start arguing, I want to make it clear that I do understand that there are exceptions to every rule and no assumption stays true forever.  But on the other hand, that’s what I believe.

I think every Web surfer answers this question to himself at certain point in time.  Are all these URLs that I visited, searched for, and bookmarked over the years matter?  And I suspect that quite a few of those people will answer as I do – “no”.  I had a sneaky suspicion for some time, but it was delicious social bookmarks web service that made me confident about this.

The thing with delicious is that initially it was available at http://del.icio.us .  And as you might guess, there quite a few problems with this URL.  Firstly, the word “delicious” is not in the active vocabulary of most non-native English speakers.  Secondly, even those who know the word, have troubles spelling it correctly.  Thirdly, those who know how to spell it, never seem to guess where to put the dots.  And fourthly, the logical line between the meaning of the word “delicious” and a social bookmarking web site is vague at best.

However, that didn’t stop del.icio.us from becoming the most popular social bookmarking web site on the Web.  And that was when I became confident in that the URLs don’t matter any more.  Very few people will remember them.  Most people will find the site with the help of a search engine.  And those who are really interested in getting back to it, will bookmark it.  It’s that simple.

What about brand names, you ask?  Brand names are important.  But you can avoid linking brand names to URLs.  What about people’s names?  Only a few will remember them.  What about original, non-standard domain names?  Only few of those will be remembered, the rest will search and bookmark.  Why do I have mamchenkov.net domain name then?  Because it was available and because it links to my name nicely.  If it wasn’t there, I’d use something else.  And, in fact, I did use a couple of other domains before I registered mamchenkov.net .

Why all of a sudden I started talking about it?  Because today I came across someone else saying practically the same thing – “Do URLs matter anymore?” article over at CNET News, and I quote:

People still try to trade the most simple URLs for hopeful hundreds of thousands. They will still line up in the hope of getting a vanity URL from Facebook.  But don’t most people simply go to the little search box, type in the name of what they’re looking for, and search?  If it’s something they want to go back to, they’ll bookmark it. But they won’t remember what the URL is. For the simple reason that they don’t need to.

Trailer : Gamer

This is yet another film to wait for – “Gamer“.  It’s like a mix of “The Running Man”, with the main character being controlled, and the “Death Race” with computer games instead of car racing.  It’s also directed by the same guys who did “Crank” and “Crank : High Voltage” movies. Engjoy!

[youtube=http://www.youtube.com/watch?v=9ubYTIazskQ]

WordPress 2.9 media features poll

Check out this poll for media-related features for the upcoming WordPress 2.9.  This is your chance to influence the priorities.  Features on the menu are:

  • Additional Media Filters, which would help you pick media that was used recently, or more often, or is your favourite, etc.  I don’t find it very important for my usage scenarios, because I rarely re-use media files in other posts.
  • Basic Image Editing, which will allow things like crop, rotate, and resize.  Even though I can use standalone image editors, I know of quite a few non-technical people who would appreciate basic image controls.
  • Better Media Settings, which will provide more defaults and more options to change for each upload.  I have enough options for my media usage already, so I don’t find this to be of high importance.
  • Bulk Media Import API, which will be appreciated by web development companies and such.  Anything that helps automation and bulk processing is A Good Thing.  Also, with more attention to media functionality in WordPress, I suspect some people would prefer to host their own images and videos, rather than to use third-party services (YouTube, Flickr, and such).  Moving all that content into WordPress with API is a dream come true.
  • Custom Image Sizes, which will allow for more and truly customized image sizes.  While I can understand the importance of this for some people, I suspect that most are satisfied with what is there now.   Plus there is a range of plugins, and workarounds available that make this problem of less importance.
  • Easier Embeds, for content coming from third-party services like Flickr, YouTube, and such.  This is something I’d really love to see done.  Currently, there are plugins to cover most cases, but I believe a built-in way is in order.  Plus plugins often miss important parts of the site, such as feeds.  And plugins rarely work well with other plugins.  If this functionality is in the core, or in a plugin, which is a part of main download, extending and re-using such functionality would be easier.
  • Media albums, as in standalone galleries, rather than media galleries attached to a post.  That’s something that a lot of people would find useful.  For example, bringing all YouTube videos from all your posts into a single gallery would be awesome.
  • Media metadata, which is adding categories and tags to media files.  Well, while it sounds cool, I think it will add more confusion to people.  With such functionality, WordPress will become more of a generic content management system.  For example, together with media albums, you’d be able to use WordPress as a pure image gallery application.
  • Post thumbnails, which would associate an image with your post.  I think this functionality is only useful to a small bunch of people, and it is currently available via plugins.  I don’t think it’s worth putting it in the core.
  • Revised Media User Interface, which would improve the experience in the media editor.  I don’t know how many people find it difficult to use actually, because it works like a charm for me, and I find it easy to explain to non-technical users as well.  But if there are ideas on how it could be much improved, then why not.

If you have any opinions on the above, please vote in the poll first, and then share them in the comments second.