---
title: "How to Create a phpinfo Page to View Your PHP Settings"
description: "In this guide, we'll show you how to create a phpinfo page to view the current PHP settings for your php host. PHP has many environmental variables that you are able to update as needed. For example,..."
url: https://www.inmotionhosting.com/support/website/how-to-create-a-phpinfo-page/
date: 2021-04-05
modified: 2023-12-04
author: "InMotion Hosting Contributor"
categories: ["Website"]
type: post
lang: en
---

# How to Create a phpinfo Page to View Your PHP Settings

In this guide, we’ll show you how to create a phpinfo page to view the current PHP settings for your [php host](https://www.inmotionhosting.com/php-hosting). PHP has many environmental variables that you are able to update as needed. For example, you may need to update your php memory_limit to prevent certain scripts from running out of memory.

Before you change these values, you must first be able to see what they are. To do that, you will need to create a **phpinfo** page. A phpinfo page shows you all of your php environment settings.

A phpinfo page is simply a page with the following PHP code:

<? phpinfo(); ?>

- [How to Create a phpinfo Page](#create)
- [How to View your PHP Settings](#view)

![How to View Your PHP Settings With a phpinfo Page](https://i.ytimg.com/vi_webp/l9ZqcOxNbDM/maxresdefault.webp)

*Don’t have time to read the guide? Check out our walk-through video.*

**Reliable Shared Hosting for Growing Businesses**

Get the performance your business website demands with NVMe SSD storage, industry-standard cPanel management, and direct access to hosting experts whenever you need assistance.

![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Free Website Migration     ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)24/7 Human Support     ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)100% Money-Back Guarantee

[Shared Hosting](https://www.inmotionhosting.com/shared-hosting?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=shared-cta2)

## How to Create a phpinfo Page

If you’re not familiar with how to create a php page, follow the steps below to create a **phpinfo** page using your [File Manager](https://www.inmotionhosting.com/support/edu/cpanel/using-file-manager-in-cpanel/). You can also use an [FTP](https://www.inmotionhosting.com/support/website/ftp/getting-started-guide/) program if you prefer.

1. [Log into your cPanel](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. In the *Files* section of your cPanel, open the **File Manager** option.
3. Navigate to the directory you are working with. This is important because each folder can actually be set to have different PHP settings. In this example, we are viewing the PHP settings for our main domain, so we are navigating to the “public_html” folder.
4. In the top menu, click **+File** option to create a new file.
5. When prompted for the file name, enter phpinfo.php (it can actually be named anything, phpinfo.php is simply a common name for the file).
6. Find the phpinfo.php file in your list of files (it should have automatically updated). Right-click on it and choose **Edit**. If you see a “Text Editor” prompt, choose “**utf-8**” from the drop-down list and then click **Edit**.
7. Enter the following code into the phpinfo.php file. <? phpinfo(); ?>
8. Then click **Save Changes**.

## How to View your PHP Settings

Now that you have created the phpinfo page, we’ll show you how to access it and view your PHP settings.

1. You can now access this page from your browser. If you created the file in your public_html folder, then you would visit https://example.com/phpinfo.php. Be sure to replace example.com with your actual domain name. The results should look similar to the below screenshot:![Create phpinfo Page](https://www.inmotionhosting.com/support/wp-content/uploads/2011/11/php_create-php-info-page_this-is-what-a-phpinfo-file-loos-like.gif)
2. To find the specific value of a setting, search the page for what you’re looking for. In this case, we used our browser’s search feature (**Ctrl + f**) and searched for *memory_limit*. The first value you see is what is set for the current directory (local value), and the setting value is the master value. The local value is the actual setting and is the important value, because the local values will override the master value:![Viewing a PHP Setting](https://www.inmotionhosting.com/support/wp-content/uploads/2011/11/php_create-php-info-page_this-is-a-phpinfo-page-showing-the-memory_limit-setting.gif)**WARNING: Your phpinfo page has many PHP settings that you don’t want to broadcast to the world. When you’re finished using the file, be sure to delete it.** Another route you can take instead of deleting it however is naming the file something other than phpinfo.php. As phpinfo.php is such a common name, ‘bots’ on the web will randomly search for files named phpinfo.php. Setting the file name to something like 9823592374823.php would never be guessed by a bot (so no one would ever find it) however it may be difficult for you to remember this in the future.

Now you know how to create a phpinfo page and view your PHP settings. If you need to change any of these values, here are some helpful guides.

- [How to Change PHP Settings in your Hosting Account](https://www.inmotionhosting.com/support/website/update-local-php-settings/)
- [Setting Your PHP Settings in Command Line](https://www.inmotionhosting.com/support/website/command-line-settings/)

Check out our [Website Tutorials](https://www.inmotionhosting.com/support/website/) section for more helpful guides to help you build a successful site.
