{"id":1624,"date":"2025-10-28T08:21:33","date_gmt":"2025-10-28T08:21:33","guid":{"rendered":"https:\/\/www.dewlance.com\/blog\/?p=1624"},"modified":"2025-10-28T08:27:22","modified_gmt":"2025-10-28T08:27:22","slug":"how-to-install-the-php-tidy-extension-in-directadmin","status":"publish","type":"post","link":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin","title":{"rendered":"How to Install the PHP Tidy Extension in DirectAdmin"},"content":{"rendered":"<p>The Tidy extension in DirectAdmin is not available by default, so you need to do some manual work. It\u2019s very easy, and you don\u2019t need to be a server expert.<\/p>\n<p>First, we need to install the <strong>PHP Tidy development package<\/strong>. I am using a <strong>RHEL\/CentOS\/AlmaLinux-based OS<\/strong>, so I will use the yum command. <strong>For Ubuntu<\/strong>, you can use <strong>apt install<\/strong> instead of yum.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 1:<\/h3>\n<p><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">yum install libtidy-devel<\/span><\/code><\/span><\/p>\n<p>Now, go to the DirectAdmin CustomBuild directory. Create a custom\/php directory and copy the PHP config file to it. Change the PHP version according to your needs. <strong>I am enabling it on PHP 8.1<\/strong>, so I am using php81. If you want to enable it on PHP 8.2, replace php81 with php82 in the command below.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2:<\/h3>\n<p><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">cd \/usr\/local\/directadmin\/custombuild<\/span><\/code><\/span><\/p>\n<p><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">mkdir -p custom\/php<\/span><\/code><\/span><br \/>\n<span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">cp -fp \"configure\/php\/configure.php81\" \"custom\/php\/configure.php81\"<\/span><\/code><\/span><br \/>\n<span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">cd custom\/php<br \/>\n<span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">nano configure.php81<\/span><\/code><\/span><\/span><\/code><\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 3:<\/h3>\n<p>Add below line just before any <strong>-with-extension-name \\<\/strong> line.<\/p>\n<p><strong><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\"> --with-tidy \\ <\/span><\/code><\/span><\/strong><\/p>\n<p><strong>Example<\/strong>:<\/p>\n<p><strong>Before:<\/strong><\/p>\n<p>&#8211;with-zip \\<br \/>\n&#8211;enable-bcmath \\<\/p>\n<p><strong>After:\u00a0<\/strong><br \/>\n&#8211;with-zip \\<br \/>\n<strong>&#8211;with-tidy \\ <\/strong><br \/>\n&#8211;enable-bcmath \\ <\/p>\n<p>&nbsp;<br \/>\nSave your changes.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 4<\/h3>\n<p>Go back to the custom build directory of DirectAdmin.<\/p>\n<p><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">cd \/usr\/local\/directadmin\/custombuild <\/span><\/code><\/p>\n<p>Now, get the PHP slot for your PHP version from the options.conf file in DirectAdmin.<\/p>\n<p><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">grep -P 'php[\\d]_' \/usr\/local\/directadmin\/custombuild\/options.conf\u00a0<\/span><\/code><\/span><\/p>\n<p><strong>Output will be something like:<\/strong><\/p>\n<p>php1_release=8.2<br \/>\nphp1_mode=fastcgi<br \/>\n<strong>php2_release=8.1<\/strong><br \/>\n&nbsp;<br \/>\n<strong>PHP 8.1<\/strong> is using the <strong>php2<\/strong> slot. Note it.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 5<\/h3>\n<p>Now, we\u2019re going to recompile the PHP version. Since we only enabled Tidy on PHP 8.1, I will compile only PHP 8.1 to save time.<\/p>\n<p>Replace <strong>php2<\/strong> in below command with the slot number we get in the step 4.<\/p>\n<p><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">cd \/usr\/local\/directadmin\/custombuild<\/span><\/code><\/span><br \/>\n<span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">.\/build php_expert 8.1 <strong>php2<\/strong><\/span><\/code><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>If you are using the <code class=\"o8j0Mc\" dir=\"ltr\" data-complete=\"true\" data-processed=\"true\">php-fpm<\/code> handler, you should also include it in the command:<span class=\"uJ19be notranslate\" data-wiz-uids=\"YzOYT_1bf,YzOYT_1bg\" data-complete=\"true\" data-processed=\"true\"><span class=\"vKEkVd\" data-animation-atomic=\"\" data-processed=\"true\">\u00a0<\/span><\/span><\/p>\n<p>.\/build php_expert 8.1 php2-fpm<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 6:<\/h3>\n<p><strong><span style=\"color: #808080;\"><code data-processed=\"true\"><span class=\"undefined\" data-processed=\"true\">.\/build rewrite_confs<\/span><\/code><\/span><\/span><\/code><\/span><\/p>\n<p>Finally, you know how to enable PHP Tidy extension in DirectAdmin Hosting Control Panel. If you are interested in such useful tutorials then you can also purchase video tutorials from DemoTiger for your hosting company or blog.<\/p>\n<p>Note: This is not AI written. Please do not copy our article without prior written permission from Dewlance owner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Tidy extension in DirectAdmin is not available by default, so you need to do some manual work. It\u2019s very easy, and you don\u2019t need to be a server expert. First, we need to install the PHP Tidy development package. I am using a RHEL\/CentOS\/AlmaLinux-based OS, so I will use the yum command. For Ubuntu, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[231],"tags":[765,762,763,764],"class_list":["post-1624","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-directadmin-useful-tutorials","tag-how-to-enable-php-tidy-in-directadmin","tag-how-to-install-php-tidy-extension-with-php-8-1-in-directadmin","tag-installing-php-tidy-on-directadmin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance<\/title>\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.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance\" \/>\n<meta property=\"og:description\" content=\"The Tidy extension in DirectAdmin is not available by default, so you need to do some manual work. It\u2019s very easy, and you don\u2019t need to be a server expert. First, we need to install the PHP Tidy development package. I am using a RHEL\/CentOS\/AlmaLinux-based OS, so I will use the yum command. For Ubuntu, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Blog - Dewlance\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dewlance.hosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-28T08:21:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-28T08:27:22+00:00\" \/>\n<meta name=\"author\" content=\"K.S\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dewlance\" \/>\n<meta name=\"twitter:site\" content=\"@dewlance\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"K.S\" \/>\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.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\"},\"author\":{\"name\":\"K.S\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694\"},\"headline\":\"How to Install the PHP Tidy Extension in DirectAdmin\",\"datePublished\":\"2025-10-28T08:21:33+00:00\",\"dateModified\":\"2025-10-28T08:27:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\"},\"wordCount\":323,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\"},\"keywords\":[\"DirectAdmin useful tutorials\",\"How to enable PHP Tidy in DirectAdmin\",\"How to install PHP Tidy extension with PHP 8.1 in DirectAdmin\",\"Installing PHP Tidy on DirectAdmin\"],\"articleSection\":[\"Miscellaneous\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\",\"url\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\",\"name\":\"How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance\",\"isPartOf\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#website\"},\"datePublished\":\"2025-10-28T08:21:33+00:00\",\"dateModified\":\"2025-10-28T08:27:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dewlance.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install the PHP Tidy Extension in DirectAdmin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#website\",\"url\":\"https:\/\/www.dewlance.com\/blog\/\",\"name\":\"Web Hosting Blog - Dewlance\",\"description\":\"Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dewlance.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\",\"name\":\"Dewlance\",\"url\":\"https:\/\/www.dewlance.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png\",\"contentUrl\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png\",\"width\":274,\"height\":89,\"caption\":\"Dewlance\"},\"image\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/dewlance.hosting\/\",\"https:\/\/x.com\/dewlance\",\"https:\/\/www.youtube.com\/user\/dewlances\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694\",\"name\":\"K.S\",\"url\":\"https:\/\/www.dewlance.com\/blog\/author\/dewlancevpsxen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance","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.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin","og_locale":"en_US","og_type":"article","og_title":"How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance","og_description":"The Tidy extension in DirectAdmin is not available by default, so you need to do some manual work. It\u2019s very easy, and you don\u2019t need to be a server expert. First, we need to install the PHP Tidy development package. I am using a RHEL\/CentOS\/AlmaLinux-based OS, so I will use the yum command. For Ubuntu, [&hellip;]","og_url":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin","og_site_name":"Web Hosting Blog - Dewlance","article_publisher":"https:\/\/www.facebook.com\/dewlance.hosting\/","article_published_time":"2025-10-28T08:21:33+00:00","article_modified_time":"2025-10-28T08:27:22+00:00","author":"K.S","twitter_card":"summary_large_image","twitter_creator":"@dewlance","twitter_site":"@dewlance","twitter_misc":{"Written by":"K.S","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#article","isPartOf":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin"},"author":{"name":"K.S","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694"},"headline":"How to Install the PHP Tidy Extension in DirectAdmin","datePublished":"2025-10-28T08:21:33+00:00","dateModified":"2025-10-28T08:27:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin"},"wordCount":323,"commentCount":0,"publisher":{"@id":"https:\/\/www.dewlance.com\/blog\/#organization"},"keywords":["DirectAdmin useful tutorials","How to enable PHP Tidy in DirectAdmin","How to install PHP Tidy extension with PHP 8.1 in DirectAdmin","Installing PHP Tidy on DirectAdmin"],"articleSection":["Miscellaneous"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin","url":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin","name":"How to Install the PHP Tidy Extension in DirectAdmin - Web Hosting Blog - Dewlance","isPartOf":{"@id":"https:\/\/www.dewlance.com\/blog\/#website"},"datePublished":"2025-10-28T08:21:33+00:00","dateModified":"2025-10-28T08:27:22+00:00","breadcrumb":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dewlance.com\/blog\/how-to-install-the-php-tidy-extension-in-directadmin#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dewlance.com\/blog"},{"@type":"ListItem","position":2,"name":"How to Install the PHP Tidy Extension in DirectAdmin"}]},{"@type":"WebSite","@id":"https:\/\/www.dewlance.com\/blog\/#website","url":"https:\/\/www.dewlance.com\/blog\/","name":"Web Hosting Blog - Dewlance","description":"Tutorials","publisher":{"@id":"https:\/\/www.dewlance.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dewlance.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dewlance.com\/blog\/#organization","name":"Dewlance","url":"https:\/\/www.dewlance.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png","contentUrl":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png","width":274,"height":89,"caption":"Dewlance"},"image":{"@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dewlance.hosting\/","https:\/\/x.com\/dewlance","https:\/\/www.youtube.com\/user\/dewlances\/"]},{"@type":"Person","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694","name":"K.S","url":"https:\/\/www.dewlance.com\/blog\/author\/dewlancevpsxen"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/1624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/comments?post=1624"}],"version-history":[{"count":5,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/1624\/revisions"}],"predecessor-version":[{"id":1629,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/1624\/revisions\/1629"}],"wp:attachment":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/media?parent=1624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/categories?post=1624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/tags?post=1624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}