Table of Contents
Context
PHP settings control how your website and applications behave on the server. These parameters include memory limits, execution time, loaded modules, and other configuration values.
If you are unsure which PHP settings are currently active for your website, you can generate a PHP information page using the phpinfo() function.
How to create a phpinfo file
To view current PHP configuration, create a new file on your computer or directly on the server and name it:
phpinfo.php
Add the following lines of code inside the file:
<?
php phpinfo();
?> Upload the file to your server
Upload the file via FTP to your website directory, typically:
public_html
After uploading, the file will be available on your website.
How to access PHP information
Open your browser and go to:
http://yourwebsite.pl/phpinfo.php
Replace yourwebsite.pl with your actual domain name.
The page will display detailed PHP configuration information for your hosting environment.
When this is useful
This method is commonly used when:
- A CMS (for example WordPress) reports that a PHP parameter is too low
- You need to check which PHP modules are enabled
- You are troubleshooting compatibility or performance issues
Summary
Creating a phpinfo.php file allows you to view the active PHP configuration on your hosting environment. This helps diagnose issues related to CMS requirements and server limitations.