× PHP Version Test Update PHP Help & FAQs Get PHP Version Notifications Find a PHP Developer
PHP expiry alert : PHP v8.0 has recently expired. Is your website still running this version? Click here for more details
SAFE versions of PHP: 8.3.8, 8.2.20, 8.1.29

Determine the version of PHP running a website via PHP code

Setup a PHP Info file

It's possible to create a very simple file that you can upload to your web space that will output a list of environment settings about your web server's PHP environment. This step requires that you have access to upload a file to your public web space (either via FTP or a Control Panel website).

If you are at all uncomfortable uploading a file to your live website it is probably time to either

  1. Contact your internet service provider for help to determine your PHP version
  2. Find a developer to help you clarify this and undertake any update required.

Creating a phpinfo script

Assuming you are comfortable uploading a file to your web hosting just follow these very simple steps...

  1. Create a text file on your computer containing only the following line of code within it:

    <?php phpinfo(); ?>
  2. Save the file as something unique that ends with the .php extension. For example myphpversion.php
  3. Copy this file up to your web hosting space
  4. Now access it via a web browser at your domain name. Ie: http://yourdomain.com/myphpversion.php
  5. You should now see a white page with a large purple table. At the top of this your exact PHP version will be shown.
  6. Finally, very importantly; delete the file you just uploaded!

Do you now know your PHP version?

YES: Now that you know what version of PHP your server is running do you need to upgrade it? Check by reading this article.

NO: If you are still having problems working out your PHP version it's probably time to call for some professional PHP developer help.
Article last updated: 22nd October, 2020