WordPress Declaration of Independence

The WordPress Foundation is a charitable organization founded by Matt Mullenweg to further the mission of the WordPress open source project: to democratize publishing through Open Source, GPL software.

The point of the foundation is to ensure free access, in perpetuity, to the projects we support. People and businesses may come and go, so it is important to ensure that the source code for these projects will survive beyond the current contributor base, that we may create a stable platform for web publishing for generations to come. As part of this mission, the Foundation will be responsible for protecting the WordPress, WordCamp, and related trademarks. A 501(c)3 non-profit organization, the WordPress Foundation will also pursue a charter to educate the public about WordPress and related open source software.

We hope to gather broad community support to make sure we can continue to serve the public good through freely accessible software.

About Web page, WordPress Foundation

There are already a lot of great comments on the welcome post “Getting off the ground“. Here is a one of the many juicy comments made by Matt in response to a question posted there:

Sure, as a quick summary: [Wordpress.com and the WordPress Foundation] completely separate, but share a similar name and my involvement. One is for-profit, the other non-profit. They both have similar goals in terms, but the Foundation can take a long-term multi-decade approach to solving these problems without regard for short term profit, market conditions, or shareholders. I’ve always had a vision for two simultaneous approaches to the WordPress way, the heart and the mind, but it’s just now coming together.

Measurements That Matter on WordPress.com

I know what measurements matter for WordPress.com, because they’re right there on the front page. Right now in the top left of “Freshly Pressed” it reads:

The best of 252,029 bloggers, 223,676 new posts, 327,799 comments, & 54,240,782 words today on WordPress.com.

Those numbers get me far more excited than page views and other “monetization” stats, because these right now front page stats reminds me blogging works.

These stats are about people expressing themselves (writing words) and connecting with other people (commenting).

These are the numbers I look to when I need inspiration.

wp-content in Code is a Tell for Common WordPress Coding Mistakes

Regularly while reviewing themes and plugins, I’ll see URLs or paths that include ‘wp-content’. This is a often a hint of a WordPress coding mistake.

Consider this simple example:
<link rel="stylesheet" href="http://example.com/wp-content/themes/default/style-ie.css" type="text/css" media="screen" />

If as part of a migration or server change, WordPress ends up in a sub-directory this will break.

For file system based access, if I see ABSPATH . '/wp-content/ … things are likely OK, though if WP_CONTENT_DIR or similar are changed, this will also break.

I’m tempted to use the constant STYLESHEETPATH or is it TEMPLATEPATH? But, those are static variables initialized early in the WordPress run.

I’ve been meaning to write this article for a while. Serendipitously, when I went to write a first draft of it, Mark Jaquith‘s had just published “Force CSS changes to “go live” immediately“.

In the comments, demetris suggests using STYLESHEETPATH, but Will Norris quickly points out “sure, but you still have the same problem of bypassing any plugins that may be using the ’stylesheet_directory’ hook to pull the stylesheet from some place else entirely.”

Mark’s solution beautiful illustrates how to get the the URL location of the theme’s files and also directly the URL for the main stylesheet style.css:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />

What Will describes is exactly what WordPress.com depends on. We have a similar, but much more complex solution to deal with the CSS in the content delivery network (CDN) going stale on updates, and also some web browser’s with their funky caches not keeping up. Our solution is both for WordPress’s front end and dashboard (also dealing with the various ways CSS can be called or @imported).

I do have one niggle about Mark’s solution, and it’s the same with most WordPress code out there, the use of bloginfo(). Strings within strings within strings within strings give me headache, so to ease readability and make it more verbose replace:

bloginfo('stylesheet_url'); with
echo get_stylesheet_uri();

bloginfo('stylesheet_directory'); with
echo get_stylesheet_directory_uri();

If you look up in the codex get_stylesheet_directory() you’ll see that would be the file system path, which is confusing given the behavior of bloginfo('stylesheet_directory'); returning the URL. This presents another reason why I favor the consistency of always using the specific getter function calls. Also, when I’m using bloginfo() calls, I have a tendency to get in a mind set where I think I’m directly retrieving the option in the database (accessing directly the info shown in wp-admin/options.php). By using the specific getter function, I remember that there are hooks (actions, filters) that might be triggered.

Some of the other areas, I see wp-content is in CSS style sheets themselves. Relative paths are almost always the correct solution.

Far more painful for me are the plugins that assume where plugins are, because this can take quite a bit of debugging to unwind the assumptions.

