Tuesday, April 29, 2008

How to Update WordPress at Yahoo Small Business Hosting

You may have noticed that we’ve had some problems with the blog again. It turns out that it is rather complicated to upgrade WordPress if you are hosted at Yahoo Small Business.

The first time I tried to upgrade, I could no longer access the blog at all. All that came up was a blank screen in the browser. I couldn’t find a solution. Yahoo couldn’t help me. I gave up. I backed up the database with MyPhpAdmin, and recreated the blog from scratch. (To do this, backup all your images and customized files, etc, then create an sql backup of your database using MyPhpAdmin to export. You can dump your old database on the new installation – of the old version – by running the export as an SQL query. I got server 500 errors, but eventually one of them worked.)

After quite a bit of research and experimentation, the blog is now updated. Since Customer Care is unfamiliar with the host issues, and corporate HQ is unresponsive to contact from clients, I have recommended feature requests via email from Yahoo Small Business: a one-click update feature (or auto-updates) so that their version of WordPress is reasonably up-to-date, and a feature request/status page. In the meantime the addition of instructions to their online help files would be helpful.

WordPress has upgrading instructions here, with common installation problems here.

If you are on Yahoo Small Business, though, here’s what you’ve probably got to do (thanks to the resources at the WordPress codex and users’ forum – which were buried a bit, but there – and some very helpful advice from Ray that got me going on the right track).

I’ve documented everything, and I hope that this is a helpful post for other Yahoo-hosted bloggers.

First, update your plug-ins (Akismet will update by itself in the upgrade).
Use the WordPress backup plugin to do a backup of your WordPress directory. Download it for safekeeping. You can also use your friendly ftp program to download the entire WordPress directory onto your hard drive, too. (Better safe…)

Use MyPHPAdmin to export a back up your WordPress SQL database. Make several versions if you are unfamiliar with this. Make sure that use the right character set for export. Make one in the most recent sql, and any other format you might require – so that you have some options later if things look off.

Go to the WordPress dashboard and disable all your plugins. This will save you a lot of headaches. Just trust me (and the people at WordPress).

Now it gets complicated. From your WordPress backup on the hard drive, open the current wp-config.php file in the main directory. Delete the line “Define(’WP_CACHE’, true); //Added by WP-Cache Manager” and then save the file. Also save a copy of it under another name, like wp-configorig.php. You’ll need this file later.

Edit wp-config.php file in the main Wordpress directory that you downloaded and change DB_USER and DB_PASSWORD with your yroot user and yroot password and save the file. That’s the username and password you set up to administrate your databases. Yahoo describes these here: http://help.yahoo.com/help/us/webhosting/mysql/mysql-09.HTML. Ftp the new wp-config file.

Now run upgrade.php by browsing to http://YOURSITE.com/YOURBLOG/wp-admin/upgrade.php. It should succeed, in theory.

Before you go any further, look at your blog and make sure it’s there. Is it? If you get a blank page, then you’ve put the wrong yroot user and password in the config file. Make sure it’s right and try again.

If none of this is working for you, you’ll have to download the latest version of WordPress, ftp it up, and then run upgrade again.

You may have to play with the permissions settings in MyPhpAdmin. Make sure that you have any needed permissions. Customer Care can help you with this part if you run into trouble.

Assuming that your blog is up, check to make sure that your category links and other links are displaying. If you see an error like [Unknown column ‘link_count’ in ‘where clause’], you’ve got to detour at this point (Try a web search on the exact phrase of that error to get a sense of how many blogs are affected). If you’re upgrading from the version at Yahoo, there has been a major change in the way categories are indexed. I haven’t been able to find the perfect fix for this if the upgrade doesn’t do it, but there are two suggestions. The first didn’t work for me in MyPhpAdmin on Yahoo – perhaps because of yet more permissions issues, or maybe an older version of MySql – but you could try it because it’s probably the better fix:
Run this SQL query:
ALTER TABLE --database--.wp_categories ADD COLUMN link_count BIGINT(20) NOT NULL DEFAULT 0 AFTER category_count,

ADD COLUMN posts_private TINYINT(1) NOT NULL DEFAULT 0 AFTER link_count,

ADD COLUMN links_private TINYINT(1) NOT NULL DEFAULT 0 AFTER posts_private;


The second suggestion did work on Yahoo, but I hope it doesn’t mess anything up:
First, save your home copy of wp-admin/upgrade-functions.php under another name, like you did with the wp-config file. Then, edit the original file and delete where it says
// We are up-to-date. Nothing to do.
if ( $wp_db_version == $wp_current_db_version )
return;
Ftp it up and run upgrade.php again. Then upload the original version to restore it.

Now, go get the wp-configorigin.php you saved earlier. Rename it back to wp-config.php and ftp it up.

In your blog template, replace the current call for your blogroll with < ?php wp_list_bookmarks('title_after=&title_before='); ?>. Some of the older tags have been depreciated.

Enable your plug-ins one by one to make sure they are compatible. If something breaks the blog, use ftp or the online file management at Yahoo to delete the applicable folder from the wp-content/plugins.

Another problem solved: The bottom navigation on the index page disappeared. Some think that it has to do with plugins as well. I’m not running a “sticky post” plugin, which seems to be the primary problem for others. There is also a thought that there might be an incompatibility between the upgraded Akismet plugin and the Yahoo hosting. Aha! I fixed it by removing a call to the FAlbum plugin on the Index page.


Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

0 comments: