{"id":23027,"date":"2019-11-14T16:03:29","date_gmt":"2019-11-14T16:03:29","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=23027"},"modified":"2025-12-22T13:54:32","modified_gmt":"2025-12-22T13:54:32","slug":"how-to-increase-the-maximum-file-upload-size-in-wordpress","status":"publish","type":"post","link":"\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","title":{"rendered":"How to increase the maximum upload file size in WordPress: 3 ways + reasons to do it"},"content":{"rendered":"<p>Are you unable to upload large files to WordPress? We&rsquo;ve got you covered! Here, we will uncover how to increase the maximum file upload size in WordPress. By the end of the article, you will know how to modify the upload limit to meet your needs.<\/p><p>\n\n\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-three-ways-to-increase-wordpress-maximum-file-upload-size\">Three Ways to Increase WordPress Maximum File Upload Size<\/h2><p>To modify WordPress&rsquo; file upload size, you need to access your hosting control panel and WordPress administrator dashboard. Make sure you have access to both of them before diving into the tutorial below.<\/p><p>Here are three ways to increase WordPress&rsquo; maximum file upload size:<\/p><h3 class=\"wp-block-heading\" id=\"h-1-modifying-htaccess-file\">1. Modifying .htaccess File<\/h3><p>Many hosting providers allow you to change the PHP settings via <strong>.htaccess<\/strong> file. You can take advantage of this ability to apply <strong>php_value upload_max_filesize<\/strong> rule in this file.<\/p><p>Here&rsquo;s how this method works:<\/p><ol class=\"wp-block-list\">\n<li>Access the WordPress root directory (<strong>public_html<\/strong>) via an <a href=\"\/tutorials\/ftp\/filezilla-ftp-configuration\">FTP client<\/a> or File Manager. For Hostinger users, you can access the <strong>File Manager<\/strong> in your hPanel dashboard.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\"><img decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\/public\" alt=\"File manager button in hPanel\" class=\"wp-image-81343\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Open the <strong>.htaccess<\/strong> file and add the following code to the bottom of the file. Once you&rsquo;re done, save the changes.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\"><img decoding=\"async\" width=\"1402\" height=\"652\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/public\" alt=\"Locating .htaccess file in the root directory using Hostinger's File Manager\" class=\"wp-image-101947\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=1402,fit=scale-down 1402w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1402px) 100vw, 1402px\" \/><\/a><\/figure><\/div><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">php_value upload_max_filesize 128M\nphp_value post_max_size 128M\nphp_value max_execution_time 300\nphp_value max_input_time 300<\/pre><h3 class=\"wp-block-heading\" id=\"h-2-configuring-php-ini-file\">2. Configuring php.ini File<\/h3><p>This method is most suitable for WordPress sites with VPS hosting as shared hosting providers generally don&rsquo;t allow editing the <strong>php.ini<\/strong> file. If you&rsquo;re running on shared hosting, make sure to contact your hosting support team and clarify whether or not you can modify the <strong>php.ini<\/strong> file.<\/p><p>Here&rsquo;s how to increase the maximum file upload size by configuring <strong>php.ini<\/strong> file:<\/p><ol class=\"wp-block-list\">\n<li>Access the WordPress root directory (public_html) via an FTP client, File Manager, or <a href=\"\/tutorials\/ssh-tutorial-how-does-ssh-work\">SSH<\/a> (if it&rsquo;s supported), then open the <strong>php.ini<\/strong> file. If you cannot find the file, create one under the same name and filetype in the root directory.<\/li>\n\n\n\n<li>Add the following code to the <strong>php.ini<\/strong> file and save the changes. <code data-enlighter-language=\"null\" class=\"EnlighterJSRAW\">upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300<\/code> <\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-3-editing-functions-php-file\">3. Editing functions.php file<\/h3><p>Alternatively, you can increase WordPress&rsquo; maximum file upload size by modifying your theme&rsquo;s <strong>functions.php<\/strong> file. Despite so, please note that the modification will revert to default if you change your site&rsquo;s theme.<\/p><p>Here&rsquo;s how to change the maximum file upload size by modifying <strong>functions.php<\/strong> file:<\/p><ol class=\"wp-block-list\">\n<li>From your WordPress dashboard, navigate to <strong>Appearance<\/strong> -&gt; <strong>Theme Editor<\/strong>.<\/li>\n\n\n\n<li>Open the theme functions file (<strong>functions.php<\/strong>) and add the following code to the file. Once you&rsquo;re done, save the changes.\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">@ini_set( 'upload_max_size' , '64M' );\n\n@ini_set( 'post_max_size', '64M');\n\n@ini_set( 'max_execution_time', '300' );<\/pre>\n<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-reasons-to-increase-wordpress-maximum-file-upload-size\">Reasons to Increase WordPress Maximum File Upload Size<\/h2><p>WordPress provides a built-in media uploader. It saves you time as you don&rsquo;t have to connect with FTP clients or use a File Manager from your hosting provider. Despite so, the PHP-based uploader has an upload limit for maximum file size. The upload file limit may vary depending on your hosting provider and WordPress configuration.<\/p><p>You can check your WordPress upload file limit by navigating to <strong>Media<\/strong> -&gt;<strong> Add New<\/strong> from the administrator dashboard.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"307\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/11\/wordpress-upload-file-size.png\/public\" alt=\"This image shows you how to check your WordPress maximum file upload size. You can use this information to determine whether or not you need to increase the maximum limit.\" class=\"wp-image-23030\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/11\/wordpress-upload-file-size.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/11\/wordpress-upload-file-size.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/11\/wordpress-upload-file-size.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/11\/wordpress-upload-file-size.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p>While the maximum upload file limit is more than enough to accommodate regular use, there are cases where you may need to upload large files. This can be problematic as uploading files bigger than the allowed size results in &lsquo;<strong><a href=\"\/tutorials\/fix-the-uploaded-file-exceeds-the-upload-max-filesize-directive-in-php-ini-wordpress\">the uploaded file exceeds the upload_max_filesize directive in php.ini<\/a><\/strong>&rsquo; error.<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"2048\" height=\"600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/public\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1536,fit=scale-down 1536w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Despite enforcing a maximum file upload size, WordPress allows you to increase its limit. The tutorial above shows that there are multiple ways of increasing WordPress&rsquo; maximum file upload size. If these methods don&rsquo;t work for you, it&rsquo;s best to reach out to your hosting provider and let them alter it for you.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Find More Advanced WordPress Tutorials<\/h4>\n                    <p><a href=\"\/tutorials\/wordpress-memory-limit\">Increase Memory Limit<\/a><br>\n<a href=\"\/tutorials\/php-maximum-upload-size\">Modify PHP Max Upload Size<\/a><br>\n<a href=\"\/tutorials\/wordpress-staging-environment\">WordPress Staging<\/a><br>\n<a href=\"\/tutorials\/wordpress-page-builders\">WordPress Page Builders<\/a><\/p>\n                <\/div>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you unable to upload large files to WordPress? We&rsquo;ve got you covered! Here, we will uncover how to increase [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Increase the Maximum File Upload Size in WordPress","rank_math_description":"Does WordPress prevent you from uploading large files? This tutorial will uncover how to increase the maximum file upload size in WordPress","rank_math_focus_keyword":"increase wordpress upload size","footnotes":""},"categories":[22640,22637],"tags":[],"class_list":["post-23027","post","type-post","status-publish","format-standard","hentry","category-security-and-maintenance","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-aumentar-limite-upload-wordpress","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/upload-fichiers-wordpress","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-menambah-ukuran-maximum-file-upload-di-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-aumentar-limite-upload-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/23027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=23027"}],"version-history":[{"count":23,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/23027\/revisions"}],"predecessor-version":[{"id":138187,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/23027\/revisions\/138187"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=23027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=23027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=23027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}