Categories
Technology Weblogging

Survival guide to LAMP: Multiple weblog support in WordPress

M is for MySQL and P is for PHP

For the LAMP series, I’ve decided to focus on WordPress for the nonce. I’m anxious to dig in and start playing with the tool, not to mention migrate the rest of my weblogs. I’ll return to Textpattern at a later time; or we’ll see how Joseph Duemer does with his adventures in Txp land.

My next LAMP essay loads the Movable Type weblog into WordPress, and I’ll post that one in a moment. In addition to this writeup, I’ve also finished my first major tweak of WordPress 1.2, which is to provide emulated support for multiple weblogs. Though it may not be smooth as you’re used to with Movable Type, it is an approach that can be used by those who aren’t comfortable working with PHP.

My emulated multiple weblog support does require copying some–not all– some of the WordPress files into the new weblog directory, but once this has happened, it’s a simple matter of opening up the Switch Blogs page (found in the menu of WordPress after the menu.php file has been replaced) and adding the information about the weblog name, the URL for the WordPress wp-admin directory for the weblog, and the URL to view the weblog.

This information is added into a table (I have a PHP program that creates this), and is displayed in the Switch Blogs page each time it’s accessed. The image below shows what this new page looks like, and how it is integrated into the main WordPress 1.2 interface. Note that only the blogs owned by the person who added them are shown on the page.

I have a g’zipped file of the modified pages ready to look for those interested. If you’re experienced with PHP and/or WordPress and feeling brave–oh so brave–you can download it now and play with the files while I write up the procedure. All I ask is if you run into problems, or have suggestions, please let me know as soon as possible. The modified code is based on the first candidate release of WP 1.2. Follow good procedures and backup your replaced files.

Unzip the files into a temporary directory, and move the files (switch.php, menu.php, and install-multi.php) into your primary WordPress installation’s wp-admin directory. Note that the menu.php file will overwrite your menu.php, so if you’ve made customizations, beware and backup.

After moving the files, run install-multi.php to create the database table (wp_multi_blogs). Then, modify the Switch Blogs entry in menu.php to reflect the URL for your copy of the switch.php page. At this point, Switch Blogs should show in your menu, click on it and add your different weblog locations.

Create the database once, and install switch.php in just one location, but modify the menu.php for each WordPress installation.

More detailed how-to later; however the ease with which I could install this functionality demonstrates the ‘openness’ of both PHP and WordPress. After years of working with complicated frameworks such as J2EE and COM+, or crypic languages such as Perl, I’m finding that working with a language such as PHP is such a joy.

And there’s a new version of PHP coming out. Once this series moves beyond the work with WordPress, perhaps I’ll take a more detailed look at it. However, its unlike that PHP 5.x will be available on most systems for probably about a year, as widely used PHP applications such as PHPMyAdmin go through the upgrade process.

Or if it is available, it’s only so under a different naming convention. Hmm, I wonder if Hosting Matters has it installed…

Categories
Weblogging

Never kick a sleeping giant

Recovered from the Wayback machine.

Mark Pilgrim has also made the move to WordPress saying what the rest of us have been saying, that it’s not about the money (i.e. we’re not whining, cheap, spoiled free blogging shits). He wrote:

WordPress is Free Software. Its rules will never change. In the event that the WordPress community disbands and development stops, a new community can form around the orphaned code. It’s happened once already. In the extremely unlikely event that every single contributor (including every contributor to the original b2) agrees to relicense the code under a more restrictive license, I can still fork the current GPL-licensed code and start a new community around it. There is always a path forward. There are no dead ends.

No doubt this is going to encourage more people to make the move to WordPress. I can only hope that the people making this move be a bit patient at first–the tools are different. It will take time. Make sure you know what you’re doing before you hop.

As much of an impact as it is to see the first Technorati 100 make the jump from MT to WordPress because of the 3.0 upgrade, I think the more significant jump could be Scriptygoddess, an important member of the community providing tools and tricks and coding goodness to MT users. Jennifer is seriously considering moving to a PHP-based CMS , based in part on MT 3.0 and in part because she, like myself and others, likes to work with PHP.

Finally, if you’re hosted in Hosting Matters, as I am, and others of you are, don’t count on running the free version of Movable Type 3.0, as you can see in this thread. With that foolish and totally unexplainable single CPU restriction, very few hosts will allow the installation of MT 3.0 free on their sites.

However, and this is important: don’t count on staying with the old version of MT 2.6x either. Without corporate or even third party support, MT will soon become a security risk, as mentioned on the thread. If it does, the host will boot it.

Update

As Rogi noted in my oomments, and I spotted over at Michael Hanscome’s (with a snazzy new look, Michael being one of the first of the new Men In Pink), Six Apart has listened to the ‘constructive’ feedback the last few days and has updated their pricing and licenses.

(An update that already has 30+ trackback links, will be curious to see reactions.)

The single most important update was removing the single CPU restriction. This was critical: once companies like HM weighed in against the license because of it, others would soon follow, and this effectively shut people out of using the 3.0 upgrade. However, like Michael, I am left with a question:

