Struggling with WordPress 2.3
September 25th, 2007Salmonella Dub – Watching it Rain

WordPress 2.3 is out but it refuses to behave when I run the upgrade, spitting up a 500 Internal Server Error message. And of course absolutely nothing shows up in the web server error logs. I’ve nuked deprecated tables (i.e unused spamkarma, shortstats etc) from my database and done everything short of overhauling the entire database by hand, all to no avail. Fortunately I was able to restore this site from a backup and I’ve instead upgraded to the latest release in the 2.2 branch, 2.2.3.
For people who have installed 2.3 to find that you’re receiving a 500 Internal Server Error or a similar issue that is preventing your site from working, simply install 2.2.3 over the top and you should be up and running again. At least enough to further investigate why 2.3 isn’t working for you. This of course assumes that you haven’t touched your database at all i.e you have not run upgrade.php yet. If you have managed to run upgrade.php, and 2.3 is giving you trouble, going back to 2.2.3 will get you nowhere due to the major changes in the database and you have two options – press forward and figure out 2.3′s issues, or drop your database and restore it from backup before rolling back to 2.2.3
For people considering upgrading to 2.3, ensure that you:
- Disable All Plugins and check for compatibility with 2.3
- Backup your site and database. A lot of WordPress admins have been complacent on this one, myself included. 2.3 is a BIG upgrade and has a lot of underlying database changes, if you don’t back up, and the 2.3 upgrade dribbles acid all over your database, you have only yourself to blame. A 2.3 upgrade is an occassion where backing up IS essential.
- It might help to switch your theme to the default, WordPress 2.3 introduces a few new tricks that will break most existing themes. You can fix your themes though, but it’d pay to leave that until after you’ve got the 2.3 foundation working
- Copy your wp-config.php file to somewhere safe, yes, back that file up AGAIN
Here’s how I’d currently do an upgrade to 2.3:
- Download 2.3 and extract it to your desktop. Usually it extracts to /path/to/your/desktop/Wordpress/ which is only really of use to people who have WordPress blogs in a directory called WordPress, e.g http://rawiriblundell.com/Wordpress/. What you’ll find is if you upload the archive to your host and then extract it, it’ll extract to /Wordpress regardless of whether you’re using that directory or not, which may or may not make a mess. It makes a mess for me, so I do my upgrades in a different manner as explained here
- Grab your wp-config.php and place it within the /Wordpress/ directory on your desktop
- Archive the contents of the /Wordpress/ directory.
- Disable plugins
- Set your theme to default
- Upload your custom archive to your hosting. If, like me, you don’t use a /Wordpress directory for your blog, you simply extract the archive in your site root. If you do use a directory for your blog, simply move the archive to that directory and extract it there
- Test! All going well, a WordPress message should pop up asking you to update the database, do so. If it fails and starts spewing up error messages, copy the messages down and revert to 2.2.3
- Awaken the beasts. Re-enable your plugins one by one. If it all turns to crap, well, I’ve blogged about how to get out of this situation before
UPDATE:
I managed to get logging working and I’ve managed to glean this:
[Wed Sep 26 03:16:27 2007] [error] [client 203.110.28.91] Premature end of script headers: /hsphere/local/home/myaccountnamethankyouverymuch/rawiriblundell.com/wp-admin/upgrade.php
Error in vphp.c on line 344: Inappropriate permissions set on script
Well now, that’s interesting. It seems that when extracting 2.3 over the existing site, no matter where you go you’ll get redirected to upgrade.php – standard stuff – and it fails out to a 500 and gives the above in the error logs – not standard stuff. What’s even more interesting is that this occurs when I revert to 2.2.3 and try to manually run the 2.2.3 version of upgrade.php. It seems that perhaps upgrade.php is trying to call a file that it can’t get access too, so I guess I think the next step is to do a fresh install of WordPress 2.3 elsewhere and compare file permissions between a working 2.3 and a non-working 2.3 to see if I can see any discrepancy.
The alternative is I nuke everything, install 2.3, import the 2.2.3 database and manually apply fixes, though this is roundabout, doesn’t really solve the core problem and is pretty hackish and messy.
UPDATE II:
Over the last few days, I have setup a couple of test subdomains and attempted to install WordPress 2.3 from scratch – the same problem occurs! Using a phpinfo I discovered that php was only getting some 8megs of ram, so I added the following lines to a .htaccess file:
php_value memory_limit 32M
php_value post_max_size 16M
phpinfo and my ego are now satisfied on that, but again – the problem remains. So on the advice of my host I tried a chmod -R 755 and again there’s no difference. It makes no sense – the file permissions are fine, the underlying server is fine, the database connectivity is fine – all we have is a vague vphp.c error log entry, and from what I can tell of that section of vphp.c is about posting changes. It seems that I’m going to have to manually nurse this upgrade by hand
UPDATE III:
I have updated my database to UTF-8 using g30rg3_x’s plugin, so that’s one big thing out of the way. I have also tested database connectivity and tweaked for better performance. Alas, no difference on the 500 Internal Server Error though
At least now it looks like I’m not the only one, and it seems to be on FreeBSD servers where this problem crops up.
UPDATE IV:
I have continued investigation about this problem and posted my findings.
UPDATEÂ V:
This has been fixed

Sorry, but I don’t see it that way, and I don’t buy into this “woe is us” style of Maori-dom taken up by some either.


