{"id":391,"date":"2016-10-22T18:54:19","date_gmt":"2016-10-22T18:54:19","guid":{"rendered":"https:\/\/www.xsofthost.com\/help\/?p=391"},"modified":"2017-09-01T12:22:04","modified_gmt":"2017-09-01T12:22:04","slug":"install-or-upgrade-php-to-php7-on-centos-7-linux-server","status":"publish","type":"post","link":"https:\/\/www.xsofthost.com\/help\/install-or-upgrade-php-to-php7-on-centos-7-linux-server\/","title":{"rendered":"Install or Upgrade PHP to PHP7 on CentOS 7 Linux server"},"content":{"rendered":"<h2>How to Install\/Upgrade PHP on CentOS 7 Linux<\/h2>\n<p><strong>PHP <\/strong>is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. For more information on PHP<\/p>\n<p>this guide help you to install or upgrade existing PHP 5 with PHP 7 on CentOS 7 Linux server using Remi Repository.<\/p>\n<h3>Check the current PHP version<\/h3>\n<p>In this example when we run php version command showing us the PHP version 5.6<\/p>\n<div class=\"cmd\">\n<div><span class=\"prompt\"> php &#8211;version<\/span><\/div>\n<div>PHP 5.6.22 (cli) (built: Jun 21 2016 23:30:46)<\/div>\n<div>Copyright (c) 1997-2016 The PHP Group<\/div>\n<div>Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies<\/div>\n<div>with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies<\/div>\n<\/div>\n<ol>\n<li>\n<p>First we download Remi and EPEL Repository packages<\/p>\n<div class=\"cmd\">\n<div><span class=\"prompt\">wget -q http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/span><\/div>\n<div><span class=\"prompt\">wget -q https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/span><\/div>\n<\/div>\n<\/li>\n<li>\n<p>after download complete now we need to Enable Remi and EPEL Repository , we can enable PHP 70 ,PHP 71<\/p>\n<div class=\"cmd\">\n<div><span class=\"prompt\">rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm<\/span><\/div>\n<div><span class=\"text-green\">FOR PHP 7.0<\/span><\/div>\n<div><span class=\"prompt\">yum-config-manager &#8211;enable remi-php70<\/span><\/div>\n<div><span class=\"text-green\">FOR PHP 7.1<\/span><\/div>\n<div><span class=\"prompt\">yum-config-manager &#8211;enable remi-php71<\/span><\/div>\n<\/div>\n<\/li>\n<li>\n<p>Now we are ready to install or upgrade the PHP to php version 7<\/p>\n<div class=\"cmd\">\n<div><span class=\"text-green\">FOR New Installation<\/span><\/div>\n<div><span class=\"prompt\">yum install php<\/span><\/div>\n<div><span class=\"text-green\">FOR Upgrade<\/span><\/div>\n<div><span class=\"prompt\">yum update<\/span><\/div>\n<\/div>\n<\/li>\n<li>\n<p>Now check again the currnet PHP version :<\/p>\n<div class=\"cmd\">\n<div><span class=\"prompt\">php &#8211;version<\/span><\/div>\n<div>PHP 7.1.0 (cli) (built: Dec 1 2016 08:13:15) ( NTS )<\/div>\n<div>Copyright (c) 1997-2016 The PHP Group<\/div>\n<div>Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies<\/div>\n<\/div>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>How to Install\/Upgrade PHP on CentOS 7 Linux PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. For more information on PHP this guide help you to install or upgrade existing PHP 5 with PHP 7 on CentOS 7 Linux server using Remi Repository. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":44,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41],"tags":[178,50,7,74],"_links":{"self":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/391"}],"collection":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":1,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":392,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/391\/revisions\/392"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media\/44"}],"wp:attachment":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}