Admittedly, I’m very curious about this one. If it wasn’t intended to be in the license, how did it get in there in the first place? And then stay there up to the point where it was posted to the website? Didn’t anyone (their lawyers, for example) go over this stuff with a fine-toothed comb first? This is the sole point that still really has my eyebrows raised.

The company has clarified that this new pricing is not retroactive to older versions of the product, which I didn’t think was an issue. However, there is still that concern of hosting companies about old versions of MT–just as no longer supported versions of Windows are prime targets for viruses (I have to wipe my roommate’s machine next week due to nasty bug in his Windows 98 install), a bunch of old, non-supported versions of MT can provide a risk to an ISP.

Six Apart has also changed the policy on multi-author, multi-weblog installations. The number of authors has been increased in the lowest personal purchased license, and the expanded licenses have increased counts. With this, my installation would have fit within the Personal Edition II license, with an intro offer of $149.95 (regularly $189.95). If I needed additional author/weblog pairs, I could purchase them at $9.95 each.

This is an improvement, but, frankly, if I were paying that much money, I would purchase ExpressionEngine, instead, which I looked at a couple of months ago. (Note: the products are no longer installed, and as a clarification, EE now has a Movable Type import utilitiy.) I found it to be a superior product to MT, and there is no limitation on authors/weblogs.

Still, I think that Six Apart made an important step with these clarifications, and by listening to what others have said. I also think it’s good that many of the people who are thinking of moving because of pricing won’t need to–for their sake and the sake of the tools such as WordPress, which may have been overwhelmed if the exodus became too extreme.

However, I had already planned on moving before the licensing issue, primarily because I felt that Six Apart was not communicating with its customers, and was keeping too many things close to the vest, as ‘corporate secrets’. This is a company that makes weblogging software, for personal and corporate use; yet weeks, even months would go by without a peep (including during the time when many of us were being overrun with comment spam). I also don’t care for the concept of using a tool that’s a ‘publishing platform’–as if our writing roots are like parents we don’t want to introduce to our hip new friends because they’re such hicks.

In addition, there are still a lot of unanswered questions about the benefits of the paid versus free upgrades. I notice that the order page still lists the following for the paid version, but not the free:

# Application updates and fixes (not including major upgrades)
# A guaranteed path to future versions
# Access to fee-based services such as installation, advanced support, other services

The implication here still is that MT 3.0 is the last free version. There’s also that restriction requiring MT upgraders to sign up for TypeKey to download the product, when we were assured that TypeKey would not be required for MT. This is a complete reversal from an earlier Six Apart communication. Why a MT upgrader must have TypeKey makes no sense.

More than past unhappiness with Six Apart, though, I really do want to provide more support for open source efforts. And I like WordPress, it’s so fun to tweak! So time to stop focusing on Movable Type and it’s upgrade, and face forward into a new environment, and new adventures.

But I respect Six Apart coming out with this clarification, and the new licensing, not to mention removing that bizarre single CPU restriction. And I wish the company and its employees continued success in the path of its choosing.

Second Update

I guess I can’t move on just yet. Not while I’m reading the makings of a growing misunderstanding.

From reading through the trackbacks to the Six Apart license update, I wanted to add my own clarification about the discussion of what is a ‘weblog’. The definition at Six Apart states:

In our licenses, we now address this with this language: “Weblog” means a single Web site viewable at a single URL (Uniform Resource Locator), consisting of one or more weblogs as generated by the Software via the “Create New Weblog” function of the Software.

People are making the leap that this means separate weblogs within the same domain are now considered one weblog; this is not what the new license is stating.

The license states that weblogs that are used as lists and embedded within another page are not separate weblogs; however, weblogs that can be viewed distinctive from another page, and have their own URL, are considered separate weblogs.

For instance, at a maximum, I had the following weblogs:

burningbird.net
weblog.burningbird.net
rdf.burningbird.net
linux.forpoets.org
semanticweb.forpoets.org
techtools.forpoets.org
internet.forpoets.org
tinfoilproject.com
tinfoilpresident.com
mirrorself.com
articles.burningbird.net
interactzone.burningbird.net

And well, the list goes on. Each of these is a distinctive sub-domain with its own URL, but a URL is not synonymous with domain.

None of these weblogs are used as ‘lists’ or included as content in another weblog page, as some people do for book lists or quick links. Under the license definition, these are separate weblogs– many of which are under one domain name, but still separate weblogs.

Technically, if one is feeling particularly pedantic, one could say that each page in a MT weblog has its own unique URL, and therefore the company can charge for each page–but splitting semantics this far is counter productive.

For additional reading on the issue of domains and URLs, in an ideal world, I would point you to the book, “Internet for Poets”, but, well, this is a book that hasn’t a home. Yet.

Third Update

This is the last update, I promise, but I don’t like FUD.

Tim Appnel comes out with another post on the MT license thing. That’s great who cares, except that he is deliberately misquoting, or quoting out of context, and I feel that clarifications are in order.

