{"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":"2026-03-09T19:19:24","modified_gmt":"2026-03-09T19:19:24","slug":"how-to-increase-the-maximum-file-upload-size-in-wordpress","status":"publish","type":"post","link":"\/ng\/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":"<?xml encoding=\"utf-8\" ?><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<\/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=\"\/ng\/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\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/File-manager-button-in-hPanel.png\"><img loading=\"lazy\" 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\/w=1024,h=1024,fit=scale-down\" 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=\"auto, (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\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1402\" height=\"652\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/01\/file-manager-htaccess.png\/w=1024,h=1024,fit=scale-down\" 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=\"auto, (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=\"\/ng\/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\"><figure class=\"aligncenter\"><img loading=\"lazy\" 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=\"auto, (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=\"\/ng\/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=\"\/ng\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" 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\/w=1024,h=1024,fit=scale-down\" 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=\"auto, (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>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Find More Advanced WordPress Tutorials                <\/p>\n            <\/div>\n            <p class=\"protip__content\"><a href=\"\/ng\/tutorials\/wordpress-memory-limit\/\">Increase Memory Limit<\/a><br>\n<a href=\"\/ng\/tutorials\/php-maximum-upload-size\/\">Modify PHP Max Upload Size<\/a><br>\n<a href=\"\/ng\/tutorials\/wordpress-staging-environment\/\">WordPress Staging<\/a><br>\n<a href=\"\/ng\/tutorials\/wordpress-page-builders\/\">WordPress Page Builders<\/a><\/p>\n                    <\/div>\n        \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 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. Three Ways to Increase WordPress Maximum File Upload Size [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/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":"open","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":[22637],"tags":[],"class_list":["post-23027","post","type-post","status-publish","format-standard","hentry","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-GB","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\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/23027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=23027"}],"version-history":[{"count":24,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/23027\/revisions"}],"predecessor-version":[{"id":144948,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/23027\/revisions\/144948"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=23027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=23027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=23027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}