That is a topic for me to postulate on another day. Will has written the very relevant “WordPress Plugin Pet Peeve #2: Direct Calls to Plugin Files“. Duane Storey has taken a crack at a “WordPress Plugin Checker“  for these and other common problems (which I’m certain he would enjoy feedback on).

WordPress.com’s Job System – Cron for PHP in Distributed Environment

Colleague Demitrious Kelly (meech, Apokalyptik) earlier this month open sourced the (Unix process) jobs system he (primarily) has been developing for WordPress.com. Not that I really understand it, but “jobs” is described as

A fast, distributed, horizontally scalable system built upon linux, php5.2, and mysql 5.1 wherein work can be stored in a database, and processed outside the flow of script execution. Examples of common things that are part of script execution but not necessary to the rendering of the response to the user might be spam scanning, statistical analysis, email notification sending, processing input data, etc. Also included is an equally distributed cron mechanism to remove single servers as a point of failure for scheduled jobs.

There are a lot of terms I like in there like fast, distributed, horizontally scalable, scheduled. It could probably benefit from robust and fault tolerant. Any others?

Anyway, this crontab-like system for PHP scripts is an essential part of our WordPress.com infrastructure, and I’m really excited to see it open sourced!

Check out code.trac.wordpress.org for other pieces of our puzzle that don’t have pretty project pages.

WordPress.com Still Blocked in China

I’ve seen some reports lately that “WordPress is blocked in China”, including some Mashable articles. To clarify, it’s WordPress.com that is blocked, not all sites that run self-hosted WordPress.

Mashable’s “China Blocks Twitter (And Almost Everything Else)” seems to suggest that the block relates to the 20th anniversary of Tiananmen massacre on June 4th. That may be the case for the other major web publishing and social networking sites, but WordPress.com has spent much of the time since the beginning of 2006 blocked by the Chinese government.

It’s an incredibly frustrating, sad situation.

In “Blogging guru chips away at Great Firewall of China” my boss Matt Mullenweg shares:

After some discussions, Mullenweg realised the site would be allowed back online if he agreed to block certain words or topics and give up information to the Chinese communist government about users.

“I started thinking about the DNA of the company,” he said. “That sort of company is not one I would wake up every day and feel passionate about working in.”

The site remains blocked, although Mullenweg, unable to suppress a giggle, points out that the official Chinese line insists it is freely available.

There was a break in the blocking around the time of the Beijing 2008 Olympic Games, but that ended with the games. That was the longest time I know of when people could consistently access WordPress.com from across China.

Part of the Chinese government’s approach seems to be to sometimes allow western hotels access and other specific points — likely to deceive Westerners and cause confusion.

There does not seem to be a reliable way to automate detection of WordPress.com being blocked, regardless of what tools might promise. I’m not surprised that http://greatfirewallofchina.org/ gave up. This is the message on the site’s homepage:

“Because of the ever stricter measures of censorship China imposes on the Internet, the team of www.greatfirewallofchina.org at present can no longer vouch for the reliability of its test tool. We have therefore decided to take the test tool offline.”

Herdict <http://www.herdict.org/>, a project of the Berkman Center for Internet & Society at Harvard University, seems to be a novel, survey based approach to find out which locations are blocking or censoring web sites.

The tool of choice to let people dodge surveillance is Tor <http://www.torproject.org/>. Please consider your own safety and technology expertise before using any such tools. Reporters without borders <http://www.rsf.org/-Anglais-.html> seems like an excellent resource if you are considering reporting from a dangerous place.

Monday, June 8th Update

A reliable source in China shares that Twitter is back. The same source also shares:

Specific blockages do appear to coincide with major events, like those in Tibet last year and the recent anniversary, but are also part of general and ever-changing blanket censorship.

The Twitter blockage is really the only new story of the last week (apart from 5 second delay foreign television news blackouts) but the news media wanted to turn it into a larger story, including the WordPress angle.

WordPress has been blocked for years now. Youtube has been blocked for the last 3 months. Twitter went done last week.

While the dates for the last two occurred at the same time as sensitive periods or events, I think both are more about controlling new forms of communication and networking than the particular events. Censorship in China is generally a one-way street with periods of activity ramping up around specific times. I think of it in the same way tax auditors get busy around tax season and government ministries around budget time. The difference being once a site is blocked by thePublic Security Bureau (PSB) here in China, it is very difficult to get it unblocked; given the public security connection in an already opaque closed-door administrative system. A good analogy is trying to get someone off a no-fly list in a bureaucratic security system that lacks transparency.

