{"id":5610,"date":"2022-01-14T06:53:00","date_gmt":"2022-01-14T12:53:00","guid":{"rendered":"https:\/\/www.knownhost.com\/kb\/?p=5610"},"modified":"2026-01-23T06:29:27","modified_gmt":"2026-01-23T12:29:27","slug":"how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild","status":"publish","type":"post","link":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/","title":{"rendered":"How To Recompile Only a Single Version Of PHP With DirectAdmin&#8217;s CustomBuild?"},"content":{"rendered":"\n<p>Let&#8217;s say that you have four versions of PHP installed, and you only want to update the default PHP version or php1_release. You know that if you do, recompiling all versions of PHP is going to take a while, so you may be deterred to update because of this. In the following example, we have four versions of PHP and only want to update php1_release from version 7.2 to version 7.3,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php1_release 7.2\nphp2_release 7.1\nphp3_release 7.0\nphp4_release 5.6<\/code><\/pre>\n\n\n\n<p>You can check the PHP versions and handlers installed using the following command,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -P 'php&#91;\\d]_' \/usr\/local\/directadmin\/custombuild\/options.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@host ~]#   grep -P 'php&#91;\\d]_' \/usr\/local\/directadmin\/custombuild\/options.conf\nphp1_release=7.2\nphp1_mode=php-fpm\nphp2_release=7.1\nphp2_mode=php-fpm\nphp3_release=7.0\nphp3_mode=php-fpm\nphp4_release=5.6\nphp4_mode=php-fpm<\/code><\/pre>\n\n\n\n<p>You can use php_expert to compile only a single version and save yourself some time. Use the below commands like so (provided the PHP version is using PHP-FPM),<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\/custombuild \n.\/build set php1_release 7.3 \n.\/build update \n.\/build php_expert 7.3 php-fpm \n.\/build rewrite_confs<\/code><\/pre>\n\n\n\n<p>The system will take some time for the recompilation and viola! The php_expert build option is ideal for busy system administrators eager to save time and provide quicker resolutions for their clients. You can confirm the changes using the same command,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@host ~]#   grep -P 'php&#91;\\d]_' \/usr\/local\/directadmin\/custombuild\/options.conf\n<strong>php1_release=7.3\n<\/strong>php1_mode=php-fpm\nphp2_release=7.1\nphp2_mode=php-fpm\nphp3_release=7.0\nphp3_mode=php-fpm\nphp4_release=5.6\nphp4_mode=php-fpm<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Now that we\u2019ve gone over how to recompile only a single version of PHP version with DirectAdmin&#8217;s CustomBuild. Using this article, you don&#8217;t need to recompile all the PHP versions and wasting of your time.<\/p>\n\n\n\n<p>KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests should you need our assistance. You\u2019re not using KnownHost for the best webhosting experience? Well, why not? Check with&nbsp;<a href=\"https:\/\/www.knownhost.com\/contact\">our Sales team<\/a>&nbsp;to see what can&nbsp;<a href=\"https:\/\/www.knownhost.com\/\">KnownHost<\/a>&nbsp;do for you in improving your webhosting experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say that you have four versions of PHP installed, and you only want to update the default PHP version or php1_release. You know that if you do, recompiling all versions of PHP is going to take a while, so you may be deterred to update because of this. In the following example, we have [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[532,128,198],"class_list":["post-5610","post","type-post","status-publish","format-standard","hentry","category-directadmin","tag-compile","tag-directadmin","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost<\/title>\n<meta name=\"description\" content=\"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.\" \/>\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.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost\" \/>\n<meta property=\"og:description\" content=\"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\" \/>\n<meta property=\"og:site_name\" content=\"KnownHost\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-14T12:53:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-23T12:29:27+00:00\" \/>\n<meta name=\"author\" content=\"Somesh Z\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Somesh Z\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\"},\"author\":{\"name\":\"Somesh Z\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\"},\"headline\":\"How To Recompile Only a Single Version Of PHP With DirectAdmin&#8217;s CustomBuild?\",\"datePublished\":\"2022-01-14T12:53:00+00:00\",\"dateModified\":\"2026-01-23T12:29:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\"},\"wordCount\":271,\"keywords\":[\"compile\",\"directadmin\",\"php\"],\"articleSection\":[\"DirectAdmin\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\",\"url\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\",\"name\":\"Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost\",\"isPartOf\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/#website\"},\"datePublished\":\"2022-01-14T12:53:00+00:00\",\"dateModified\":\"2026-01-23T12:29:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\"},\"description\":\"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.knownhost.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Recompile Only a Single Version Of PHP With DirectAdmin&#8217;s CustomBuild?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#website\",\"url\":\"https:\/\/www.knownhost.com\/kb\/\",\"name\":\"KnownHost\",\"description\":\"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\",\"name\":\"Somesh Z\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"caption\":\"Somesh Z\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost","description":"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.","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.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/","og_locale":"en_US","og_type":"article","og_title":"Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost","og_description":"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.","og_url":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/","og_site_name":"KnownHost","article_published_time":"2022-01-14T12:53:00+00:00","article_modified_time":"2026-01-23T12:29:27+00:00","author":"Somesh Z","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Somesh Z","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#article","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/"},"author":{"name":"Somesh Z","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1"},"headline":"How To Recompile Only a Single Version Of PHP With DirectAdmin&#8217;s CustomBuild?","datePublished":"2022-01-14T12:53:00+00:00","dateModified":"2026-01-23T12:29:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/"},"wordCount":271,"keywords":["compile","directadmin","php"],"articleSection":["DirectAdmin"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/","url":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/","name":"Recompile Single PHP Version with DirectAdmin CustomBuild | KnownHost","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/#website"},"datePublished":"2022-01-14T12:53:00+00:00","dateModified":"2026-01-23T12:29:27+00:00","author":{"@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1"},"description":"Instead of compiling all the php versions you can recompile php version you need. Learn, how to do this with directadmin.","breadcrumb":{"@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.knownhost.com\/kb\/how-to-recompile-only-a-single-version-of-php-with-directadmins-custombuild\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knownhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How To Recompile Only a Single Version Of PHP With DirectAdmin&#8217;s CustomBuild?"}]},{"@type":"WebSite","@id":"https:\/\/www.knownhost.com\/kb\/#website","url":"https:\/\/www.knownhost.com\/kb\/","name":"KnownHost","description":"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1","name":"Somesh Z","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","caption":"Somesh Z"}}]}},"_links":{"self":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/5610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/comments?post=5610"}],"version-history":[{"count":1,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/5610\/revisions"}],"predecessor-version":[{"id":8027,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/5610\/revisions\/8027"}],"wp:attachment":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/media?parent=5610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/categories?post=5610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/tags?post=5610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}