View Your Site’s PHP Settings

Understanding your PHP environment is crucial to know if your hosting is WordPress-friendly. One of the most effective ways to get a detailed overview of your site’s PHP configuration is by using the built-in phpinfo() function.

What is phpinfo()?

The phpinfo() function is a powerful tool that retrieves comprehensive information about the PHP environment on your server. By creating a simple phpinfo.php file, you can view details about your PHP installation directly in your browser.

Includes crucial information like:

  • PHP Version: Understand the specific version of PHP your site is running, which is important for compatibility with themes, plugins, and scripts.
  • PHP Compilation Options and Extensions: See which extensions are enabled and how PHP was compiled.
  • Server Information and Environment: Learn more about your server’s configuration if PHP is compiled as a module.
  • PHP Environment: View settings that affect how PHP operates on your server.
  • OS Version and Paths: Get insights into the operating system your server is running and the paths PHP uses.
  • Configuration Values: Understand both the master and local values of various PHP configuration options.
  • HTTP Headers and PHP License: Review the HTTP headers sent by your server and the PHP license details.

How to Create a phpinfo.php File

Creating a phpinfo.php file is a straightforward process. You can do it either on your computer and then upload it to your server or directly on the server itself.

Creating and Uploading the File from Your Computer
  • Log into Your Server: Use an FTP client like Filezilla to connect to your server.
  • Create the File: On your local machine, create a blank file named phpinfo.php. Ensure that it has the .php extension, not .txt.
  • Add the PHP Code: Open the file in a text editor and add the following lines:
  • Upload the File: Use your FTP client to upload the phpinfo.php file to the root directory of your website.
  • View in Browser: Navigate to example.com/phpinfo.php in your browser. The page will display all PHP settings currently in use on your site.

WordPress Opcache Plugin

Share your love

Leave a Reply