{"id":151680,"date":"2026-10-26T19:49:11","date_gmt":"2026-10-26T19:49:11","guid":{"rendered":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-check-your-php-version\/"},"modified":"2026-10-26T20:02:58","modified_gmt":"2026-10-26T20:02:58","slug":"how-to-check-your-php-version","status":"publish","type":"post","link":"\/au\/tutorials\/how-to-check-your-php-version\/","title":{"rendered":"How to check your PHP version"},"content":{"rendered":"<p class=\"wp-block-paragraph\">To check your PHP version, open your hosting control panel or WordPress Site Health for a live website, or run the <strong>php -v<\/strong> command in a terminal on a server or your own computer. There are five main methods.<\/p><ul class=\"wp-block-list\">\n<li><strong>Hosting control panel.<\/strong> Open the PHP information page, such as <strong>PHP Info<\/strong> in Hostinger dashboard.<\/li>\n\n\n\n<li><strong>WordPress.<\/strong> Go to <strong>Tools<\/strong> &rarr; <strong>Site Health<\/strong> &rarr; <strong>Info<\/strong> &rarr; <strong>Server<\/strong>.<\/li>\n\n\n\n<li><strong>phpinfo() file.<\/strong> Upload a one-line PHP file to your site and open it in a browser.<\/li>\n\n\n\n<li><strong>Command line.<\/strong> Run <strong>php -v<\/strong> in a terminal (the app where you type commands).<\/li>\n\n\n\n<li><strong>Local development environment.<\/strong> Run the PHP program that comes with your local tools.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Your live website, a server you manage remotely, and your own computer each have their own PHP, and the version a terminal shows doesn&rsquo;t always match the one serving your site.<\/p><p class=\"wp-block-paragraph\">Once you know your version, compare it with the PHP versions that still receive security fixes and with your host&rsquo;s security notices. Confirm that your site supports a newer version, such as 8.4, before you switch away from an outdated one.<\/p><p class=\"wp-block-paragraph\">We tested every method on October 22, 2026, on a Hostinger Unlimited web hosting plan with WordPress 7.1.3, a CloudPanel virtual private server (VPS) running Ubuntu 22.04, and a Mac.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-check-your-php-version-in-a-hosting-control-panel\">How to check your PHP version in a hosting control panel<\/h2><p class=\"wp-block-paragraph\">To check your PHP version in a hosting control panel, open the <strong>PHP information or PHP version page<\/strong> for your website. The menu name and location depend on your hosting provider and panel, so look for a dedicated PHP page or the PHP settings of each website.<\/p><p class=\"wp-block-paragraph\">Control panels read the version straight from the hosting server because<a data-click-id=\"hgr-post-content-link-au-tutorials-what-is-php\" aria-label=\"What is php\" href=\"\/au\/tutorials\/what-is-php\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-php-hypertext-preprocessor\" href=\"\/au\/tutorials\/what-is-php\/\" data-wpel-link=\"internal\" rel=\"follow\">PHP (Hypertext Preprocessor)<\/a> is a server-side scripting language that runs on the server, not in your visitor&rsquo;s browser. This makes the panel a quick check that needs no code or commands.<\/p><p class=\"wp-block-paragraph\">Whichever panel you use, the version number has two parts. In <strong>8.3.35<\/strong>, <strong>8.3<\/strong> is the branch, which sets the features and support dates, and <strong>35<\/strong> is the release, which increases with each round of bug and security fixes.<\/p><p class=\"wp-block-paragraph\">Hostinger dashboard and cPanel (a third-party panel) keep the version in different menus.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Check your PHP version in Hostinger dashboard<\/h3><p class=\"wp-block-paragraph\">In Hostinger dashboard, go to the <strong>PHP Info <\/strong>section of your website management, and the PHP version appears at the top of the page. You can<a data-click-id=\"hgr-post-content-link-support-5920192-how-to-check-the-php-version-in-hostinger\" aria-label=\"5920192 how to check the php version in hostinger\" href=\"\/support\/5920192-how-to-check-the-php-version-in-hostinger\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-check-the-php-version-in-hostinger\" href=\"\/support\/5920192-how-to-check-the-php-version-in-hostinger\/\" data-wpel-link=\"internal\" rel=\"follow\">check the PHP version in Hostinger<\/a> this way for every website on your plan, except those built with Hostinger AI Builder.<\/p><ol class=\"wp-block-list\">\n<li>Open <strong>Websites<\/strong> and click <strong>Dashboard<\/strong> next to your site.<\/li>\n\n\n\n<li>In the sidebar, go to <strong>Advanced<\/strong> &rarr; <strong>PHP Info<\/strong>, or type <strong>PHP Info<\/strong> in the sidebar search.<\/li>\n\n\n\n<li>Check <strong>PHP Version<\/strong> at the top of the page. A few rows below, <strong>Build Date<\/strong> shows when this copy of PHP was built.<\/li>\n<\/ol><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adfdb01c7de9\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adfdb01c7de9\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793041929387-0.png\/public\" alt=\"Hostinger dashboard PHP Info page showing PHP Version 8.3.35 and a Build Date of Oct 21 2026\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">In the same <strong>Advanced<\/strong> menu, <strong>PHP Configuration<\/strong> shows only the branch you selected, such as PHP 8.3. Use <strong>PHP Info<\/strong> when you need the exact release and build date, for example, to confirm that a security fix reached your site.<\/p><p class=\"wp-block-paragraph\">For WordPress sites, <strong>WordPress<\/strong> &rarr; <strong>Overview<\/strong> shows the branch on the <strong>PHP Version<\/strong> card, so you can check it without opening the WordPress admin dashboard. When Hostinger recommends a newer version, the card shows it with a <strong>Change<\/strong> button.<\/p><p class=\"wp-block-paragraph\">See how to check and change your PHP version in Hostinger dashboard in this video:<\/p><figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to check and update your PHP version on Hostinger (2026)\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/YJZO4DJu5jM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure><p>\n  <div class=\"youtube-shortcode\">\n    <div class=\"row\">\n      <div class=\"col-7 col-sm-8 d-flex align-items-center\">\n        <img decoding=\"async\" class=\"channel-logo\" src=\"https:\/\/www.hostinger.com\/au\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/youtube-channels\/hostinger-academy.jpg\" alt=\"youtube channel logo\">\n        <div class=\"d-flex flex-column justify-content-between\">\n          <span class=\"slogan d-none d-sm-block\">Subscribe For more educational videos!<\/span>\n          <span class=\"channel-name\">Hostinger Academy<\/span>\n                    <\/div>\n      <\/div>\n      <div class=\"col-5 col-sm-4 d-flex align-items-center justify-content-end\">\n          <a data-click-id=\"hgr-post-content-link-subscribe\" class=\"subscribe-button\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" href=\"http:\/\/www.youtube.com\/channel\/UCbNIC-svDbtUOH2qsLnPQPg?sub_confirmation=1\">\n            <img decoding=\"async\" src=\"https:\/\/www.hostinger.com\/au\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/icons\/youtube.svg\" alt=\"subscribe\">\n            <span>Subscribe<\/span>\n          <\/a>\n      <\/div>\n    <\/div>\n  <\/div>\n\n    \n\n\n\n<\/p><h3 class=\"wp-block-heading h-t-title-3\">Check your PHP version in cPanel<\/h3><p class=\"wp-block-paragraph\">In cPanel, check your PHP version under <strong>Software<\/strong> &rarr; <strong>MultiPHP Manager<\/strong> or <strong>Software<\/strong> &rarr; <strong>Select PHP Version<\/strong>, depending on which tool your hosting provider enables.<\/p><ul class=\"wp-block-list\">\n<li><strong>MultiPHP Manager.<\/strong> Lists each domain in your account next to its PHP version. <strong>Inherited<\/strong> means the domain takes its PHP version from an <strong>.htaccess<\/strong> settings file in its folder or a parent folder. The domain uses the server&rsquo;s default when no file sets one.<\/li>\n\n\n\n<li><strong>Select PHP Version.<\/strong> Shows the PHP version selected for your cPanel account in the <strong>Current PHP version<\/strong> dropdown menu. A domain uses this version only when its <strong>MultiPHP Manager<\/strong> setting matches the server&rsquo;s default. Hostinger&rsquo;s cPanel hosting uses this tool, which comes with the CloudLinux server operating system.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Both tools list versions by branch, such as 8.3, and neither shows a build date. For the exact release, open a <strong>phpinfo()<\/strong> file in the website&rsquo;s folder.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-check-your-php-version-in-wordpress\">How to check your PHP version in WordPress<\/h2><p class=\"wp-block-paragraph\">To check your PHP version in WordPress, open <strong>Site Health<\/strong> from the <strong>Tools<\/strong> menu, where the <strong>Server<\/strong> section lists the PHP version that runs your site. We tested these steps on WordPress 7.1.3.<\/p><ol class=\"wp-block-list\">\n<li>Log in to the WordPress admin dashboard with an administrator account, because only administrators can open Site Health.<\/li>\n\n\n\n<li>Go to <strong>Tools<\/strong> &rarr; <strong>Site Health<\/strong> and open the <strong>Info<\/strong> tab.<\/li>\n\n\n\n<li>Expand the <strong>Server<\/strong> section and find the <strong>PHP version<\/strong> row.<\/li>\n<\/ol><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adfdb01c8620\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adfdb01c8620\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793041933885-0.png\/public\" alt=\"WordPress Site Health Info tab with the Server section showing PHP version 8.4.26 and PHP SAPI litespeed\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">The <strong>PHP version<\/strong> row shows the exact release, such as 8.4.26. It doesn&rsquo;t show the build date, so use <strong>PHP Info<\/strong> or a <strong>phpinfo()<\/strong> file when you need it.<\/p><p class=\"wp-block-paragraph\">Site Health reads these values from the PHP that loads your dashboard, so they match your live website. The <strong>PHP SAPI<\/strong> row confirms it by naming the Server Application Programming Interface (SAPI), which is how PHP connects to your web server, such as <strong>litespeed<\/strong> or <strong>fpm-fcgi<\/strong>. <\/p><p class=\"wp-block-paragraph\">The <strong>Status<\/strong> tab on the same screen also flags outdated PHP versions and lists a version that no longer receives security updates as a critical issue.<\/p><p class=\"wp-block-paragraph\">WP-CLI, WordPress&rsquo; command-line tool, reports a different PHP: its <strong>wp cli info<\/strong> command shows the PHP WP-CLI runs on. On our test site, the command-line PHP version was 8.3.35, while Site Health showed 8.4.26.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-check-your-php-version-in-a-web-browser-using-phpinfo\">How to check your PHP version in a web browser using phpinfo()<\/h2><p class=\"wp-block-paragraph\">To check your PHP version with <strong>phpinfo()<\/strong>, <strong>upload a one-line PHP file to your website&rsquo;s folder and open it in a browser<\/strong>. The <strong>PHP Version<\/strong> line sits at the top of the page.<\/p><p class=\"wp-block-paragraph\"><strong>phpinfo()<\/strong> is a built-in PHP function that prints your PHP settings. It works on any host that lets you upload and run PHP files, unless the host turns the function off. Use it as a fallback when your hosting panel doesn&rsquo;t show PHP information, or when you need to check a folder or subdomain that runs its own PHP version.<\/p><ol class=\"wp-block-list\">\n<li>Open your website&rsquo;s folder, such as <strong>public_html<\/strong>, in your host&rsquo;s <strong>File Manager<\/strong> or a File Transfer Protocol (FTP) client.<\/li>\n\n\n\n<li><a data-click-id=\"hgr-post-content-link-create-a-phpinfo-file\" data-wpel-link=\"internal\" href=\"\/au\/tutorials\/how-to-create-phpinfo-file\/\" rel=\"follow\">Create a phpinfo file<\/a> and add random characters to its name, such as <strong>info-7f3k.php. <\/strong>Avoid common names like info.php or phpinfo.php, because automated scanners look for them.. Add this code:<\/li>\n<\/ol><pre class=\"wp-block-code\"><code>&lt;?php\nphpinfo()<\/code><\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Open <strong>https:\/\/domain.tld\/info-7f3k.php<\/strong> in your browser, replacing <strong>domain.tld<\/strong> with your domain.<\/li>\n\n\n\n<li>Check <strong>PHP Version<\/strong> at the top and <strong>Build Date<\/strong> in the table under it.<\/li>\n\n\n\n<li>Delete the file.<\/li>\n<\/ol><p class=\"wp-block-paragraph\">    <div class=\"announcement-block announcement-block--warning\">\n        <span class=\"announcement-block__heading\">\n            <svg width=\"24\" height=\"26\" viewBox=\"0 0 24 26\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n                d=\"M12 23.5C17.799 23.5 22.5 18.799 22.5 13C22.5 7.20101 17.799 2.5 12 2.5C6.20101 2.5 1.5 7.20101 1.5 13C1.5 18.799 6.20101 23.5 12 23.5ZM13.637 8.65198C13.637 7.74791 12.9041 7.01501 12 7.01501C11.0959 7.01501 10.363 7.74791 10.363 8.65198C10.5335 10.5375 10.875 14.383 10.875 14.383C10.875 15.0043 11.3787 15.508 12 15.508C12.6213 15.508 13.125 15.0043 13.125 14.383V14.38L13.637 8.65198ZM11.9927 16.714C11.3714 16.714 10.8677 17.2177 10.8677 17.839C10.8677 18.4603 11.3714 18.964 11.9927 18.964H12.0073C12.6286 18.964 13.1323 18.4603 13.1323 17.839C13.1323 17.2177 12.6286 16.714 12.0073 16.714H11.9927Z\"\n                fill=\"#BE1025\"\/>\n            <\/svg>\n            Warning        <\/span>\n        <p class=\"announcement-block__content\">\n            Delete the phpinfo file as soon as you finish. The page shows folder paths, installed add-ons, and server settings that can include passwords, and attackers use exact version details to find servers that lack security fixes.        <\/p>\n    <\/div>\n\n    <\/p><pre class=\"wp-block-code\"><code>&lt;?php\necho PHP_VERSION;<\/code><\/pre><p class=\"wp-block-paragraph\">The page then shows a single line, such as 8.3.35, without your server&rsquo;s settings. Delete this file after the check as well.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-check-your-php-version-using-ssh-or-the-command-line\">How to check your PHP version using SSH or the command line<\/h2><p class=\"wp-block-paragraph\">To check your PHP version using Secure Shell (SSH) or the command line, run <strong>php -v<\/strong> in a terminal on your computer or in an SSH session on your server:<\/p><pre class=\"wp-block-code\"><code>php -v<\/code><\/pre><p class=\"wp-block-paragraph\">The first line of the output shows the version, how PHP is running, and the build date, for example, <strong>PHP 8.3.35 (cli) (built: Oct 21 2026 00:00:00)<\/strong>. Here, <strong>cli<\/strong> stands for command-line interface (CLI), the PHP program your terminal runs.<\/p><p class=\"wp-block-paragraph\">On a remote server, connect through SSH first, which gives you an encrypted command line on that server. On Hostinger web hosting, search for <strong>SSH Access<\/strong> in your website&rsquo;s sidebar, turn it on, and copy the IP address, port, and username shown there.<\/p><p class=\"wp-block-paragraph\">Then connect from your terminal, replacing the placeholders with those values, and run <strong>php -v<\/strong>:<\/p><pre class=\"wp-block-code\"><code>ssh -p port-number username@server-ip<\/code><\/pre><p class=\"wp-block-paragraph\">Turn on <strong>SSH Access<\/strong> before connecting; otherwise, the connection closes right after you enter your password with the message &ldquo;\/sbin\/nologin: No such file or directory.&rdquo; We ran into this during testing, and enabling SSH Access fixed it.<\/p><p class=\"wp-block-paragraph\">To print only the version number, for example in an automated task, use this command instead:<\/p><pre class=\"wp-block-code\"><code>php -r 'echo PHP_VERSION, PHP_EOL;'<\/code><\/pre><p class=\"wp-block-paragraph\">Both <strong>php -v<\/strong> and <strong>php -r<\/strong> check only the command-line PHP. Tools like Composer (which installs PHP code libraries) and WP-CLI use the same PHP, as do scheduled tasks that run a PHP command.<\/p><p class=\"wp-block-paragraph\">Your website doesn&rsquo;t necessarily use the same PHP. A separate program called a PHP handler serves your website&rsquo;s visitors by running PHP for your web server. Tasks triggered through a web address use it too.<\/p><p class=\"wp-block-paragraph\">Examples include PHP-FPM (short for FastCGI Process Manager) and the LiteSpeed Web Server&rsquo;s own PHP, which Hostinger web hosting uses. The handler and the CLI are separate programs, so each runs its own PHP version.<\/p><p class=\"wp-block-paragraph\">Servers often keep several PHP versions side by side: our CloudPanel VPS had 10, and our Hostinger web hosting server had 17. On Debian and Ubuntu (two Linux systems for servers), list the PHP settings folders, then run a specific version by name to confirm it&rsquo;s installed:<\/p><pre class=\"wp-block-code\"><code>ls \/etc\/php\nphp8.4 -v<\/code><\/pre><p><div class=\"announcement-block announcement-block--important\">\n            <span class=\"announcement-block__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n                          d=\"M12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.5 17.799 6.20101 22.5 12 22.5ZM13.637 7.65198C13.637 6.74791 12.9041 6.01501 12 6.01501C11.0959 6.01501 10.363 6.74791 10.363 7.65198C10.5335 9.53749 10.875 13.383 10.875 13.383C10.875 14.0043 11.3787 14.508 12 14.508C12.6213 14.508 13.125 14.0043 13.125 13.383V13.38L13.637 7.65198ZM11.9927 15.714C11.3714 15.714 10.8677 16.2177 10.8677 16.839C10.8677 17.4603 11.3714 17.964 11.9927 17.964H12.0073C12.6286 17.964 13.1323 17.4603 13.1323 16.839C13.1323 16.2177 12.6286 15.714 12.0073 15.714H11.9927Z\"\n                          fill=\"#FEA419\"\/>\n                <\/svg>\n                Important\n            <\/span>\n            <p class=\"announcement-block__content\">\n                On Hostinger web hosting, <strong>php -v<\/strong> over SSH didn&rsquo;t follow the version selected in <strong>PHP Configuration<\/strong> during our test. After we switched a Unlimited web hosting site to PHP 8.4, the site ran 8.4.26, but <strong>php -v<\/strong> returned 8.3.35, even in a new SSH connection 10 minutes later.\n            <\/p><\/div>\n\n\n\n<\/p><p class=\"wp-block-paragraph\">To run a specific version on Hostinger web hosting, use its full folder path. The folders in <strong>\/opt\/alt<\/strong> list the extra PHP versions installed on the server:<\/p><pre class=\"wp-block-code\"><code>ls \/opt\/alt | grep php\n\/opt\/alt\/php84\/usr\/bin\/php -v<\/code><\/pre><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">To use another version in this SSH session, run <strong>export PATH=\/opt\/alt\/php84\/usr\/bin:$PATH<\/strong>, replacing <strong>php84<\/strong> with your branch. This puts that folder first in PATH (the list of folders your terminal searches for programs). Composer followed it in our test, but tools tied to one PHP file won't. Run <strong>php -v<\/strong> to confirm.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h3 class=\"wp-block-heading h-t-title-3\">Check the PHP version your web server uses on a VPS<\/h3><p class=\"wp-block-paragraph\">On a VPS that runs PHP-FPM, <strong>find which PHP-FPM version your site&rsquo;s web server settings point to, then run that version with -v<\/strong> to see its exact release. That version, not the command-line PHP, runs your website.<\/p><p class=\"wp-block-paragraph\">This matters on servers with several PHP versions installed. On our test VPS, which runs the CloudPanel control panel, <strong>php -v<\/strong> returned 8.2.31, while the website ran on PHP-FPM 8.0.30, a branch that no longer receives security fixes from the PHP project.<\/p><p class=\"wp-block-paragraph\">These steps apply to Debian or Ubuntu servers where the nginx web server connects to PHP-FPM on the same machine, as in our test VPS.<\/p><ol class=\"wp-block-list\">\n<li>Find which PHP-FPM address nginx uses by searching your site&rsquo;s nginx settings for the fastcgi_pass line. The <strong>sudo<\/strong> prefix runs a command with administrator rights:<\/li>\n<\/ol><pre class=\"wp-block-code\"><code>sudo grep -RHn '^[[:space:]]*fastcgi_pass' \/etc\/nginx\/sites-enabled\/<\/code><\/pre><p class=\"wp-block-paragraph\">The result is either a socket file, such as <strong>\/run\/php\/php8.3-fpm.sock,<\/strong> or a local address and port number, such as <strong>127.0.0.1:15001<\/strong>. A socket file is how nginx and PHP-FPM talk on the same machine. Some setups use a server name or a group of servers instead.<\/p><p class=\"wp-block-paragraph\">Run <strong>sudo nginx -T<\/strong> to print all nginx settings and find your site&rsquo;s <strong>fastcgi_pass<\/strong> line if the first command returns nothing for your site. That happens when the configuration file is located outside <strong>\/etc\/nginx\/sites-enabled<\/strong>.<\/p><ol start=\"2\" class=\"wp-block-list\">\n<li>Match that address to a PHP-FPM version. For a socket, the default names on Debian and Ubuntu include the branch, such as <strong>php8.3-fpm.sock<\/strong>. For a port, run this command, replacing <strong>15001<\/strong> with your port number:<\/li>\n<\/ol><pre class=\"wp-block-code\"><code>sudo ss -ltnp 'sport = :15001'<\/code><\/pre><p class=\"wp-block-paragraph\">The process name in the result shows your branch when it includes a version, such as <strong>php-fpm8.0<\/strong>. Check the site with a <strong>phpinfo()<\/strong> file instead if the name has no version or your socket has a custom name.<\/p><ol start=\"3\" class=\"wp-block-list\">\n<li>Check the exact release of the installed PHP-FPM program:<\/li>\n<\/ol><pre class=\"wp-block-code\"><code>php-fpm8.0 -v<\/code><\/pre><div class=\"wp-block-image wp-block-image aligncenter size-large\"><figure class=\"wp-lightbox-container\" data-wp-context='{\"imageId\":\"6adfdb01c9360\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6adfdb01c9360\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2026\/10\/1793041938198-0.png\/public\" alt=\"Terminal on a VPS showing php -v returning PHP 8.2.31 for the command line and php-fpm8.0 -v returning PHP 8.0.30\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" data-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.thisImage.buttonRight\" data-wp-style--top=\"state.thisImage.buttonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p class=\"wp-block-paragraph\">These commands read the server&rsquo;s settings and installed programs. To see the version your pages actually run on, open a <strong>phpinfo()<\/strong> file in the site&rsquo;s folder.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-how-to-check-your-php-version-in-a-local-development-environment\">How to check your PHP version in a local development environment<\/h2><p class=\"wp-block-paragraph\">In a local development environment, <strong>run php -v with the PHP program that comes with your local stack<\/strong> (the tools that run websites on your computer), such as <strong>C:xamppphpphp.exe -v<\/strong> for XAMPP. XAMPP, MAMP, and Docker containers set up for PHP each come with their own copy, separate from any PHP installed on the rest of your computer.<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Environment<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Command<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Notes<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Windows, Command Prompt<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>where php<\/strong><span>&nbsp;shows which <\/span><strong>php.exe<\/strong><span>&nbsp;runs<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Windows, PowerShell<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Use <\/span><strong>where.exe php<\/strong><span>, because <\/span><strong>where<\/strong><span>&nbsp;is a shortcut for a different command in PowerShell<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>macOS and Linux<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>which php<\/strong><span>&nbsp;shows which PHP runs<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>XAMPP on Windows<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>C:xamppphpphp.exe -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Path for the default installation folder<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>MAMP on macOS<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>\/Applications\/MAMP\/bin\/php\/php8.3.9\/bin\/php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Replace <\/span><strong>php8.3.9<\/strong><span>&nbsp;with a folder from <\/span><strong>\/Applications\/MAMP\/bin\/php<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Docker<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>docker compose exec app php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Replace <\/span><strong>app<\/strong><span>&nbsp;with the service name from your Docker Compose file to check PHP inside the running container (Docker&rsquo;s isolated environment for your app)<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">A &ldquo;command not found: php&rdquo; message on macOS, or &ldquo;&lsquo;php&rsquo; is not recognized as an internal or external command&rdquo; on Windows, means PHP isn&rsquo;t installed or its folder isn&rsquo;t in your PATH.<\/p><p class=\"wp-block-paragraph\">According to the<a data-click-id=\"hgr-post-content-link-php-net-install-macosx-php\" aria-label=\"Install.macosx\" href=\"https:\/\/www.php.net\/install.macosx.php\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"> <\/a><a data-click-id=\"hgr-post-content-link-php-manuals-macos-installation-page\" href=\"https:\/\/www.php.net\/install.macosx.php\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PHP manual&rsquo;s macOS installation page<\/a>, macOS hasn&rsquo;t included PHP since macOS 12 Monterey. Our test Mac returned the same &ldquo;command not found&rdquo; message.<\/p><p class=\"wp-block-paragraph\">A local version tells you nothing about the PHP on your live website. Check the hosting side separately before you publish code that needs a newer branch.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-which-php-version-is-your-website-actually-using\">Which PHP version is your website actually using?<\/h2><p class=\"wp-block-paragraph\">Your website uses <strong>the PHP version your web server runs<\/strong>, which is the one your hosting panel, WordPress Site Health, or a <strong>phpinfo()<\/strong> file shows, not always the one <strong>php -v<\/strong> reports.<\/p><p class=\"wp-block-paragraph\">Each environment needs its own check:<\/p><ul class=\"wp-block-list\">\n<li><strong>A live website. <\/strong>Use your hosting panel, WordPress Site Health, or a phpinfo() file.<\/li>\n\n\n\n<li><strong>A server you manage.<\/strong> Run <strong>php -v<\/strong> for the CLI, then check the PHP handler configured for your website, such as PHP-FPM.<\/li>\n\n\n\n<li><strong>Your computer.<\/strong> Run the PHP program from your local stack, such as XAMPP&rsquo;s <strong>php.exe<\/strong>.<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Only three methods show both the exact release and the build date, the two details that help you confirm a security fix.<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Method<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>What it reports<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Exact release<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>Build date<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Hostinger dashboard, <\/span><strong>PHP Configuration<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The branch you selected<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Hostinger dashboard, <\/span><strong>WordPress<\/strong><span>&nbsp;&rarr; <\/span><strong>Overview<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The selected branch and any recommended update<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>Hostinger dashboard, <\/span><strong>PHP Info<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The PHP version set for your hosting plan<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>cPanel, <\/span><strong>Select PHP Version<\/strong><span>&nbsp;or <\/span><strong>MultiPHP Manager<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The version per account or domain<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>WordPress <\/span><strong>Site Health<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The PHP running your WordPress site and its SAPI<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>phpinfo()<\/strong><span>&nbsp;file<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The PHP serving that folder and its handler<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>php -v<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>The command-line PHP<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Yes<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">In our Hostinger web hosting test, three checks reported PHP 8.3.35 with the same build date, but each used a different server API.<\/p><p class=\"wp-block-paragraph\">SSH showed <strong>Command Line Interface<\/strong>, the dashboard&rsquo;s <strong>PHP Info<\/strong> showed <strong>CGI\/FastCGI<\/strong>, and the <strong>phpinfo()<\/strong> file showed <strong>lsapi V8.3 CloudLinux 1.3<\/strong>, which is LiteSpeed&rsquo;s connection. Of these three, only the <strong>phpinfo()<\/strong> file went through the same connection as your visitors, making it the closest check of how your live site runs.<\/p><h3 class=\"wp-block-heading h-t-title-3\">Why does the PHP build matter for security patches?<\/h3><p class=\"wp-block-paragraph\">The PHP build matters because <strong>a security fix doesn&rsquo;t always raise the version number.<\/strong> so On Hostinger and Ubuntu, the build date or installed package version is the only sign that a fix is in place. Compare them with the security notice from your host or your server&rsquo;s operating system vendor.<\/p><p class=\"wp-block-paragraph\">For example, PHP2Shell is the name for two critical PHP security flaws disclosed on October 21, 2026. The public Common Vulnerabilities and Exposures (CVE) list tracks them as CVE-2026-109618 and CVE-2026-109619.<\/p><p class=\"wp-block-paragraph\">According to the <a data-click-id=\"hgr-post-content-link-php-projects-security-advisory\" href=\"https:\/\/www.php.net\/archive\/2026.php#2026-10-21-5\" target=\"_blank\" rel=\"noopener\">PHP project&rsquo;s security advisory<\/a>, PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35 fix both flaws, and every PHP installation that serves web pages is at risk until it runs a fixed build.<\/p><p class=\"wp-block-paragraph\">On Hostinger web hosting, the build date is the detail to check. Our test site ran PHP 8.3.35, one release below the PHP project&rsquo;s fix, and its <strong>Build Date<\/strong> read <strong>Oct 21 2026<\/strong>, the day the PHP project released the fix. The server&rsquo;s PHP 8.4.26 build showed the same date.<\/p><p class=\"wp-block-paragraph\">According to <a data-click-id=\"hgr-post-content-link-hostingers-php2shell-update\" href=\"\/blog\/protecting-php2shell\/\">Hostinger&rsquo;s PHP2Shell update<\/a>, managed hosting received the fix in each existing version, and a build date of October 21, 2026, or later confirms this.<\/p><p class=\"wp-block-paragraph\">Ubuntu&rsquo;s own PHP packages work the same way. It installs software as packages, and <a data-click-id=\"hgr-post-content-link-ubuntus-php2shell-notice\" href=\"https:\/\/ubuntu.com\/blog\/php2shell-vulnerability-fixes-available\" target=\"_blank\" rel=\"noopener\">Ubuntu&rsquo;s PHP2Shell notice<\/a> lists the fixed package for Ubuntu 24.04 as version 8.3.6-0ubuntu0.24.04.13, so <strong>php -v<\/strong> on a patched server still shows 8.3.6.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">To confirm a fix in a Debian or Ubuntu package, compare its full version, shown by <strong>dpkg-query -W php8.3-fpm<\/strong>, with your vendor's security notice. You can also search its change log for both CVE IDs with <strong>zgrep -E \"CVE-2026-(109618|109619)\" \/usr\/share\/doc\/php8.3-common\/changelog.Debian.gz<\/strong>.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><p class=\"wp-block-paragraph\">This command lists newer PHP packages available from your software sources on a Debian or Ubuntu server you manage. The list doesn&rsquo;t say which updates contain a fix, so compare their versions with the security notice:<\/p><pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; apt list --upgradable 2&gt;\/dev\/null | grep php<\/code><\/pre><p class=\"wp-block-paragraph\">Package versions depend on where your server gets PHP. Ubuntu&rsquo;s own packages keep the original version number, while third-party package sources often use the PHP project&rsquo;s numbers.<\/p><p class=\"wp-block-paragraph\">On our CloudPanel VPS, the list showed 8.2.35, 8.3.36, 8.4.27, and 8.5.12 waiting to be installed. Those are the PHP project&rsquo;s fixed releases. Nothing appeared for the website&rsquo;s PHP 8.0.<\/p><p class=\"wp-block-paragraph\">After installing an update, restart PHP-FPM so its running processes load the new build, replacing <strong>8.3<\/strong> with your branch:<\/p><pre class=\"wp-block-code\"><code>sudo systemctl restart php8.3-fpm<\/code><\/pre><p class=\"wp-block-paragraph\">Then check the version through your website again, because <strong>php -v<\/strong> alone doesn&rsquo;t confirm what your pages run on.<\/p><h2 class=\"wp-block-heading h-t-title-2\" id=\"h-what-to-do-if-your-php-version-is-outdated\">What to do if your PHP version is outdated<\/h2><p class=\"wp-block-paragraph\">To update an outdated PHP version, confirm that your site supports a newer branch, then <strong>switch to a branch that still receives security fixes<\/strong>.<\/p><p class=\"wp-block-paragraph\">According to<a data-click-id=\"hgr-post-content-link-php-net-supported-versions-php\" aria-label=\"Supported versions\" href=\"https:\/\/www.php.net\/supported-versions.php\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"> <\/a><a data-click-id=\"hgr-post-content-link-phps-supported-versions-page\" href=\"https:\/\/www.php.net\/supported-versions.php\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PHP&rsquo;s supported versions page<\/a>, four branches receive security fixes from the PHP project as of October 2026:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td colspan=\"1\" rowspan=\"1\"><p><strong>Branch<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>PHP project security support until<\/strong><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><strong>First release with the PHP2Shell fix<\/strong><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>8.5<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>December 31, 2029<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>8.5.12<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>8.4<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>December 31, 2028<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>8.4.27<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>8.3<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>December 31, 2027<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>8.3.36<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>8.2<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>December 31, 2026<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>8.2.35<\/span><\/p><\/td><\/tr><tr><td colspan=\"1\" rowspan=\"1\"><p><span>8.1 and older<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>Ended<\/span><\/p><\/td><td colspan=\"1\" rowspan=\"1\"><p><span>No new release, only code fixes for 7.4 to 8.1 that you build yourself<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure><p class=\"wp-block-paragraph\">PHP 8.2 stops receiving security fixes on December 31, 2026, so moving to PHP 8.3 or newer gives you more time before the next upgrade.<\/p><p class=\"wp-block-paragraph\">For WordPress sites, the<a data-click-id=\"hgr-post-content-link-wordpress-org-about-requirements\" aria-label=\"Requirements\" href=\"https:\/\/wordpress.org\/about\/requirements\/\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"> <\/a><a data-click-id=\"hgr-post-content-link-wordpress-requirements-page\" href=\"https:\/\/wordpress.org\/about\/requirements\/\" data-wpel-link=\"external\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">WordPress requirements page<\/a> recommends PHP 8.3 or greater.<\/p><p class=\"wp-block-paragraph\">Check four things before you switch branches:<\/p><ul class=\"wp-block-list\">\n<li><strong>CMS core.<\/strong> Update WordPress or your other content management system (CMS) to its latest version.<\/li>\n\n\n\n<li><strong>Themes and plugins.<\/strong> Check each developer&rsquo;s documentation or release notes for support of your target branch. The <strong>Requires PHP<\/strong> field on WordPress.org only lists the minimum version.<\/li>\n\n\n\n<li><strong>Custom code.<\/strong> Check the PHP requirement in your project&rsquo;s <strong>composer.json<\/strong> file, where Composer lists it, and any code written for an older branch.<\/li>\n\n\n\n<li><strong>Backup.<\/strong> Back up the site and, where possible, test the new branch on a staging copy (a private duplicate of your site).<\/li>\n<\/ul><p class=\"wp-block-paragraph\">Once these checks pass,<a data-click-id=\"hgr-post-content-link-au-tutorials-how-to-change-your-php-version\" aria-label=\"How to change your php version\" href=\"\/au\/tutorials\/how-to-change-your-php-version\/\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-change-your-php-version\" href=\"\/au\/tutorials\/how-to-change-your-php-version\/\" data-wpel-link=\"internal\" rel=\"follow\">change your PHP version<\/a> in your control panel, or install the newer branch&rsquo;s packages on a VPS.<\/p><p class=\"wp-block-paragraph\">On Hostinger<a data-click-id=\"hgr-post-content-link-au-web-hosting\" aria-label=\"Web hosting\" href=\"\/au\/web-hosting\" data-wpel-link=\"internal\" rel=\"follow\"> <\/a><a data-click-id=\"hgr-post-content-link-web-hosting\" href=\"\/au\/web-hosting\" data-wpel-link=\"internal\" rel=\"follow\">web hosting<\/a>, <strong>PHP Configuration<\/strong> offers PHP 8.2 to 8.5, and the version you select applies to every website on your hosting plan except those built with Hostinger AI Builder.<\/p><p class=\"wp-block-paragraph\">The dashboard warns that switching stops all running processes on your site and takes 1&ndash;2 minutes to complete.<\/p><p class=\"wp-block-paragraph\">Hostinger installs security fixes, such as the PHP2Shell patch, for your current version on every plan except VPS, but updating to a newer branch is up to you. On a VPS, you install all PHP updates yourself.<\/p><p class=\"wp-block-paragraph\">After switching, check the version again using <strong>Site Health<\/strong>, <strong>PHP Info<\/strong>, or a <strong>phpinfo()<\/strong> file to confirm that your website is running the new branch.<\/p><figure class=\"wp-block-image size-full\"><a data-click-id=\"hgr-post-content-link-au-web-hosting-2\" class=\"hgr-tutorials-cta hgr-tutorials-cta-web-hosting\" href=\"\/au\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/public\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>To check your PHP version, open your hosting control panel or WordPress Site Health for a live website, or run the php -v command in a terminal on a server or your own computer. There are five main methods. Your live website, a server you manage remotely, and your own computer each have their own [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/au\/tutorials\/how-to-check-your-php-version\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":356,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to check your PHP version: 5 methods","rank_math_description":"Learn how to check your PHP version in Hostinger dashboard, cPanel, WordPress, SSH, or locally, and what to do if your version is outdated.","rank_math_focus_keyword":"How to check your PHP version","footnotes":""},"categories":[22715],"tags":[],"class_list":["post-151680","post","type-post","status-publish","format-standard","hentry","category-technical-aspects"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-check-your-php-version","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-check-your-php-version","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/posts\/151680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/users\/356"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/comments?post=151680"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/posts\/151680\/revisions"}],"predecessor-version":[{"id":151681,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/posts\/151680\/revisions\/151681"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/media?parent=151680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/categories?post=151680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/au\/tutorials\/wp-json\/wp\/v2\/tags?post=151680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}