{"id":33405,"date":"2019-09-23T11:00:07","date_gmt":"2019-09-23T07:30:07","guid":{"rendered":"https:\/\/airoserver.com\/?p=1400"},"modified":"2023-10-04T16:12:38","modified_gmt":"2023-10-04T12:42:38","slug":"changing-the-php-version","status":"publish","type":"post","link":"https:\/\/airoserver.com\/fa\/dedicated\/changing-the-php-version\/","title":{"rendered":"Changing the PHP Version"},"content":{"rendered":"<h4 class=\"wp-block-heading\"><strong>Why?<\/strong><\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Once in a while, there is a new version of <a href=\"https:\/\/en.wikipedia.org\/wiki\/PHP\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"PHP (opens in a new tab)\">PHP<\/a>. When this happens, it\u2019s better to change your version of PHP to the most updated one. This has different reasons that we will explain them shortly:<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Outdated versions: When a new version of PHP gets released, after a while the older versions become outdated and won\u2019t work anymore.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Better security: Updated versions of PHP have better security.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Plug-ins and modules: Some plug-ins and modules won\u2019t work on the old PHP versions.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\"><strong>How?<\/strong><\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Now that you know the reasons, Let\u2019s see how you should change your PHP versions.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\"><strong>If you have Cpanel as control panel:<\/strong><\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">this process is much easier for you. Cpanel has a lot of benefits that here is one of them: supporting multi versions of PHP. This means that by default, Cpanel gives you this option to change your PHP version in its area. So, all you have to do is: go to \u201cSelect PHP version\u201d section (if Cloudlinux is installed on your sever) or \u201cMulti PHP manager\u201d (if Cloudlinux isn\u2019t installed on your server) and change your PHP version.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter\"><img decoding=\"async\" class=\"wp-image-1401\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2019\/09\/images_text_chphp1.jpg\" alt=\"Select PHP version\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\"><strong>If you have Direct Admin as control panel:<\/strong><\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Direct admin doesn\u2019t have the same option as Cpanel does. Direct admin doesn\u2019t let you easily change your PHP version in its area. That\u2019s why you can only change PHP version in your direct admin, by using SSH (Remote Access). This means that you have to have root access for this. You have root access for dedicated servers and VPS. If your server is <a href=\"https:\/\/airoserver.com\/fa\/shared-hosting\/\">shared hosting<\/a>, because you are sharing that server, you can\u2019t have root access.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">If you have Dedicated Server or VPS follow these steps:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>Have a full backup of your data.<\/li>\r\n<li>Connect to SSH by using putty software and your server\u2019s <a href=\"https:\/\/airoserver.com\/fa\/blog\/what-is-ip\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"IP (opens in a new tab)\">IP<\/a>.<\/li>\r\n<li>Login with the root account.<\/li>\r\n<li>Now copy and paste each of these commands in turn and press enter after each of them.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">(Remember to replace the *current PHP version* and *New PHP version* with correct versions.)<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">cd \/usr\/local\/directadmin\/custombuild<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">nano options.conf php1_release=*current PHP version* php2_release=*New PHP version* .\/build php n<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Now that the needed PHP versions are added, you can change it in domain setup section of your direct admin.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter\"><img decoding=\"async\" class=\"wp-image-1402\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2019\/09\/images_text_change-phpini-image-3.jpg\" alt=\"Change PHP version\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Direct admin can only support maximum number of two PHP versions. If you have 2 PHP versions on it, you&#8217;ll see this in Domain setup section.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter\"><img decoding=\"async\" class=\"wp-image-1403\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2019\/09\/images_text_enhanced.jpg\" alt=\"Change PHP version\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">If you enjoyed this post, take a look at other posts on our <a href=\"https:\/\/airoserver.com\/fa\/blog\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Blog (opens in a new tab)\">Blog<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Why? Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one. This has different reasons that we will explain them shortly: Outdated versions: When a new version of PHP gets released, after a while the older versions become [&hellip;]<\/p>","protected":false},"author":5,"featured_media":33983,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[179,176,182,178],"tags":[85,177,142,183,71],"class_list":["post-33405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-airoserver","category-dedicated","category-shared-hosting","category-airo-vps","tag-airoserver","tag-dedicated-server","tag-linux","tag-shared-hosting","tag-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Changing the PHP Version<\/title>\n<meta name=\"description\" content=\"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/airoserver.com\/fa\/dedicated\/changing-the-php-version\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Changing the PHP Version\" \/>\n<meta property=\"og:description\" content=\"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/airoserver.com\/fa\/dedicated\/changing-the-php-version\/\" \/>\n<meta property=\"og:site_name\" content=\"Airoserver | Cloud Hosting Solutions\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-23T07:30:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-04T12:42:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/airoserver.com\/wp-content\/uploads\/2019\/09\/php-update-featured-image.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"321\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"SEO Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"SEO Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/\"},\"author\":{\"name\":\"SEO Team\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/62f9488eeb65ea1e571178292d4bb897\"},\"headline\":\"Changing the PHP Version\",\"datePublished\":\"2019-09-23T07:30:07+00:00\",\"dateModified\":\"2023-10-04T12:42:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/\"},\"wordCount\":428,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"keywords\":[\"airoserver\",\"Dedicated Server\",\"Linux\",\"Shared Hosting\",\"VPS\"],\"articleSection\":[\"AiroServer\",\"Dedicated\",\"Shared Hosting\",\"VPS\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/\",\"url\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/\",\"name\":\"Changing the PHP Version\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/#website\"},\"datePublished\":\"2019-09-23T07:30:07+00:00\",\"dateModified\":\"2023-10-04T12:42:38+00:00\",\"description\":\"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.\",\"breadcrumb\":{\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/airoserver.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Changing the PHP Version\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/airoserver.com\/#website\",\"url\":\"https:\/\/airoserver.com\/\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"description\":\"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver\",\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/airoserver.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/airoserver.com\/#organization\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"url\":\"https:\/\/airoserver.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"contentUrl\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"width\":925,\"height\":880,\"caption\":\"Airoserver | Cloud Hosting Solutions\"},\"image\":{\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/62f9488eeb65ea1e571178292d4bb897\",\"name\":\"SEO Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0cc6a1209a0e36c0bf4f0fcdcd743946df92fde7ba86163b0724f194a722a861?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0cc6a1209a0e36c0bf4f0fcdcd743946df92fde7ba86163b0724f194a722a861?s=96&d=mm&r=g\",\"caption\":\"SEO Team\"},\"url\":\"https:\/\/airoserver.com\/fa\/author\/seoteam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Changing the PHP Version","description":"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.","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:\/\/airoserver.com\/fa\/dedicated\/changing-the-php-version\/","og_locale":"fa_IR","og_type":"article","og_title":"Changing the PHP Version","og_description":"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.","og_url":"https:\/\/airoserver.com\/fa\/dedicated\/changing-the-php-version\/","og_site_name":"Airoserver | Cloud Hosting Solutions","article_published_time":"2019-09-23T07:30:07+00:00","article_modified_time":"2023-10-04T12:42:38+00:00","og_image":[{"width":700,"height":321,"url":"https:\/\/airoserver.com\/wp-content\/uploads\/2019\/09\/php-update-featured-image.jpg","type":"image\/jpeg"}],"author":"SEO Team","twitter_card":"summary_large_image","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"SEO Team","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"2 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#article","isPartOf":{"@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/"},"author":{"name":"SEO Team","@id":"https:\/\/airoserver.com\/#\/schema\/person\/62f9488eeb65ea1e571178292d4bb897"},"headline":"Changing the PHP Version","datePublished":"2019-09-23T07:30:07+00:00","dateModified":"2023-10-04T12:42:38+00:00","mainEntityOfPage":{"@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/"},"wordCount":428,"commentCount":0,"publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"keywords":["airoserver","Dedicated Server","Linux","Shared Hosting","VPS"],"articleSection":["AiroServer","Dedicated","Shared Hosting","VPS"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/","url":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/","name":"Changing the PHP Version","isPartOf":{"@id":"https:\/\/airoserver.com\/#website"},"datePublished":"2019-09-23T07:30:07+00:00","dateModified":"2023-10-04T12:42:38+00:00","description":"Once in a while, there is a new version of PHP. When this happens, it\u2019s better to change your version of PHP to the most updated one.","breadcrumb":{"@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/airoserver.com\/dedicated\/changing-the-php-version\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/airoserver.com\/"},{"@type":"ListItem","position":2,"name":"Changing the PHP Version"}]},{"@type":"WebSite","@id":"https:\/\/airoserver.com\/#website","url":"https:\/\/airoserver.com\/","name":"Airoserver | Cloud Hosting Solutions","description":"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver","publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/airoserver.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fa-IR"},{"@type":"Organization","@id":"https:\/\/airoserver.com\/#organization","name":"Airoserver | Cloud Hosting Solutions","url":"https:\/\/airoserver.com\/","logo":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/","url":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","contentUrl":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","width":925,"height":880,"caption":"Airoserver | Cloud Hosting Solutions"},"image":{"@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/airoserver.com\/#\/schema\/person\/62f9488eeb65ea1e571178292d4bb897","name":"SEO Team","image":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/airoserver.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0cc6a1209a0e36c0bf4f0fcdcd743946df92fde7ba86163b0724f194a722a861?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0cc6a1209a0e36c0bf4f0fcdcd743946df92fde7ba86163b0724f194a722a861?s=96&d=mm&r=g","caption":"SEO Team"},"url":"https:\/\/airoserver.com\/fa\/author\/seoteam\/"}]}},"_links":{"self":[{"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/posts\/33405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/comments?post=33405"}],"version-history":[{"count":0,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/posts\/33405\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/media\/33983"}],"wp:attachment":[{"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/media?parent=33405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/categories?post=33405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airoserver.com\/fa\/wp-json\/wp\/v2\/tags?post=33405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}