{"id":9301,"date":"2023-12-13T04:39:08","date_gmt":"2023-12-13T04:39:08","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?post_type=manual_kb&#038;p=9301"},"modified":"2025-11-22T04:48:34","modified_gmt":"2025-11-22T04:48:34","slug":"how-to-change-php-version-in-directadmin","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-change-php-version-in-directadmin\/","title":{"rendered":"How to change PHP version in DirectAdmin?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Suppose you are facing Outdated PHP Version errors on your website, then what will you do? Definitely, you will have to change PHP Version for your website. So in this tutorial, we will learn how to change PHP version in DirectAdmin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article will help you to change the PHP version on the <a href=\"https:\/\/www.directadmin.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Directadmin<\/a> Panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s see how you can change the PHP version for your Website using the Directadmin Panel.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-change-php-version-from-directadmin\"><strong>How to Change PHP Version from Directadmin.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. <\/strong><a href=\"https:\/\/www.youstable.com\/blog\/\" target=\"_blank\" rel=\"noreferrer noopener\">Login to your Directadmin account<\/a> replacing domain.com with your domain name using the login credentials provided by your hosting provider.<br>https:\/\/domain.com:2222<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. <\/strong>On the top right corner, select the domain name for which the PHP version needs to be changed.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"467\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/11\/1-2.png\" alt=\"How to change PHP version in DirectAdmin? - screenshot 1\" class=\"wp-image-4438\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/1-2.png 932w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/1-2-768x385.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/1-2-810x406.png 810w\" sizes=\"auto, (max-width: 932px) 100vw, 932px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. <\/strong>Scroll down and click \u201c<strong>Select PHP Version<\/strong>\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"416\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/11\/2-2.png\" alt=\"How to change PHP version in DirectAdmin? - screenshot 2\" class=\"wp-image-4439\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/2-2.png 911w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/2-2-768x351.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/2-2-810x370.png 810w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. <\/strong>Click on the drop-down arrow near <strong>Current PHP Version<br><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><img decoding=\"async\" alt=\"IINdT2QEI opWDGrD9OTWeCj62ezVF sHtgkc83PAWcb5OB4S6efuPkmyWp1hofLo4G d7dpEkpBpGEAbz8zLEHynHV DSAAAzlv1JvJXXY 2jdlpxWhave9DE3TYz9HEQ tm9\" src=\"https:\/\/lh6.googleusercontent.com\/iINdT2QEI__opWDGrD9OTWeCj62ezVF-sHtgkc83PAWcb5OB4S6efuPkmyWp1hofLo4G_d7dpEkpBpGEAbz8zLEHynHV_DSAAAzlv1JvJXXY--2jdlpxWhave9DE3TYz9HEQ-tm9\" style=\"width: undefinedpx;\"><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. <\/strong>Select your PHP Version as per your requirement, here am selecting 7.4 and clicking on \u201cSet as current\u201d.<img decoding=\"async\" alt=\"YNnfaZBjDpOIqtgxlmguOO5DzjN02XbefXvKSWZJcUMruNMSH LMO3VhiweEN jW Msq8v0wfgatOo6KFyy4bJtWoZ8vn 5lZwP3sRIiV3iNHLKvjGnOuVWwe0x2gvztWzqOjlm4\" src=\"https:\/\/lh3.googleusercontent.com\/YNnfaZBjDpOIqtgxlmguOO5DzjN02XbefXvKSWZJcUMruNMSH-LMO3VhiweEN_jW_Msq8v0wfgatOo6KFyy4bJtWoZ8vn-5lZwP3sRIiV3iNHLKvjGnOuVWwe0x2gvztWzqOjlm4\" style=\"width: undefinedpx;\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The above steps will help you select your PHP Version. Now let\u2019s see how we can check the PHP Version on your website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"checking-php-version-for-your-website\"><strong>Checking PHP Version for your website.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. <\/strong>Create a file in your <strong>public_html directory<\/strong> of the domain with any name let\u2019s say xyz.php.<br>Our file path will be \/home\/domain\/public_html\/xyz.php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. <\/strong>Add the following line of code in the file and save it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nphpinfo();\n?&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>3. <\/strong>Now open your URL <strong>domain.com\/xyz.php<\/strong> to test the current PHP Version. It will show the PHP Info web page with all the PHP variables and settings.<img decoding=\"async\" alt=\"LLFLcX6n6azuQjxnNfMMvqw4mlFaUDDpEo763Ok99EeQus7EOFGrnu9KKuOwtKQ8mrE8YMsxxmIN5IeUaiWXWtZwZIeoDlacUgBoGDlBFeklT5EKGp4uuB2JyZY i DjGV3GChrz\" src=\"https:\/\/lh6.googleusercontent.com\/LLFLcX6n6azuQjxnNfMMvqw4mlFaUDDpEo763Ok99EeQus7EOFGrnu9KKuOwtKQ8mrE8YMsxxmIN5IeUaiWXWtZwZIeoDlacUgBoGDlBFeklT5EKGp4uuB2JyZY-i-DjGV3GChrz\" style=\"width: undefinedpx;\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You may also like<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/youstable.com\/blog\/knowledge-base-2\/how-to-change-link-color-in-wordpress\/\" target=\"_blank\" rel=\"noopener\"><strong>How to change link color in WordPress?<\/strong><\/a><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youstable.com\/blog\/knowledge-base-2\/display-breadcrumb-navigation-links-in-wordpress\/\" target=\"_blank\" rel=\"noopener\">How to Display Breadcrumb Navigation Links in WordPress?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youstable.com\/blog\/knowledge-base-2\/how-to-add-expires-headers\/\" target=\"_blank\" rel=\"noopener\">How to Add Expires Headers To Your WordPress Website?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youstable.com\/blog\/knowledge-base-2\/how-to-remove-wordpress-version\/\" target=\"_blank\" rel=\"noopener\">How to Remove WordPress Version Number?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youstable.com\/blog\/knowledge-base-2\/how-to-change-background-color\/\" target=\"_blank\" rel=\"noopener\">How to Change Background Color in WordPress<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Suppose you are facing Outdated PHP Version errors on your website, then what will you do? Definitely, you will have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6873,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"iawp_total_views":87,"footnotes":""},"categories":[2275,350],"tags":[],"class_list":["post-9301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kb-directadmin","category-knowledgebase"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=9301"}],"version-history":[{"count":0,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9301\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/6873"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=9301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=9301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=9301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}