How to Create phpinfo File and Check PHP Information

How to Create phpinfo File and Check PHP Information


Any software you want to run on your web server has its own parameters which should be met. For example, WordPress requires a minimum PHP version of 5.2.4. Depending on the server configuration, some PHP settings can be changed and some of them cannot, however, all of them can be found in a phpinfo file. This tutorial explains how to check the PHP information of your hosting account by using tools provided in the control panel or by creating a phpinfo file. In both cases, we will be able to check what PHP modules are enabled on the server and what their values are. This will also be useful when looking for your hosting account’s limitations, such as max_execution_time, memory_limit, post_max_size and others.

What you’ll need

Before you begin this guide you’ll need the following:

  • Access to your hosting control panel or FTP account

Option 1 – Checking PHP information via hosting control panel

On Hostinger, the account’s PHP information can be easily checked using PHP Info section. This is really convenient as there is no need to create any additional files on your hosting account. The PHP Info area can be found in the Advanced category of the dashboard.

PHP info section on Hostinger's control panel

After that, you will be forwarded to the screen where all the information about your current PHP version, modules, and values will be presented. To see extra settings, you will need to scroll down. In case you wish to find data about a specific module or function, you can use CTRL+F command to open a search box within your browser.

PHP info section screen

Congratulations! You have now learned how to access your phpinfo using a tool of the hosting panel.

Option 2 — Checking PHP information by creating a phpinfo.php file

In case your hosting platform does not have the feature presented in Option 1, there is no need to worry. It is possible to reach the same goal by creating a special file inside your hosting account. The following file will also present everything about your PHP version and will be accessible via a browser.

Step 2.1 — Creating the phpinfo file

There are a few ways to create phpinfo file. In this tutorial we will show how to do this using File Manager, however, the same result can be achieved by creating the file on your local computer and uploading it to the server later with the help of a FTP client.

Proceed by accessing your hosting control panel and open File Manager. Click File button to create a new file.

Create file

In the New File Name field enter phpinfo.php. In the second field you can specify the folder where you want to store your file. In most cases, you can enter /public_html here. This way the file will be created in your root website directory.

Once you are done, press the Create new file button.

Step 2.2 — Editing the file

At this step, you should already have a blank file named phpinfo.php in the public_html directory. Now select it and hit Edit button to edit the content.

Edit file

Now copy the following code and paste it into the text editor.

Once you are done, press Save Changes button.

Saving changes

That’s it, you have successfully created a PHP file which will output PHP environment settings. As mentioned earlier, the same result can be achieved by using any FTP client:

  1. Use any text editor and create a file named phpinfo.php on your computer.
  2. Edit the file and input the following code:
  3. Upload the file with an FTP client to your public_html folder.

Step 2.3 — Checking the PHP information in the browser

If you have followed this tutorial your PHP file should be placed in the public_html directory and named phpinfo.php which means it should be possible to access this file by adding /phpinfo.php at the end of your domain name in the browser’s address bar. For example: http://yourdomain/phpinfo.php

You should see a similar view when a file is accessed via browser:

PHP information

On this page you can see all PHP environment settings. In case you wish to find a specific value or setting, the CTRL+F command can be of great help.


By finishing this tutorial you have learned how to create phpinfo file and check PHP environment settings. This information is useful if you want to check your hosting configuration or run a software which requires some specific PHP modules installed or enabled.

Add Comment

Click here to post a comment

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!

More in Website
Improving Website Performance – Serving Scaled Images