How to Fix an Exposed phpinfo Page
To fix an exposed phpinfo page, you need to first locate the file and restrict its access. This guide provides practical steps to help secure your site and protect sensitive information that could be exploited by attackers. Securing your phpinfo page is essential to safeguarding your website from potential vulnerabilities.
An exposed phpinfo page can inadvertently reveal critical server details to anyone who visits it, posing a significant security risk to your business. Fortunately, you can take simple actions to mitigate this threat effectively, making sure your site remains secure without unnecessary exposure.
This page will guide you through the steps to identify and secure an exposed phpinfo file, focusing on practical solutions that you can implement immediately. Ensure your online presence stays protected with our straightforward advice.
Step 1: Identify the phpinfo Page Location
The first step to fix an exposed phpinfo page is to locate where it resides on your server. This file is commonly named phpinfo.php and might be found in directories like 'public_html' or any custom directory used for web content.
Step 2: Remove or Rename the phpinfo File
Once located, the best immediate action is to either delete the phpinfo file or rename it to something less predictable. This blocks public access and prevents potential attackers from gathering sensitive server information.
Step 3: Restrict Access Using .htaccess
For a more secure approach, use a .htaccess file to restrict access to the phpinfo page by IP address. This ensures that only authorised personnel can view the file if needed without exposing it to the wider internet.
Free, instant, no account
See your site's security grade in seconds.
Free, instant, and no account needed to see your grade.
Scan my site freePlain-English A to E grade in about 10 seconds. No account needed to see it.
Step 4: Verify Changes Are Effective
After implementing these changes, verify that the phpinfo page is no longer accessible. Attempt to visit the URL and ensure it results in a '404 Not Found' error or a similar server response indicating restricted access.
Checking with ebsecurity.co.uk
Our free tool identifies if your phpinfo page is exposed but cannot remedy it. After securing your page, use the scanner to confirm no further exposure. The ebsecurity.co.uk check can reassure you that the page is no longer publicly accessible.
To fix an exposed phpinfo page, quickly locate and secure the file by removing or renaming it, and use .htaccess to restrict access. Use ebsecurity.co.uk to confirm the issue is resolved.