{"id":9335,"date":"2023-12-13T04:46:33","date_gmt":"2023-12-13T04:46:33","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?post_type=manual_kb&#038;p=9335"},"modified":"2025-12-16T12:49:15","modified_gmt":"2025-12-16T07:19:15","slug":"how-to-increase-file-upload-size-in-directadmin","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-increase-file-upload-size-in-directadmin","title":{"rendered":"How to Increase File Upload Size in DirectAdmin"},"content":{"rendered":"\n<p> Suppose you are uploading an image or some files and you are getting an error that the file cannot be uploaded, then what will you do? Definitely, you will have to increase the file upload size for your website. So in this tutorial, we will learn how to increase file upload size in DirectAdmin.<\/p>\n\n\n\n<p>This article will help you to increase file upload size in <a href=\"https:\/\/www.directadmin.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Directadmin<\/a> Panel.<\/p>\n\n\n\n<p><strong>We can increase the file upload size in the following ways:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using PHP Selector<\/li>\n\n\n\n<li>Editing the .htaccess file<\/li>\n<\/ul>\n\n\n\n<p><strong>Now, let\u2019s see how you can increase file upload size in DirectAdmin for different PHP versions.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-1-using-php-selector\"><strong>Method-1<\/strong> <strong>Using PHP Selector<\/strong><\/h2>\n\n\n\n<p><strong>1.<\/strong> <a href=\"https:\/\/youstable.com\/blog\/how-to-login-into-directadmin\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Log in to your Directadmin account<\/strong><\/a> replacing domain.com with your domain name using the login credentials provided by your hosting provider.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>https:\/\/domain.com:2222<\/strong><\/code><\/pre>\n\n\n\n<p><strong>2. <\/strong>On the top right corner, select the <strong>domain name<\/strong> for which the <strong>PHP version needs to be changed<\/strong>.<\/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=\"\" 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><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=\"\" 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><strong>4. <\/strong>Select <strong>Extensions<\/strong> and  click on the drop-down arrow near <strong>Current PHP Version<br><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"919\" height=\"688\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/3.png\" alt=\"\" class=\"wp-image-5134\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/3.png 919w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/3-768x575.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/3-810x606.png 810w\" sizes=\"auto, (max-width: 919px) 100vw, 919px\" \/><\/figure>\n\n\n\n<p><strong>5. <\/strong>Select your <strong>PHP version as per your requirement<\/strong>, here am <strong>selecting 7.4<\/strong> and clicking on \u201c<strong>Set as current<\/strong>\u201d.<img decoding=\"async\" style=\"width: undefinedpx;\" src=\"https:\/\/lh3.googleusercontent.com\/YNnfaZBjDpOIqtgxlmguOO5DzjN02XbefXvKSWZJcUMruNMSH-LMO3VhiweEN_jW_Msq8v0wfgatOo6KFyy4bJtWoZ8vn-5lZwP3sRIiV3iNHLKvjGnOuVWwe0x2gvztWzqOjlm4\" alt=\"\"><\/p>\n\n\n\n<p><strong>The above steps will help you select your PHP Version.<\/strong><\/p>\n\n\n\n<p><strong>6. <\/strong>Go to <strong>Options<\/strong> for modifying the upload size and other PHP Values.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_Options.png\" alt=\"\" class=\"wp-image-5135\" width=\"616\" height=\"530\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_Options.png 877w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_Options-768x660.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_Options-810x696.png 810w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n\n\n\n<p><strong>7. <\/strong>Scroll down to the bottom of the page and find out &#8220;upload_max_filesize&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_upload_max_filesize.png\" alt=\"\" class=\"wp-image-5141\" width=\"661\" height=\"512\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_upload_max_filesize.png 833w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_upload_max_filesize-768x595.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/PHP_selector_upload_max_filesize-810x627.png 810w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/figure>\n\n\n\n<p><strong>8. <\/strong>Click the drop-down arrow given besides the upload value and select the required size. Here I am selecting 1G.<br><br><strong>Note:<\/strong> Here 1G means 1GB<\/p>\n\n\n\n<p><strong>9.<\/strong> From here you can set the max_execution_time, memory_limit and post_max_size as per your requirement.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-2-editing-the-htaccess-file\"><strong>Method-2  Editing the .htaccess file<\/strong><\/h2>\n\n\n\n<p><strong>1.<\/strong> <a href=\"https:\/\/youstable.com\/blog\/how-to-login-into-directadmin\/\" target=\"_blank\" rel=\"noopener\">Login into DirectAdmin<\/a> control panel and navigate to <strong>File Manager<\/strong><\/p>\n\n\n\n<p><strong>2. <\/strong>Click\u00a0<strong>Domains<\/strong>\u00a0\u2013> your domain <strong>(for which you want to edit .htaccess)<\/strong> \u2013><strong>public_html<\/strong> -> <strong>.htaccess<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/public_html_dir_admin-e1641898579405.png\" alt=\".htaccess public_html_dir_admin\" class=\"wp-image-5145\" width=\"813\" height=\"462\"\/><\/figure>\n\n\n\n<p><strong>3.<\/strong> Right click on <strong>.htaccess<\/strong> and click <strong>Edit<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"902\" height=\"553\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-edit.png\" alt=\"\" class=\"wp-image-5146\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-edit.png 902w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-edit-768x471.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-edit-810x497.png 810w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<p><strong>4. Copy and paste<\/strong> the following <strong>code and modify the values<\/strong> as per your requirement at the last and click <strong>save<\/strong>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nphp_value memory_limit 512M\nphp_value post_max_size 900M\nphp_value upload_max_filesize 900M\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"672\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-code.png\" alt=\"\" class=\"wp-image-5147\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-code.png 843w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-code-768x612.png 768w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/htaccess-code-810x646.png 810w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<p><strong>You may also like<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/www.youstable.com\/blog\/knowledgebase\/how-to-change-php-version-in-directadmin\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to change PHP version in DirectAdmin?<\/a><\/strong><\/li>\n\n\n\n<li><a href=\"https:\/\/www.youstable.com\/blog\/knowledgebase\/how-to-change-link-color-in-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to change link color in WordPress?<\/strong><\/a><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.youstable.com\/blog\/knowledgebase\/how-to-display-breadcrumb-navigation-links\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Display Breadcrumb Navigation Links in WordPress?<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.youstable.com\/blog\/knowledgebase\/how-to-redirect-your-404-pages\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Redirect your 404 pages to the Home Page in WordPress<\/a>?<\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/youstable.com\/blog\/knowledgebase\/edit-wp-config-php-file\/\" target=\"_blank\" rel=\"noopener\">How to Edit wp-config.php File in WordPress?<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Suppose you are uploading an image or some files and you are getting an error that the file cannot be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6782,"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":""}},"footnotes":""},"categories":[350],"tags":[],"class_list":["post-9335","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2022\/01\/How-to-increase-file-upload-size-in-DirectAdmin-01.jpg","author_info":{"display_name":"YouStable","author_link":"https:\/\/www.youstable.com\/blog\/author\/youstable"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9335","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=9335"}],"version-history":[{"count":1,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9335\/revisions"}],"predecessor-version":[{"id":11041,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9335\/revisions\/11041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/6782"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=9335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=9335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=9335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}