{"id":3208,"date":"2016-07-01T17:05:38","date_gmt":"2016-07-01T17:05:38","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3208"},"modified":"2016-07-01T17:05:38","modified_gmt":"2016-07-01T17:05:38","slug":"ubuntu-16-04-xenial-downgrade-php-7-php-5-6","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2016\/07\/01\/ubuntu-16-04-xenial-downgrade-php-7-php-5-6\/","title":{"rendered":"Downgrade PHP 7 to PHP 5.6 on Ubuntu 16.04 Xenial"},"content":{"rendered":"<p>How to install PHP 5.6 on Ubuntu 16.04 Xenial and replace php 7. Let\u2019s assume you have a fresh Ubuntu 16.04 server.<\/p>\n<p>Install add-apt-repository:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# sudo apt-get install python-software-properties\n\n<\/pre>\n<p>Add repository for PHP 5.6:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# sudo add-apt-repository -y ppa:ondrej\/php\n\n<\/pre>\n<p>Update package lists:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nsudo apt-get update\n\n\n<\/pre>\n<p>Install php5-fpm:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# sudo apt-get install php5.6-fpm\n<\/pre>\n<p>Check the result:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# php -v\nPHP 7.0.4-7ubuntu2.1 (cli) ( NTS )\nCopyright (c) 1997-2016 The PHP Group\nZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies\n\n\n<\/pre>\n<p>Run the following:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# sudo mv \/usr\/bin\/php \/usr\/bin\/php7\n# sudo mv \/usr\/bin\/php5.6 \/usr\/bin\/php\n<\/pre>\n<p>Check again<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# php -v\nPHP 5.6.23-2+deb.sury.org~xenial+1 (cli) \nCopyright (c) 1997-2016 The PHP Group\nZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies\n    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies\n<\/pre>\n<p>Restart Apache<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# service apache2 restart\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to install PHP 5.6 on Ubuntu 16.04 Xenial and replace php 7. Let\u2019s assume you have a fresh Ubuntu 16.04 server. Install add-apt-repository: # sudo apt-get install python-software-properties Add repository for PHP 5.6: # sudo add-apt-repository -y ppa:ondrej\/php Update package lists: sudo apt-get update Install php5-fpm: # sudo apt-get install php5.6-fpm Check the result: &#8230; <a title=\"Downgrade PHP 7 to PHP 5.6 on Ubuntu 16.04 Xenial\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2016\/07\/01\/ubuntu-16-04-xenial-downgrade-php-7-php-5-6\/\" aria-label=\"Read more about Downgrade PHP 7 to PHP 5.6 on Ubuntu 16.04 Xenial\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84,117],"tags":[],"class_list":["post-3208","post","type-post","status-publish","format-standard","hentry","category-php","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3208"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3208\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}