Domestic blogging sites are heavily controlled and censored (though in an ad hoc way). Chinese video sharing sites are coming under increasing regulation and many believe it was only a matter of time before Twitter, as the newest uncontrolled networking site, was shut down.

Mozilla SEO & Firefox Tips & Tricks Web Page Bugs

Update Thurs, May 7th (2 days later): Mozilla is working on the issue for Mozilla.com “Bug 491985 – Title tag changes for select product pages on Mozilla.com to help SEO rank “. To clarify, the improvement is more search engine clicks than ranking.

I provided some feedback to Mozilla just over a month ago about the Mozilla Firefox Start Page tip of handy tips & tricks (how meta):

“Get the most out of your Firefox! Improve your skills with some handy tips & tricks.”

I’m sure web browser developers share my passion for these web page details, but nothing has changed yet.

As I often see other sites with similar issues, I might as well share this web development tip & trick ;-) and other suggestions.

<Title> Tags

First, the <title> field is bad SEO. Says
<title>Mozilla Products | Tips &amp; Tricks</title>
instead of including “Firefox”:
<title>Firefox Tips &amp; Tricks | Mozilla Products </title>

Actually, all the product pages are likely in need of switching the “Mozilla Products” to the end.

This made a big difference for WordPress.com search traffic way back when.

I work with many of our WordPress.com VIP new customers on this issue. Their instinct is to always have their brand or blog name first. But think of which search result you would be more likely to click on? In fact, WordPress historically made it to easy to get this wrong, so in version 2.5 a 3rd parameter ‘seplocation’ was added to wp_title() to make it easier to do it correctly.

So http://www.mozilla.com/en-US/products/ title would become

<title>Firefox Web Browser &amp; Thunderbird Email Client | Mozilla Products</title>
(Plus title case for the win.)

I suggested they give it try and see what happens ;-) I’d be surprised if it does not squeeze a little more juice out.

Wow, there are lousy <title> tags all over their sites ;-)

http://www.mozilla.org/projects/ title is just <title>Featured Projects</title> Hopefully, David Boswell will have a chance to coax out of someone some work here during the current redesign ;-)

Firefox Tips & Tricks

The Manage Your Downloads is an advanced tip? Say what?

“Find it a Flash” intermediate tip reads:

The Find As You Type feature is another handy timesaver. Rather than
using the “find” bar to search for a word on page, just click anywhere
on that page and start typing the word you want. Your cursor will
immediately jump to the first instance of that term.

“You can use it for links, too. For example, instead of moving your
mouse across the page to a “learn more” link, just start typing the
word and when the cursor finds it, press enter.

It does not say that this is disabled by default, and can be enabled at Advanced > Accessibility or any other hint or tip ;-) Also, the phrase “on page” feels awkward, maybe “on a page”.

PS. I would not recommend enabling this, because it breaks some web apps that have click to edit.

Interested in Freeing Yourself from the TypePad Trap?

My co-worker Noel Jackson, tired of hearing me whine about the Six Apart TypePad Trap, has created a WordPress importer mashing together the MT formatted export file (missing permalinks) and the broken TypePad AtomPub (missing comments and trackbacks). We are currently testing this on WordPress.com before polishing the code up and sharing it. We are looking for some TypePad customers to help us test it — it’s completely harmless, read-only.

If you are interested, let me know and we can set up a private blog on WordPress.com for you to import into. Bonus is that you will have a backup of your blog ready to go live if anything ever befalls TypePad.

Continue reading

WordPress, Gears, Offline, Privacy

WP GearsGoogle Gears has been enabled on WordPress.com for a couple of weeks now for some members, but was only announced this week. Andrew Ozz (azaozz) added this feature a couple of month ago in the development version of self-hosted WordPress. I’ve been using it for about a month, and even though I have a decent internet connection (15156 kbps measured), I really notice how quick Gears makes the visual editor’s Insert Link popup pop. Over all, it feels a little quicker.

Reading some of the comments there is some confusion about whether this allows an offline mode of WordPress and also about the privacy of using this Google browser add-on.

Continue reading

5 Years of WordPress!

Today, people all around the world are celebrating that five years ago today the first version of WordPress was released!

Of course, most people’s celebration is limited to Happy Birthday WordPress posts. It’s awesome reading them; most posts (subtlety) demonstrate the authors own participation in WordPress. We’re all the developers of WordPress!

Continue reading