{"id":721,"date":"2017-03-15T00:00:00","date_gmt":"2017-03-15T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/how-to-create-phpinfo-file-and-check-php-information\/"},"modified":"2026-03-10T09:31:21","modified_gmt":"2026-03-10T09:31:21","slug":"how-to-create-phpinfo-file","status":"publish","type":"post","link":"\/ca\/tutorials\/how-to-create-phpinfo-file","title":{"rendered":"How to create and use a phpinfo file to check your PHP information"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>If you need to check your website&rsquo;s PHP configuration, also known as <strong>phpinfo<\/strong>, to ensure it meets software requirements, you&rsquo;re in the right place. This tutorial will guide you on creating a <strong>phpinfo<\/strong> file and accessing its detailed information through your hosting control panel. Let&rsquo;s get started!<\/p><figure class=\"wp-block-image size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/How-to-Speed-Up-Your-Website-EN.pdf\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook-Speed-Up-your-website-1024x283.png\" alt=\"\" class=\"wp-image-69260\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-checking-php-information-using-hosting-control-panel\">Checking PHP Information Using Hosting Control Panel<\/h2><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-advanced-phpinfo-sidebar.png\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"422\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-advanced-phpinfo-sidebar.png\" alt=\"The PHP info under the Advanced section \" class=\"wp-image-80682\"  sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/a><\/figure><\/div><p>In this guide, we&rsquo;ll be using Hostinger&rsquo;s hPanel, where you can easily check your <a href=\"\/ca\/tutorials\/what-is-php\/\">PHP<\/a> information using the<strong> PHP Info<\/strong> tool. Once you&rsquo;re logged in, scroll down and go to <strong>Advanced<\/strong> -&gt; <strong>PHP Info<\/strong>.<\/p><p>You&rsquo;ll then be forwarded to a page with detailed information about your current <a href=\"\/ca\/tutorials\/how-to-change-your-php-version\">PHP version<\/a>, modules, and values, etc. Scroll down to browse for more.<\/p><p>If you wish to find data about a specific module or function, you can use the <strong>CTRL + F<\/strong> (<strong>CMD + F<\/strong> for macOS)&nbsp;shortcut to open the search feature within your browser.<\/p><h2 class=\"wp-block-heading\" id=\"h-checking-php-information-by-creating-a-phpinfo-file\">Checking PHP Information by Creating a phpinfo File<\/h2><p>In case your hosting platform doesn&rsquo;t offer the mentioned built-in <strong>PHP Info<\/strong> feature, there is no need to worry! You can reach the same goal by creating a <strong>phpinfo<\/strong> file in your <strong>public_html<\/strong> directory.<\/p><p>The file will be accessible via a browser and will show you the same detailed information.<\/p><p>You will need a way to access your <strong>public_html<\/strong> files. Here we&rsquo;re using Hostinger&rsquo;s <strong>File Manager<\/strong> as an example.<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>File Manager<\/strong> under the <strong>Files<\/strong> section in your hPanel.<\/li>\n\n\n\n<li>Once you&rsquo;re in <strong>public_html<\/strong> directory, click the <strong>New File<\/strong> button.<\/li>\n\n\n\n<li>Name your file <strong>phpinfo.php<\/strong> and press <strong>Create<\/strong>.<\/li>\n\n\n\n<li>Scroll down and locate the new <strong>phpinfo<\/strong> file within the directory, then right-click to <strong>Edit<\/strong>.<\/li>\n\n\n\n<li>Now, copy and paste the following code into the text editor and press <strong>Save<\/strong>.<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\nphpinfo();\n?&gt;<\/pre><p>The same result can be achieved by using any text editor on your computer. Create the <strong>phpinfo.php<\/strong> file by following the same steps from before, then uploading the file to your server&rsquo;s<strong> public_html<\/strong> folder through an FTP client.<\/p><p>If you don&rsquo;t know how to configure or never worked with an FTP client, such as FileZilla, refer to our <a href=\"\/ca\/tutorials\/ftp\/filezilla-ftp-configuration\">FTP guide<\/a> for more information.<\/p><h2 class=\"wp-block-heading\" id=\"h-checking-php-information-using-a-browser\">Checking PHP Information Using a Browser<\/h2><p>You should have a <strong>phpinfo.php<\/strong> file in your <strong>public_html<\/strong> directory by now. So, all that&rsquo;s left is to access the file by adding <strong>\/phpinfo.php<\/strong> at the end of your domain name.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"609\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2017\/03\/PHP-information-on-a-browser.png\" alt=\"PHP information once you've opened phpinfo file in a browser\" class=\"wp-image-21247\"  sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><\/figure><\/div><p>You should see a similar view when the file is accessed via any browser:<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>If you don't want your<strong> phpinfo<\/strong> page to be displayed all the time, you can easily disable the file by giving it a different name.<strong> phpinfo.php_disabled<\/strong>, for instance. <\/p>\n                <\/div>\n\n\n<?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-full\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-web-hosting\" href=\"\/ca\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>There you have it! By finishing this tutorial, you&rsquo;ve learned how to create a <strong>phpinfo.php<\/strong> file and how to check PHP information via your hosting control panel or your default browser. That was pretty easy, right?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need to check your website&rsquo;s PHP configuration, also known as phpinfo, to ensure it meets software requirements, you&rsquo;re in the right place. This tutorial will guide you on creating a phpinfo file and accessing its detailed information through your hosting control panel. Let&rsquo;s get started! Checking PHP Information Using Hosting Control Panel In [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/how-to-create-phpinfo-file\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Create phpinfo File and Check PHP Information","rank_math_description":"Looking for an easy way to check your phpinfo settings? We're going to teach you a couple of methods on how to do just that.","rank_math_focus_keyword":"\"phpinfo\"","footnotes":""},"categories":[22699],"tags":[],"class_list":["post-721","post","type-post","status-publish","format-standard","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/creer-afficher-phpinfo","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-crear-un-archivo-phpinfo","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-membuat-script-phpinfo-dan-melihat-informasi-phpinfo","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-crear-un-archivo-phpinfo","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-crear-un-archivo-phpinfo","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-crear-un-archivo-phpinfo","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-create-phpinfo-file","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-create-phpinfo-file","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=721"}],"version-history":[{"count":20,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":141090,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/721\/revisions\/141090"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}