Appnel takes on Mark Pilgrim, writing:

Not everyone gets a regular pay check to bankroll their million dollar code projects. I don’t begrudge anyone who wants to use free software or develop it. (Why would I? I do both.) But I don’t think its fair to pounce on them for not doing so. Conversation is fine and freedom is great, but it doesn’t mean we all have free license to say rude and hurtful things with impunity – especially to people you claim to like.

I had to go back to Mark’s post to see the rude and hurtful things. What I read was a pretty objective statement, giving the reasoning behind Mark’s move to WordPress: Movable Type never was open source; it stagnated while Six Apart started TypePad (even the Trotts admitted this); TypeKey has attracted spammers already (nyah, nyah, told you so); the 3.0 development release is buggy; and he provided a pretty damn good explanation about why many of us like GPL. Oh, and the Trotts are nice people, and we all have a right to make money.

If these are ‘rude’ and ‘hurtful’ comments, then please, may I have so more rude and hurtful comments from folks? Especially when I talk about tech? Please, please?

As for implying that I was suggesting a ‘conspiracy’ because I, like others, was curious about how the single CPU restriction entered into the license, that’s just about the gummiest FUD I’ve seen on this whole Event. I agree with Appnel that the license probably was a copy from another product. However, I would assume that it would be looked over by the Trotts to ensure that this type of confusion doesn’t happen, because Hosting Matters was at a point of not allowing the product because of this ‘mistake’.

Mistakes in licenses are serious things. Folks are right to question these. People who plan on using Movable Type in the future should continue to question confusing language in the licenses.

What’s sad about this though, is that the ‘baby squirrel’ phenomena is still in effect for Movable Type and the Trotts and Six Apart, when I thought we’d grown beyond that.

What do I mean by the ‘kicking the baby squirrel’ phenomena? When we address technical issues or question pricing, and you perceive it as an attack on the people, that’s accusing us of kicking the baby squirrels. If you perceive any criticism of a company or a technology or a person’s writing or opinions, as an act of overt hostility, and respond with personal insults in return, that’s playing the kicking the baby squirrel card.

I hope those of us moving to other tools, don’t bring this “can’t kick the baby squirrels” phenomena along with us–I’d hate to see a weblogging tool like WordPress reverenced by a league of obsessed followers. I’d have to move tools, again, then.

Categories
Technology

Survival guide to LAMP: Rushing forward

I have put aside all efforts in regards to my bookbinding work, and all photography, and other writing about hikes or cats or life in miniature, in order to focus on finishing the LAMP series as quickly as possible. (Other than those efforts that pay the bills, of course.)

As I work on the next installment, a couple of caveats:

First, I’m going to be editing the last essay and removing the reference to using install-config.php for WordPress, replacing it with instructions on editing the configuration file. I had forgotten that to run install-config.php requires that the directory is writable, and this makes this choice the more complex installation routine to follow rather than the least.

Second, there seems to be confusion that one can’t charge for open source software. As I mentioned earlier in Spin City, you can charge, but you need to carefully set expectations for people using your software. Matt at WordPress has said they won’t charge, but even if they do, we can copy the software and go our own way if we wish–it’s open source. Dean Allen at Textpattern is contemplating charging for the commercial uses of his product, but he’s setting expectations at the start for this direction.

Software and ‘gotcha!’ don’t go together well.

Third, I will be talking about Textpattern and how to use it and demonstrate moving a Movable Type weblog to the product, and altering the templates, but I won’t be making any modifications to the underlying code for this product. Again, it is a single developer product, and not the one I’ve chosen for my own weblog. I’m reserving actual code changes to my work with WordPress, only.

As I continue writing on LAMP, I wouldn’t mind some feedback from people as to what they want to hear about in these essays. Consider this thread an open thread on this topic.

Categories
People

Dave speaks for me

I haven’t said anything about the beheading of Nick Berg, and I won’t other than to point out a comment thread on a posting at David Weinberger’s and state that Dave Rogers is both eloquent and thoughtful for a man who says, ‘What do I know? I make all this shit up.’

Whatever I could wish to say, he’s said it.

Nuff said.

Categories
Writing

It’s not all dark matter

I usually agree with Mark Morford but rarely have I found myself in such strong agreement with him, as I did with his column today.

He writes in response to the question: how can he write about dogs or yoga or sex in cars when there is so much evil in the world. He responds with:

The world’s tragedies absolutely deserve our immediate attention. And our hope. And our divine raw funky sexed-up intellectual perspective. This is not a question.

But what it needs even more is the counter-energy. For us all to remember to shut it all off and get the hell away from the computer and go have a glass of wine and a deep tongue kiss and a romp and a an intense book and a hot sweaty yoga class and a soft swoon to an incredible blues singer. This fuels the resistance. Rekindles meaning. Steals life back from those who would deign to devour it with pitchforks and judiciary committees and heavy artillery.

After all, real life is not in the dour headlines

Though I could have wished that he had left off his anger with Bush, because it detracts from his message, overall it is compelling reading with one important point: all of life is not dark matter, all the time.