How do i downgrade PHP 5.5.9 to PHP 5.4.29 on a new Ubuntu 14.01

Posted June 1, 2014 22.9k views
I have LEMP installed and wanted to downgrade to 5.4.29 for magento purposes. Certain modules aren't working on 5.5.9. Please can someone walk me thru the process without losing the settings. Thank you,

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers
Downgrading isn't really a supported option. PHP 5.5.9 is the only version shipped with Ubuntu 14.04. To downgrade you'd need to purge PHP from the system and then install a version from an older Ubuntu release. You'd then get into problems with the various other bits in the PHP ecosystem that are available for Ubuntu 14.04 are targeting PHP 5.5.x.

If you really need PHP 5.4.x, I suggest using the Debian 7.0 image as your base. That ships with PHP 5.4.4 along with various backported security fixes. It would be much easier to set up a LEMP stack on Debian 7 than to downgrade PHP on Ubuntu 14.04 Check out this article:
by Adam LaGreca
LEMP stack is a group of open source software to get a VPS up and running. The acronym includes the Linux (L), MySQL (M), and PHP (P) of the more traditional LAMP stack, but switches out Apache for Nginx (pronounced engine x). This tutorial explains how to install nginx/MySQL/PHP-fpm, as well as all the required repos to download nginx and php-fp. It will also review how to configure php & nginx, as well as how to create a php info page. *Written for Debian 7.

As an option, you can alternatively install Ubuntu 12.05 LTS and then php 5.4 by following, for example, this tutorial:

Its not that easy to downgrade php in ubuntu 14. But its easier to install PHP 5.4 parallel to PHP 5.5 uing phpfarm. You can download PHP 5.4, compile it and configure Apache with fastCGI: