{"id":7002,"date":"2009-04-08T21:11:49","date_gmt":"2009-04-08T15:41:49","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=7002"},"modified":"2026-10-07T20:36:30","modified_gmt":"2026-10-07T15:06:30","slug":"upgrade-php4-to-php5","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/","title":{"rendered":"How to Upgrade PHP Version (From PHP4 to PHP5 to PHP 8)"},"content":{"rendered":"<p>Still running an old PHP version on your web host? Back in 2009 we had to <strong>upgrade PHP4 to PHP5<\/strong> on our own blog after a string of internal server errors. Today nobody should be on PHP 4 or 5 at all &#8211; but the same question still matters in 2026: how do you upgrade your site to a current, supported PHP version safely? This guide shares our original upgrade story and the modern, step-by-step way to switch to PHP 8.x on any hosting control panel.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-63564\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026.webp\" alt=\"upgrade php version on hosting\" width=\"1200\" height=\"630\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026.webp 1200w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026-300x158.webp 300w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026-1024x538.webp 1024w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026-150x79.webp 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/upgrade-php-version-2026-768x403.webp 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<div class=\"quick-answer\" style=\"border-left: 4px solid #F28C1E; background: #f6f8fb; padding: 14px 18px; margin: 18px 0;\"><strong>Quick answer:<\/strong> PHP 4 and PHP 5 are long dead and unsafe. Back up your site, update WordPress, themes and plugins, then change the PHP version from your host&#8217;s control panel (cPanel <em>MultiPHP Manager<\/em> or <em>Select PHP Version<\/em>, Hostinger <em>PHP Configuration<\/em>, DreamHost <em>Manage Websites<\/em>). Choose PHP 8.3 or newer, then test your site. Most hosts let you switch back if something breaks.<\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6af00a9cb8bca\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #1a202c;color:#1a202c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6af00a9cb8bca\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Our_story_upgrading_PHP4_to_PHP5_in_one_click\" >Our story: upgrading PHP4 to PHP5 in one click<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Which_PHP_version_should_you_use_in_2026\" >Which PHP version should you use in 2026?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#How_to_upgrade_your_PHP_version_safely\" >How to upgrade your PHP version safely<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#1_Check_your_current_PHP_version\" >1. Check your current PHP version<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#2_Take_a_full_backup\" >2. Take a full backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#3_Update_WordPress_themes_and_plugins\" >3. Update WordPress, themes and plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#4_Test_compatibility_optional_but_smart\" >4. Test compatibility (optional but smart)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#5_Change_the_PHP_version_in_your_control_panel\" >5. Change the PHP version in your control panel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#6_Test_your_site_and_check_error_logs\" >6. Test your site and check error logs<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Why_upgrading_PHP_is_worth_it\" >Why upgrading PHP is worth it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#FAQ\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Can_I_still_upgrade_PHP4_to_PHP5\" >Can I still upgrade PHP4 to PHP5?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Will_upgrading_PHP_break_my_WordPress_site\" >Will upgrading PHP break my WordPress site?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#What_is_the_best_PHP_version_for_WordPress_in_2026\" >What is the best PHP version for WordPress in 2026?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/upgrade-php4-to-php5\/#Can_I_downgrade_PHP_if_something_goes_wrong\" >Can I downgrade PHP if something goes wrong?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Our_story_upgrading_PHP4_to_PHP5_in_one_click\"><\/span>Our story: upgrading PHP4 to PHP5 in one click<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Irritated by internal server errors, I <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/04\/find-server-php-version\/\">checked the PHP version<\/a> of our WordPress hosting server and realized our blog was still running PHP 4.4.9, though PHP 5.2.9 was the latest version available. The PHP project had already ended support for PHP 4 on 31 December 2007 and recommended everyone move to PHP 5.2. But the official download did not tell a blogger what to actually do with it &#8211; it looked too technical without professional support.<\/p>\n<p>Our host, DreamHost, had announced in August 2008 that new domains could no longer use PHP 4. Our existing server had simply never been switched over. The DreamHost panel usually lets non-technical webmasters do powerful things in a few clicks, and after some browsing I found the option at <em>Domains &gt; Manage Domains &gt; Edit Domain<\/em>:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7004\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/php4-php5.gif\" alt=\"php4 to php5 option in DreamHost panel (2009)\" width=\"364\" height=\"69\" \/><\/p>\n<p>There was a drop-down to choose the PHP version. I selected PHP 5.2.x and got this message:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7005\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/php5-upgraded.gif\" alt=\"php5 upgraded message (2009)\" width=\"465\" height=\"182\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/php5-upgraded.gif 465w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/php5-upgraded-300x117.gif 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/p>\n<p>Five minutes later, when I checked again, we were running PHP 5.2.6. Fast and simple. Back then you could not switch back to PHP 4 once you upgraded &#8211; the option simply disappeared from the panel.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Which_PHP_version_should_you_use_in_2026\"><\/span>Which PHP version should you use in 2026?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>According to the official <a href=\"https:\/\/www.php.net\/supported-versions.php\" target=\"_blank\" rel=\"noopener\">PHP supported versions<\/a> page, these branches are supported as of late 2026:<\/p>\n<ul>\n<li><strong>PHP 8.5<\/strong> (released November 2025) &#8211; security support until end of 2029<\/li>\n<li><strong>PHP 8.4<\/strong> &#8211; security support until end of 2028<\/li>\n<li><strong>PHP 8.3<\/strong> &#8211; security support until end of 2027<\/li>\n<li><strong>PHP 8.2<\/strong> &#8211; security fixes only, ending 31 December 2026<\/li>\n<\/ul>\n<p>Everything older &#8211; PHP 4, PHP 5, PHP 7.x, 8.0 and 8.1 &#8211; is end of life and gets no security fixes. <a href=\"https:\/\/wordpress.org\/about\/requirements\/\" target=\"_blank\" rel=\"noopener\">WordPress recommends PHP 8.3 or greater<\/a>. It still runs on PHP 7.4 for legacy hosts, but WordPress itself warns that end-of-life versions may expose your site to vulnerabilities.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_upgrade_your_PHP_version_safely\"><\/span>How to upgrade your PHP version safely<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1_Check_your_current_PHP_version\"><\/span>1. Check your current PHP version<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In WordPress, go to <em>Tools &gt; Site Health &gt; Info &gt; Server<\/em> to see the PHP version. You can also <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/07\/find-wordpress-php-mysql-versions\/\">find your WordPress, PHP and MySQL versions<\/a> with the other methods in our guide.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Take_a_full_backup\"><\/span>2. Take a full backup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Back up files and the database using your host&#8217;s backup tool or a backup plugin. If the upgrade breaks something, you can restore in minutes.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Update_WordPress_themes_and_plugins\"><\/span>3. Update WordPress, themes and plugins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Old plugins and themes are the main reason sites break after a PHP upgrade. Update everything first, and replace plugins that have not been updated in years.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Test_compatibility_optional_but_smart\"><\/span>4. Test compatibility (optional but smart)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your host offers a staging site, switch the staging copy first. Developers can also scan code with tools like <a href=\"https:\/\/github.com\/PHPCompatibility\/PHPCompatibility\" target=\"_blank\" rel=\"noopener\">PHPCompatibility<\/a> for PHP_CodeSniffer.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_Change_the_PHP_version_in_your_control_panel\"><\/span>5. Change the PHP version in your control panel<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>cPanel hosts:<\/strong> open <em>MultiPHP Manager<\/em> (or <em>Select PHP Version<\/em> on CloudLinux servers), pick your domain and choose PHP 8.3 or newer.<\/li>\n<li><strong>Hostinger:<\/strong> in hPanel, open your website&#8217;s <em>Advanced &gt; PHP Configuration<\/em> and select the new version.<\/li>\n<li><strong>DreamHost:<\/strong> go to <em>Websites &gt; Manage Websites<\/em>, open the site&#8217;s settings and change the PHP version.<\/li>\n<li><strong>Managed WordPress hosts:<\/strong> look for a PHP version setting in the site dashboard, or ask support to switch it.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"6_Test_your_site_and_check_error_logs\"><\/span>6. Test your site and check error logs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Open the home page, a few posts, the admin area, forms and checkout pages. If you see a white screen or errors, check the PHP error log in your control panel. Unlike our 2009 experience, most hosts now let you switch back to the previous version while you fix the problem.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_upgrading_PHP_is_worth_it\"><\/span>Why upgrading PHP is worth it<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Security:<\/strong> unsupported PHP versions get no fixes for known vulnerabilities.<\/li>\n<li><strong>Speed:<\/strong> PHP 8.x is much faster than PHP 5 and 7, so pages generate quicker with the same hosting.<\/li>\n<li><strong>Compatibility:<\/strong> new WordPress features and plugins increasingly require modern PHP.<\/li>\n<\/ul>\n<p>While you are at it, consider <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/05\/hide-php-version-in-site-headers\/\">hiding the PHP version in your site headers<\/a> so attackers can&#8217;t see it easily.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_still_upgrade_PHP4_to_PHP5\"><\/span>Can I still upgrade PHP4 to PHP5?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You shouldn&#8217;t. PHP 5 reached end of life in 2018. If you are on PHP 4 or 5, go straight to a supported PHP 8 version, after updating or replacing old code.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Will_upgrading_PHP_break_my_WordPress_site\"><\/span>Will upgrading PHP break my WordPress site?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Usually not, if WordPress, your theme and plugins are up to date. Outdated or abandoned plugins are the most common cause of errors, so update and back up first.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_best_PHP_version_for_WordPress_in_2026\"><\/span>What is the best PHP version for WordPress in 2026?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>PHP 8.3 or newer. WordPress recommends 8.3+, and PHP 8.4 and 8.5 are also actively supported.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_downgrade_PHP_if_something_goes_wrong\"><\/span>Can I downgrade PHP if something goes wrong?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>On most modern hosts, yes. You can pick the older version again in the same control panel setting while you fix the issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Still running an old PHP version on your web host? Back in 2009 we had to upgrade PHP4 to PHP5&#8230;<\/p>\n","protected":false},"author":4,"featured_media":63564,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[25],"tags":[49,17],"class_list":["post-7002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=7002"}],"version-history":[{"count":1,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7002\/revisions"}],"predecessor-version":[{"id":63565,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7002\/revisions\/63565"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/63564"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=7002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=7002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=7002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}