Support Portal Language
 
HomeKnowledge BaseVPSLinuxHow do I switch to PHP 5 in an Ubuntu VPS?
Information
Article ID46
Created On4/28/2008
Modified4/28/2008
Share With Others
How do I switch to PHP 5 in an Ubuntu VPS?
Installing PHP 5 on your Linux VPS running Ubuntu

See below instructions on installing PHP the commands are listed in BOLD

[1]. Add deb http://autoinstall.plesk.com/ubuntu/PSA8 dapper all to /etc/apt/sources.list

cd /etc/apt/

vi sources.list

Copy following lines into the “souces.list” file that already exists.

#Host Europe server:

deb ftp://80.237.136.138/mirror/archive.ubuntu.com/ dapper main multiverse universe deb ftp://80.237.136.138/mirror/archive.ubuntu.com/ dapper-security main restricted universe multiverse

deb ftp://archive.ubuntu.com/ubuntu dapper main multiverse universe deb ftp://archive.ubuntu.com/ubuntu dapper-security main restricted universe multiverse

# Plesk

deb http://autoinstall.plesk.com/ubuntu/PSA8 dapper all

NOTE: You may find that all you need to copy is the last line:

[2]. Then update and upgrade PHP

apt-get update && apt-get upgrade

[3]. Install PHP5 configurator

apt-get install psa-php5-configurator

NOTE: If you need more modules for php5 you can check which modules are available "apt-cache search php5"

and then install them with "apt-get install php5-$MODULE"

[4]. Restart Web server:

/etc/init.d/apache2 restart