Webmaster Sun Login
Not a member yet? Sign up

Install PHP 5.4/5.5/5.6 and PHP 7 on Ubuntu

  • HOME
  • FORUMS
  • WHAT'S NEW
  • BLOGS
  • MARKETPLACE
  • ADVERTISING
  • SPECIAL OFFERS
  • WEB HOSTING
  • QUICK MENU
  • REGISTER HERE - Join us for FREE
Results 1 to 2 of 2
    Stick this thread
  1. #1
    Join Date
    May 2016
    Posts
    65
    Thumbs Up/Down
    Received: 8/0
    Given: 43/0
    Thanks
    8
    Thanked 10 Times in 9 Posts

    Install PHP 5.4/5.5/5.6 and PHP 7 on Ubuntu

    Ubuntu has expanded repository greatly, it fully supports than any other Linux distribution. So you can install any applications with the latest version on the old Ubuntu as Ubuntu 12.04.
    The latest version of PHP is supported by the PPA, I feel very stable. Here we will use Ondrej PPA, is now available for PHP 5.4, 5.5, 5.6 and PHP 7. To use apt-add-repository command, you need to install the following packages before:

    For Ubuntu 12.04 or earlier, you need to install python-software-properties:

    Code:
    $ sudo apt-get install python-software-properties
    For Ubuntu 12.10 or later, you need to install the software-properties-common package:

    Code:
    $ sudo apt-get install software-properties-common
    Now you need to add one of the PPA that you want below:

    PPA for PHP 5.4: only works on Ubuntu 12.04

    Code:
    $ sudo apt-add-repository ppa:ondrej/php5-oldstable
    PPA for PHP 5.5:

    Code:
    $ sudo apt-add-repository ppa:ondrej/php5
    PPA for PHP 5.6:

    Code:
    $ sudo apt-add-repository ppa:ondrej/php5-5.6
    PPA for PHP 7.0: only works on Ubuntu 14.04 or later

    Code:
    $ sudo apt-add-repository ppa:ondrej/php-7.0
    To install PHP-FPM version 5.4 / 5.5 or 5.6, use the following command:

    Code:
    $ sudo apt-get update
    $ sudo apt-get install php5-mysql php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-mcrypt
    To install PHP-FPM version 7.0, use the following command:

    Code:
    $ sudo apt-get install php7.0-fpm
    To update PHP to a newer version, use the following command:

    Code:
    $ sudo apt-get upgrade
    So you can choose to install the latest PHP version.

    For servers with low memory (1GB), the selection of an OS is very important. Instead of running the latest OS to fill up our RAM, choose the lighter old OS, CentOS is lighter than Ubuntu a bit. Although old, but still install PHP 5.4, 5.5 or run the latest PHP 5.6 as well.

    Good luck!

  2. #2
    Join Date
    Mar 2015
    Posts
    10
    Thumbs Up/Down
    Received: 0/0
    Given: 3/0
    Thanks
    1
    Thanked 1 Time in 1 Post
    If you are using a cPanel or Plesk hosting panel then you can ignore this process and you can upgrade or downgrade PHP versions with some clicks only. Especailly in Plesk Onyx, it allowed you to switch between Php 5.x and PHP 7.x easily.

Newer Threads

  1. hostslim
    hostslim
    Replies: 0 | Views: 1771
    Last post by hostslim, 06-20-2016, 08:02 AM
  2. Gonzalus
    Giang Dang
    Replies: 17 | Views: 2436
    Last post by Giang Dang, 11-15-2018, 07:36 AM
  3. SenseiSteve
    SenseiSteve
    Replies: 0 | Views: 1791
    Last post by SenseiSteve, 06-20-2016, 09:55 PM
  4. stgeorgehosting
    stgeorgehosting
    Replies: 0 | Views: 1527
    Last post by stgeorgehosting, 06-21-2016, 04:11 AM
  5. edisonvpb
    daniel27lt
    Replies: 3 | Views: 1676
    Last post by daniel27lt, 03-29-2017, 11:05 AM

Older Threads

  1. Sean78Black
    Sean78Black
    Replies: 0 | Views: 3006
    Last post by Sean78Black, 06-19-2016, 12:13 PM
  2. Sean78Black
    Sean78Black
    Replies: 2 | Views: 2477
    Last post by Sean78Black, 06-20-2016, 01:30 AM
  3. whland
    whland
    Replies: 8 | Views: 2352
    Last post by whland, 06-26-2016, 12:33 AM
  4. Sean78Black
    Sean78Black
    Replies: 2 | Views: 1716
    Last post by Sean78Black, 06-19-2016, 11:52 AM
  5. binelus
    Mark Z.
    Replies: 9 | Views: 1795
    Last post by Mark Z., 07-02-2016, 10:02 PM

Latest Threads

  1. Swiftnode
    Swiftnode
    Replies: 2 | Views: 71
    Last post by Swiftnode, Yesterday, 07:06 PM
  2. KevinPons1
    Hello friends!
    By KevinPons1 in forum New Member Introductions
    Rob Whisonant
    Replies: 1 | Views: 45
    Last post by Rob Whisonant, Yesterday, 06:40 PM
  3. anug
    anug
    Replies: 2 | Views: 60
    Last post by anug, 08-21-2019, 05:40 AM
  4. anug
    anug
    Replies: 2 | Views: 53
    Last post by anug, 08-21-2019, 05:45 AM
  5. sconceglobal
    Rob Whisonant
    Replies: 2 | Views: 67
    Last post by Rob Whisonant, Yesterday, 06:40 PM

Similar Threads

  1. GNULinux
    FreebieBoy34
    Replies: 6 | Views: 2262
    Last post by FreebieBoy34, 01-27-2017, 12:48 AM
  2. Purres
    ulterios
    Replies: 1 | Views: 874
    Last post by ulterios, 04-22-2016, 03:29 AM
  3. Percentage
    Hawker
    Replies: 15 | Views: 4013
    Last post by Hawker, 02-29-2016, 02:12 PM
  4. tonymyers
    RDO Servers
    Replies: 3 | Views: 1985
    Last post by RDO Servers, 07-20-2015, 12:00 AM
  5. Kal K
    HNC-Duy
    Replies: 4 | Views: 1706
    Last post by HNC-Duy, 04-25-2015, 02:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Internet Marketing Forum

Webmaster Sun is a forum where you’ll find in-depth discussions and resources to help you succeed on the web whether you are new or experienced. You’ll find it all here. With topics ranging from internet marketing, search engine optimization, social networking, make money online, web hosting, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.

Come Hang Out With Us

    Facebook Twitter Webmaster Forum Google+

    Webmaster Sun Logo
Copyright ©2012 - 2019, WebmasterSun.com. All rights reserved. Internet marketing forum for internet marketers, webmasters, web hosting providers, designers and affiliate marketers.

Welcome to Webmaster Sun

The World's Number 1 Webmaster Community, SEO and Marketplace

Log in!

Continue with Facebook
Continue With Email. By signing up you indicate that you have read and agree to the Terms of Service and Privacy Policy.

Sign in Manually

Need an account? Sign up now!