Skip to content

Quickly changes the version of PHP running on the system

Notifications You must be signed in to change notification settings

mimet/change-php-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

change-php-version

This script allow you to quickly change the version of PHP running on the system.

It was created, tested and running on Ubuntu 19.04 - Disco Dingo

Prerequisites

  1. You need to have installed at least two versions of php

How to use

  1. Download and unzip in any folder (for example, in /home/YOUR_NAME/bin/)

  2. Open a terminal emulator and go to the folder where you extracted the script

  3. When you're in the same folder that contains the script, type the following code:

     sudo chmod +x change-php-version.sh
    
  4. Type the following code:

     sudo ./change-php-version.sh PHP_VERSION
    

where PHP_VERSION is the version of PHP that you want to enable. The script will automatically disable the current version before of enabling the new one.

Example

Suppose you want to enable the version 5.6 of PHP; you have to type in terminal

sudo ./change-php-version.sh 5.6

Enjoy!

About

Quickly changes the version of PHP running on the system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages