In this article I'm going to quickly show you how you can find the PHP version of your server creating a PHP info page, this will also allow you to see the options PHP is using and any active PHP extensions.

Why does PHP version matter?

As PHP has been updated over the years, each new version typically introduces better security practices, and new features to take advantage of. Typically if you're trying to run PHP software on your website, it will require a minimal or specific PHP version, and also possibly the need for certain extensions to be enabled, or certain values entered in for the various setting options.

Creating a PHP info page

Using the steps below I'll show you how to create a PHP info page that will allow you to not only see your PHP version, but also all the PHP options that are currently in use.

  1. Login to your cPanel.
  2. Under the Files section, click on File Manager, then select Web Root and click on Go.
  3. At the top-left, click on + New File, name the file info.php and click on Create New File.
  4. Now open the file with the Code Editor in cPanel and enter in the following code:

    <? phpinfo(); ?>

    Then click on Save Changes at the top-right hand corner of the screen.

  5. Now if you visit your website such as http://example.com/info.php you should see the PHP info page. This example screen shot shows that this server is running PHP version 5.2.17, and that the PHP configurations are getting loaded from the file /home/userna5/public_html/php.ini

    php info page
  6. You can scroll further down the PHP info page, to also see individual PHP options that you can set.

Changing PHP version

Now that you know how to check what version of PHP is running on your server, you might also be interested in changing it.

You can learn about how to change the PHP version your account uses, which will show you how to select the version of PHP you'd like to use from cPanel.

You can also use multiple PHP versions on your one account by adding some .htaccess rules. If you're running any automated PHP scripts via a cron job, you might also be interested in forcing cron jobs to use chosen PHP version.

If you're on a VPS (Virtual Private Server) or dedicated server and have root access to your server, you can also upgrade PHP using EasyApache if the version of PHP you're currently using is too old for your needs.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!