教你将Ubuntu服务器PHP7.4降到PHP7.3版本

Ubuntu服务器更改PHP版本 7.2 to 7.0, 7.4 to 7.3, 7.4 to 7.2, 7.3 to 7.2, 7.3 to 7.1
command and step by step guide, tutorial

  1. 输入以下代码查看本机php版本
    php -v
  2. sudo add-apt-repository ppa:ondrej/php
  3. sudo apt-get update
  4. sudo apt-get install php7.0
  5. sudo apt-get install php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-mysql php7.0-mbstring php7.0- mcrypt php7.0-zip php7.0-fpm php7.0-intl php7.0-simplexml
  6. sudo a2dismod php7.2
  7. sudo a2enmod php7.0
  8. sudo service apache2 restart
  9. sudo update-alternatives –set php /usr/bin/php7.0
  10. sudo update-alternatives –set phar /usr/bin/phar7.0
  11. sudo update-alternatives –set phar.phar /usr/bin/phar.phar7.0
  12. sudo update-alternatives –set phpize /usr/bin/phpize7.0
  13. sudo update-alternatives –set php-config /usr/bin/php-config7.0
  14. Check current Version of PHP by using command