Upgrade to WordPress 2.3 with Language Switcher: Lessons learned

Well, it acutally WordPress 2.3.1, cause this version was out one day ago. Every blogger who use WordPress probably know that 2.3 has big changes. First, let’s look into the database schema: taxonomy, terms…hello, Drupal? Maybe, it will not long WP start call its posts as “Node”? I mean, WordPress database really changed a lot in this release; the nerdy-geeky names used in the WordPress database table reflecting that the method of manage content in modern CMS are becoming more and more abstract and complex also at the same time flexible. Other “big” changes including automatically inform upgrade information on plugins and core updates, built in tags and tag cloud support. This blog has run WordPress 2.2 smoothly for a couple months now, after a month the official 2.3 release, I finally sat down to upgrade my blog to take advantage of the new features.
Actually, the process of upgrading is very simple. But, as I am running a bilingual WordPress, so there are some other things need be taken care of, besides according the official WordPress upgrade guide.

First of all, I want to say, if you are also running a multilingual blog and use Language Switcher plugin, the plugin right now is at 1.09, supporting WordPress 2.3 flawless. I want to point out that the guide of set up a bilingual or multilingual blog published before on my blog should be considered seriously out date! Except that the part of introducing how to use PoEdit; you may still find the image illustration useful. Follow the official guide at poplarware! The article is pretty accurate in the terms of guide you through the process (except a very little one I think may need be point out later of this post).

The first lesson I was learned is always to use the official WordPress upgrade guide. There are many many articles in blogosphere talking about how to prepare “ERROR FREE” upgrading for your WordPress. These articles are great, however I think in the terms of “safe” you just need the official guide and carefully follow through it; besides, many these articles will say you should also refer to the official guide, they may provide more information of, for example, how to backup your data more safely and thoroughly, such as this article : “5 Step Failsafe upgrade for WordPress” recommend you creating an untouched online copy. I learned this lesson because I was forgot one little thing while I was doing the upgrade: DELETE THE OLD FILES! Yes! You need delete the old files with just some special exceptions before you load the /wp-admin/upgread.php as state at “Upgrading WordPress Extended“. This step can’t be over looked because in many local Windows (I don’t know if linux or Mac users has the same situation, since I am a Windows user) copy of WordPress, it seems you don’t need to delete the old WP files — just extract the new version of the WordPress files and overwrite the old ones, then load the upgrade.php file (after you first deactivate all your plugins of course). However, when you think everything is fine (it means you believe what you did was right) and switch to your live web hosting (I believe many are using linux hosting, so I don’t know if other type hosting is the same) to do the same — Oops! There are many database errors in your browser and the upgrade.php file just can’t load normally, and at this point, your website is literally frozen! — Thanks to the subversion I installed saved my day!—It took me a while that the thought of checking the official WordPress Document site has what to say occurred to me, because so many articles on the internet seldom to say “You have to delete the old files”! After I deleted the old files first, do as the official guide says, then upload the new version WordPress files, my upgrading was successful.—So, be sure to delete the old files before you do the upgrading.

The other lesson had something with the Language Switcher. As I said above in this post, the poplarware web page offered a very good the accurate guide, from fix your WordPress database before hand of the upgrading to internationalized your theme and plugins — Jennifer Hodgdon really did a great job, and the latest version of the plugin is almost perfect! However, I think there is a little catchy I want to point out. Ok, this is probably just because the words or terms the author chooses or the context the author takes, for somebody, they may be have no problem at all, because they already know that is the way to do it; but for me, or someone like me (hope there is, so this article can help someone :) ), believe it or not, it took me some time to find out. The thing is about the internationalized your theme which you will use it on your blog. After you “gettexted” your theme — you do notice that there is something different than before, right? you need choose your theme’s “text domain” —and after you translated your theme into your desired language use PoEdit, generated the PO file and MO file, you SHOULD name your file correctly! By “correctly”, I mean, “omit the country code from the MO file names.” may not enough; you should just leave your two-letter ISO code in your MO file. Since many plugin’s language files come with the plugin’s name, such as langswitch-zh.mo (Chinese); this is NOT the case as the theme’s language file!

For example, suppose your theme name is “my -theme”:
my-theme-zh.mo
is not OK!
zh.mo
is OK!

Upload your language file with the correct name into your theme’s home folder (a subdirectory under wp-content/themes), then your theme’s text domain will take affect.

Ok, thanks for read my post. I hope this article has helpful information on upgrade your WordPress and or Language Switcher. Enjoy the new WordPress!

2 Comments - Leave a comment
  1. Hello Wei,
    Your post about Language Switcher was a real savior to me , since I have been struggling to adapt Gengo to work with WP > 2.2 & 2.3 without success for many weeks now and didn’t knew that there was another multilingual plugin out there!
    Thanks & my best wishes!
    Nick

  2. David Adam says:

    Hi, Nick. Thanks for your comment. I think the most credit should give to the Language Switcher auther at poplarware! :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*