Skip to main content

PHP-Check

Updated over 3 months ago

It is important to know the PHP version of your website to ensure that your applications or scripts run smoothly. An easy way to check this is by creating an info.php file. This allows you to display the PHP version of your website directly in the browser.

Here is a step-by-step guide:

How to check the PHP version of your website

1. Create the info.php file

  • Open a text editor

  • Insert the following code:

<?php 
phpinfo();
?>
  • Save the file with the name info.php

2. Upload the file to your web server

  • Connect to your web server via FTP or through your hosting provider’s file management tool.

  • Upload the info.php file to the root directory of your website, usually located in the /public_html folder.

3. Open the file in your browser

  • Open your browser and navigate to the URL where you uploaded the file. For example:

http://domain.com/info.php
  • A page will appear showing all the information about your PHP installation, including the PHP version.

Why it is important to know the PHP version

  • Compatibility: Modern applications and plugins often require specific PHP versions. If your version is too old, malfunctions can occur.

  • Security: Older PHP versions may contain security vulnerabilities. It is therefore advisable to always use the latest supported version to minimize security risks.

With this method, you can quickly and easily determine your website’s PHP version and ensure that it meets the requirements of your applications.

Did this answer your question?