"Hacking" Wordpress 2.7 MU pre-release

Alright… one of my good friends wanted a Wordpress blog… I’ve been thinking of migrating this blog (Jacob’s Weblog - Time is always against me) along with another blog on my webserver to Wordpress… that’s 1 2… 3 Wordpress installations.

I went to the Wordpress website and finds they recently released a new version (version 2.7). After downloading it and falling in love my good friend points me to Wordpress MU Why maintain 3 Wordpress installations when you can maintain a single probably 10x times as complex one?… I like a challenge.

The first part of the challenge was that Wordpress MU hasn’t been released in a 2.7 version yet. Well I fetched it right from trunk (revision 1616) and installed. Then created two blogs on two different domains and created users for the blogs on the different domains. Second part of the challenge was that users attached to the second domain couldn’t login and was just redirected back to the login screen.

I described my problem in detail on the Wordpress forum in the hope of some mighty Wordpress MU guru would serve me the solution on a silver platter… that wasn’t the case.

I can get stubborn sometimes and the last 2 months we had a php development project on work so I figured: “How hard can it be?” After an a few hours (first spend googling for debugging Wordpress) I ended up using lots of echo, if and exit - there is no school like the old school :D

Now I think I found a solution and it wasn’t code changes. I needed som changes to the data in the database. You will find a table named wp_site where you will need to add your second domain (and third… etc.) Now browse the table wp_blogs and change the site_id so it matchs the site id for the domain in wp_site.

I still need to test this out but so far it looks good :D

The third challenge will be to make my domains work with www. prepended. But I’ll save that for another time.

Creative Commons License
"Hacking" Wordpress 2.7 MU pre-release by Jacob Emcken is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.