Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Paul Murphy
Paul Murphy
6,162 Points

Finding out what version of PHP a site is running

Hello all,

New to all of this and getting slightly blinded by all of the technical jargon.

I have been informed by our web hosting company that an upgrade has to take place on our server and for that to happen I need to find out what version of PHP the current site is running. Could somebody please put me in the right direction of how to do this.

Many Thanks, Paul

7 Answers

Mike Costa
Mike Costa
Courses Plus Student 26,362 Points

Hey Paul,

I think what Gopinath meant was this single line of code:

<?php  phpinfo(); ?>

That should give you every bit of info about the version of php running on the server.

14,517 Points


I ran into this when I updated my website. Depending on who your hosting provider is you can handle this a couple of ways.

  1. Call them and ask - you will need to supply your Account # or verify it's your account in someway but they will be able to tell you.

  2. Login to your hosting account and take a look at your server settings. I use GoDaddy so it's pretty simple to accomplish this task.

Do you know who your hosting is? If so we can easily provide further details.

Paul Murphy
Paul Murphy
6,162 Points

Hi Justin,

Firstly, thank you for your reply.

I was actually informed by our hosting company (UKFast) of the matter. The site in question is www.masteel.co.uk I am quite sure that in fact the site does not run any PHP script at all but would appreciate any further guidance.


Hi Paul Murphy

Just put that single line of code in a PHP file, and run it on your server. That's it! By running the file you should have all of the PHP information you need

cheers :)

My Bad ...I didn't see that it Was published :) Mike Costa

Paul Murphy
Paul Murphy
6,162 Points

Many thanks everyone! Highly appreciate the responses!!