Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a virtual server with PHP 5.1.6. How can I upgrade to PHP 5.3 using SSH?

Thanks in advance,


share|improve this question
It depends on several aspects. What is your distribution/version? – Laurent Jan 12 '11 at 10:32
It sounds like you are running Red Hat Enterprise Linux or CentOS 5.5. See:… – mattdm Jan 13 '11 at 14:46

Depending on the server operating system / linux flavour it might be as easy as: yum update php or apt-get install php

Be aware this will update you to the latest version of php not necessarily 5.3, also be aware this might break things to proceed with caution!

if your running a redhat based system you should also be able to find a PHP 5.3 RPM which you can install with rpm -uvh rpmname.rpm if you need a specific version of php that yum can't provide.

share|improve this answer
When I tried the yum update is said "yum: command not found" – John Jan 12 '11 at 10:36
in which case your probably not running a redhat based operating system try cat /etc/*-release and paste the result into your question. – Jona Jan 12 '11 at 10:46

download the new version of php and compile it.

share|improve this answer

Its depend in many things:

  • What distro you have.
  • What version of PHP you wont to use.
  • Is that necessary, because some php versions 2.2.x some functions.

After you decide, you can login to your server using either ssh client such as Putty, or from command line and follow steps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.