We upgraded our server from PHP4 to PHP5 today. Irritated by my internal server errors, I checked the PHP version of the wordpress hosting server and realized our blog was still hosted on the very old PHP4.4.9 version, though PHP5.2.9 version is the latest version available. So how to upgrade PHP4 to PHP5?
PHP4 is Obsolete, Get PHP5
A quick look at the PHP5 changelog will convince you that a lot has changed and PHP5 promises to be much faster, stable and secure than PHP4. Though PHP 5 offers many new features, it continues to be very compatible with earlier versions of PHP with little functionality being broken in the process.
Even the PHP official site notifies that support for PHP 4 has been discontinued since 31 Dec 2007 and they recommend everyone to upgrade to PHP 5.2, but I could not figure out a what to do after downloading PHP5.2. When I looked about for ways to upgrade PHP4 to PHP5, I found that it seems too technical and complicated for a blogger to perform without professional technical support.
I checked our Dreamhost hosting had announced in August 2008 that since PHP4 has been officially discontinued, you will no longer be able to set up a new domain as PHP4 or convert an existing PHP5 domain to use PHP4. Obviously our server had not been upgraded by default and PHP4 continued to serve us well. But the persistent internal server errors prompted us to probe deeper. I checked that the WordPress minimum requirements are still PHP version 4.3 or greater, so we were scraping the minimum requirement with PHP4.4
Upgrade PHP4 to PHP5 Easily
In my experience Dreamhost panel usually makes non-technical webmasters perform a lot of powerful stuff in a few easy clicks, so I looked around for this option… and actually found it after a lot of browsing. Dreamhost users can find the options at Domains > Manage Domains > Edit Domain
There was a drop-down option to choose your PHP version – I simply selected PHP5.2.x and got a message
And actually after 5 minutes when I checked our PHP version, it was upgraded to PHP5.2.6! Now that was fast and simple.
If you are on Dreamhost, you can also check and upgrade your PHP version. But remember you cannot switch back to PHP4 after switching to PHP5 as the option disappears from the panel after upgrade. If anything breaks, you are doing this at your own risk.Dreamhost