{"id":28345,"date":"2018-09-28T06:43:23","date_gmt":"2018-09-28T11:43:23","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=28345"},"modified":"2022-12-12T07:08:04","modified_gmt":"2022-12-12T13:08:04","slug":"how-to-install-php-7-2-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/","title":{"rendered":"How to Install PHP 7.2 on CentOS 7"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-28352\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg\" alt=\"how to install php 7.2 on CentOS 7\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-28353 alignright\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/installing-php-7.2-on-CentOS-7.jpg\" alt=\"installing php 7.2 on CentOS 7\" width=\"180\" height=\"65\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/installing-php-7.2-on-CentOS-7.jpg 180w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/installing-php-7.2-on-CentOS-7-150x54.jpg 150w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/>We will show you how to <strong>install PHP 7.2 on\u00a0CentOS 7<\/strong> as an operating system. PHP is a server-side scripting language commonly used for Web development, but it is also used as a general-purpose programming language. PHP powers WordPress, the most popular content management system used for blogging and building websites as well as may other e-commerce websites, customer relationship management software, enterprise resource planning software and much more. <strong>Installing PHP 7.2 on CentOS 7<\/strong> is a pretty easy task and it should be completed in less than 10 minutes.<br \/>\n<!--more--><\/p>\n<p>PHP 7 offers much better performances than PHP 5.6 and older PHP versions. Compared with PHP 5.6, PHP 7.2 could execute as much as three times more requests. If you have <a href=\"https:\/\/www.rosehosting.com\/blog\/install-wordpress-on-a-centos-7-vps\/\" target=\"_blank\" rel=\"noopener noreferrer\">installed WordPress on your Linux VPS<\/a>, this means much lower server load, thus you should expect your website to run faster with PHP 7.2.<\/p>\n<p>In addition, PHP 7.2 offers some security improvements. There are some <a href=\"https:\/\/wiki.php.net\/rfc\/deprecations_php_7_2\" target=\"_blank\" rel=\"noopener noreferrer\">deprecations <\/a>though that you may want to check before you consider upgrading to PHP 7.2.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e69bbba3195\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e69bbba3195\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#1-Prerequisites\" >1. Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#2-Install-PHP-72-on-CentOS-7\" >2. Install PHP 7.2 on CentOS 7<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#3-Customize-the-PHP-72-settings-on-CentOS-7\" >3. Customize the PHP 7.2 settings on CentOS 7<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#4-Verify-if-the-PHP-files-are-being-executed-on-the-serve\" >4. Verify if the PHP files are being executed on the serve<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Prerequisites\"><\/span>1. Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-28354\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/install-php-7.2-on-CentOS-7.jpg\" alt=\"install php 7.2 on CentOS 7\" width=\"150\" height=\"104\" \/>Before you install PHP 7.2 on your CentOS VPS, let&#8217;s make sure it is fully up to date. To update all your system software to the latest version you need to have root access to the server or at least you have sudo privileges with your system user. <a href=\"https:\/\/www.rosehosting.com\/blog\/connect-to-your-linux-vps-via-ssh\/\" target=\"_blank\" rel=\"noopener noreferrer\">Connect to your Linux VPS via SSH<\/a> and run the following command:<\/p>\n<pre>yum update<\/pre>\n<p>The software update will take few seconds or minutes depending on what packages need to be updated. Once it is completed you can proceed with enabling the required repositories. PHP 7.2 is not provided in the default CentOS 7 repositories, so you need to enable the following:<\/p>\n<p>Enable EPEL:<\/p>\n<pre>yum install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/pre>\n<p>Install <code>yum-utils<\/code> if it is not already installed.<\/p>\n<pre>yum install yum-utils<\/pre>\n<p>Enable the Remo repository for PHP 7.2:<\/p>\n<pre>yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm\r\nyum-config-manager --enable remi-php72<\/pre>\n<p>Once you are done with these steps, you can go ahead and install PHP 7.2<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2-Install-PHP-72-on-CentOS-7\"><\/span>2. Install PHP 7.2 on CentOS 7<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To install PHP 7.2 on your <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 7 VPS<\/a>, run the following command:<\/p>\n<pre>yum install php72 php72-php-fpm php72-php-mysqlnd php72-php-opcache php72-php-xml php72-php-xmlrpc php72-php-gd php72-php-mbstring php72-php-json<\/pre>\n<p>This will install PHP 7.2 as well as other commonly used PHP extensions. To verify PHP 7.2 is successfully installed, run the following command:<\/p>\n<pre>php72 -v<\/pre>\n<p>The output should be similar to the one below:<\/p>\n<pre># php72 -v\r\nPHP 7.2.10 (cli) (built: Sep 11 2018 10:09:51) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\r\n    with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend Technologies\r\n<\/pre>\n<p>Create a symbolic link to <code>\/usr\/bin\/php<\/code><\/p>\n<pre>ln -s \/usr\/bin\/php72 \/usr\/bin\/php<\/pre>\n<p>Verify again<\/p>\n<pre>php -v<\/pre>\n<p>The output should be similar to this:<\/p>\n<pre># php -v\r\nPHP 7.2.10 (cli) (built: Sep 11 2018 10:09:51) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\r\n    with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend Technologies\r\n<\/pre>\n<p>Once you have PHP 7.2 installed on your CentOS 7 VPS you may want to customize some of the settings. Follow the steps below to do so.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3-Customize-the-PHP-72-settings-on-CentOS-7\"><\/span>3. Customize the PHP 7.2 settings on CentOS 7<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can customize PHP 7.2 by editing the <code>php.ini<\/code> file. To find the path to this file, you can use the command below:<\/p>\n<pre>php --ini | grep \"Loaded Configuration File\"<\/pre>\n<p>The command will return the path to the <code>php.ini<\/code> file which is currently used.<\/p>\n<pre># php --ini | grep \"Loaded Configuration File\"\r\nLoaded Configuration File: \/etc\/opt\/remi\/php72\/php.ini<\/pre>\n<p>You can use any editor of your choice to edit the file. We will use <code>nano<\/code> in our example.<\/p>\n<pre>nano \/etc\/opt\/remi\/php72\/php.ini<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Verify-if-the-PHP-files-are-being-executed-on-the-serve\"><\/span>4. Verify if the PHP files are being executed on the serve<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Once you change the settings you want to change, save and close the <code>php.ini<\/code> file. If you are using Apache as a web server, you need to restart the Apache service for the new configuration to be loaded and for the changes to take effect. If you are using Nginx and PHP-FPM instead of Apache, you should restart the PHP-FPM service.<\/p>\n<p>To check if the PHP files are being executed on the server you can create a sample <code>info.php<\/code> file and access it via web browser.<\/p>\n<pre>nano \/var\/www\/html\/info.php<\/pre>\n<p>Paste the following content:<\/p>\n<pre>&lt;?php phpinfo(); ?&gt;\r\n<\/pre>\n<p>Save and close the file, then open your favorite web browser and access the file by using your server IP address in the URL followed by the name of the file.<\/p>\n<pre>http:\/\/IP-ADDRESS\/info.php<\/pre>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-28760\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/install-php-7.2-centos-7.jpg\" alt=\"install php 7.2 centos 7\" width=\"180\" height=\"65\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/install-php-7.2-centos-7.jpg 180w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/install-php-7.2-centos-7-150x54.jpg 150w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/>Of course, you don\u2019t have to <strong>install PHP 7.2 on CentOS 7<\/strong>, if you use one of our <a href=\"https:\/\/www.rosehosting.com\/php-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">PHP 7 VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install PHP 7.2 on CentOS 7 for you. They are available 24\u00d77 and will take care of your request immediately. You may also want to refer to this guide on <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-centos-7\/\">how to install PHP 7.3 on CentOS 7<\/a> for updates.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on <strong>how to install PHP 7.2 on CentOS 7<\/strong>, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We will show you how to install PHP 7.2 on\u00a0CentOS 7 as an operating system. PHP is a server-side scripting &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install PHP 7.2 on CentOS 7\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#more-28345\" aria-label=\"Read more about How to Install PHP 7.2 on CentOS 7\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":28352,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,13,1712],"tags":[541,1625],"class_list":["post-28345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-tutorials","category-web-frameworks","tag-centos-7","tag-php-7-2","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install PHP 7.2 on CentOS 7 | RoseHosting<\/title>\n<meta name=\"description\" content=\"This tutorial explains how to install PHP 7.2 on CentOS 7. Learn how to set up and configure PHP 7.2 on a CentOS 7.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PHP 7.2 on CentOS 7\" \/>\n<meta property=\"og:description\" content=\"How to Install PHP 7.2 on CentOS 7 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-28T11:43:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-12T13:08:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install PHP 7.2 on CentOS 7\",\"datePublished\":\"2018-09-28T11:43:23+00:00\",\"dateModified\":\"2022-12-12T13:08:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/\"},\"wordCount\":678,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/how-to-install-php-7.2-on-CentOS-7.jpg\",\"keywords\":[\"centos 7\",\"PHP 7.2\"],\"articleSection\":[\"CentOS\",\"Tutorials\",\"Web Frameworks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/\",\"name\":\"How to Install PHP 7.2 on CentOS 7 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/how-to-install-php-7.2-on-CentOS-7.jpg\",\"datePublished\":\"2018-09-28T11:43:23+00:00\",\"dateModified\":\"2022-12-12T13:08:04+00:00\",\"description\":\"This tutorial explains how to install PHP 7.2 on CentOS 7. Learn how to set up and configure PHP 7.2 on a CentOS 7.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/how-to-install-php-7.2-on-CentOS-7.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/how-to-install-php-7.2-on-CentOS-7.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install php 7.2 on CentOS 7\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-2-on-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PHP 7.2 on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install PHP 7.2 on CentOS 7 | RoseHosting","description":"This tutorial explains how to install PHP 7.2 on CentOS 7. Learn how to set up and configure PHP 7.2 on a CentOS 7.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PHP 7.2 on CentOS 7","og_description":"How to Install PHP 7.2 on CentOS 7 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-09-28T11:43:23+00:00","article_modified_time":"2022-12-12T13:08:04+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install PHP 7.2 on CentOS 7","datePublished":"2018-09-28T11:43:23+00:00","dateModified":"2022-12-12T13:08:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/"},"wordCount":678,"commentCount":3,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg","keywords":["centos 7","PHP 7.2"],"articleSection":["CentOS","Tutorials","Web Frameworks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/","name":"How to Install PHP 7.2 on CentOS 7 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg","datePublished":"2018-09-28T11:43:23+00:00","dateModified":"2022-12-12T13:08:04+00:00","description":"This tutorial explains how to install PHP 7.2 on CentOS 7. Learn how to set up and configure PHP 7.2 on a CentOS 7.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/09\/how-to-install-php-7.2-on-CentOS-7.jpg","width":742,"height":372,"caption":"how to install php 7.2 on CentOS 7"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-2-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install PHP 7.2 on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=28345"}],"version-history":[{"count":6,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28345\/revisions"}],"predecessor-version":[{"id":44145,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/28345\/revisions\/44145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/28352"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=28345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=28345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=28345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}