Skip to content

Instantly share code, notes, and snippets.

@ReactiveRaven
Created February 5, 2014 14:14
Show Gist options
  • Save ReactiveRaven/8824407 to your computer and use it in GitHub Desktop.
Save ReactiveRaven/8824407 to your computer and use it in GitHub Desktop.
downgrade php 5.5 to 5.4
# upgrade system, so you can add to ignore all updates later
sudo apt-get update
sudo apt-get upgrade
# remove your php, apache, etc
sudo apt-get purge apache2 php5 libapache2-mod-php5 # add here your server packages
# change repositories to raring (with backup)
sudo sed -i.bak "s/saucy/raring/g" /etc/apt/sources.list
# update and install server packages
sudo apt-get update
sudo apt-get install apache2 php5 libapache2-mod-php5 phpmyadmin #add here packages you need and make sure you install php5.4 and apache2.2
# change repositories back to saucy
sudo sed -i "s/raring/saucy/g" /etc/apt/sources.list
# lock versions
dpkg --get-selections | egrep '^(apache|php)' | sed 's/install/hold/g' | sudo dpkg --set-selections
@ReactiveRaven
Copy link
Author

Before you "change repositories back to saucy" make sure everything works for your site(s). Otherwise you'll have to switch repositories back to raring again to install anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment