You can create a PHP information page to view the configuration details of your website's PHP environment. This process allows you to verify PHP versions, loaded modules, and active settings, but it must be removed after use to prevent the exposure of sensitive server information.
Important: A PHP information page reveals detailed information about your server's configuration and software. You must delete this page immediately after you finish using it to maintain your site's security.
Before you begin
You will need:
Access to your website's files via a File Manager or FTP client.
A web browser to view the resulting page.
Create a PHP information page
Log in to your hosting control panel and open the File Manager.
Navigate to the root directory of the website you wish to check (typically
public_htmlor a similar folder).Create a new file and name it
info.php.Open the file and enter the following code:
<?php phpinfo(); ?>
Save the file.
Open your web browser and navigate to the page by entering your domain followed by the filename (e.g.,
https://example.com/info.php).
Remove the PHP information page
To secure your site, remove the file as soon as you have finished gathering your information.
Open the File Manager in your hosting control panel.
Navigate to the directory where you created the file.
Locate
info.php.Delete the file.
Confirm the result
When you visit the URL of the information page, the browser should return a 404 Not Found error or a similar "page not found" message.
This confirms the file has been removed and is no longer accessible to the public.
Limitations
This procedure provides a comprehensive overview of the PHP environment. However, because this page reveals internal system paths and software versions, it should never be left active on a production website.
