Overview
The following explains how to use a phpinfo.php file to view the version of PHP your site is running.
You can view the PHP version of your websites within the panel by navigating to the Manage Websites page. In List View, the PHP column displays the version each active site is using.
Background
The PHP language has a special built-in function called phpinfo() that retrieves information about the PHP environment running on a website. You can view this information by creating a phpinfo.php file. When viewed in a browser, details such as the following display:
- PHP version
- PHP extensions
- Paths
- Local values of configuration options
How to create a phpinfo.php file
This section explains how to create this file on your web server using FTP or SSH.
Using FTP
- Log into your server using an FTP client such as Filezilla.
- Create a blank file titled phpinfo.php. Ensure it has the .php extension and not a .txt extension.
-
Edit this phpinfo.php file and add the following lines:
<?php phpinfo(); ?> - Visit the file in a browser. For example, example.com/phpinfo.php.
The page lists all PHP settings currently used on your website.
Using SSH
- Log into your server via SSH.
- Change into your website directory.
- Create a file named phpinfo.php.
-
Add the following lines to this file:
<?php phpinfo(); ?> - Save the file and return to your shell.
- Visit the file in a browser. For example, example.com/phpinfo.php.
The page lists all PHP settings currently used on your website.
See also
Dreamhost links
- PHP overview
- Creating and editing a file via SSH
- Force other file extensions to load as PHP
- Command line PHP overview
Third-party links