Downgrading to PHP 5.3 on Debian Wheezy (7.0)

Debian Wheezy comes with PHP 5.4. If this is too new for your application and it doesn’t work properly, here is a short description on downgrading to PHP 5.3.

  • First, add these two lines to /etc/apt/sources.list. In short, it adds Debian Squeeze repositories as an additional source of packages:
  • Then, add these to pin your old PHP 5.3 packages, to /etc/apt/preferences.d/preferences. If you don’t have this file, create an empty one.
  • This will list your PHP packages
  • Finally, reinstall:

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.