How to Create an info.php File Using cPanel, DirectAdmin, or FTP Print

  • info.php, phpinfo, php, php errors, php test, cPanel, DirectAdmin, FTP, code
  • 544

An info.php file is a simple way to view your server’s PHP version, enabled extensions, and configuration details. It is commonly used for troubleshooting or verifying hosting settings.

What the info.php File Does

The file contains a single PHP command:

When accessed in a browser, the server displays detailed PHP configuration information.

Option 1: Using cPanel File Manager

  1. Log in to cPanel.
  2. Open File Manager.
  3. Navigate to your website’s root folder, usually public_html.
  4. Create a new file named info.php.
  5. Edit the file and paste the following code:

<?php phpinfo(); ?>

Save the file and visit https://yourdomain.com/info.php in your browser.

Option 2: Using DirectAdmin File Manager

  1. Log in to DirectAdmin.
  2. Open File Manager.
  3. Navigate to your site’s main directory, typically public_html or domains/yourdomain.com/public_html.
  4. Create a new file named info.php.
  5. Add the following content to the file:

<?php phpinfo(); ?>

Save the file and open https://yourdomain.com/info.php.

Option 3: Using an FTP Program

  1. Connect to your server using an FTP client such as FileZilla.
  2. Navigate to your website’s root folder.
  3. Create a new file named info.php.
  4. Add the following code:

<?php phpinfo(); ?>

Upload the file if needed and visit https://yourdomain.com/info.php to view the results.

Important Security Note

Delete the info.php file once you are finished. Leaving it online can expose sensitive server configuration details.


Was this answer helpful?

« Back