{"id":4050,"date":"2018-05-24T07:35:17","date_gmt":"2018-05-24T07:35:17","guid":{"rendered":"https:\/\/www.gtechbooster.com\/?p=4050"},"modified":"2022-11-30T22:02:05","modified_gmt":"2022-11-30T22:02:05","slug":"how-to-increase-maximum-file-upload-size-in-wordpress","status":"publish","type":"post","link":"https:\/\/gtechbooster.com\/how-to-increase-maximum-file-upload-size-in-wordpress\/","title":{"rendered":"How to Increase Maximum File Upload Size in WordPress"},"content":{"rendered":"\n<p>Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes. In this article, we will show you how to easily increase the maximum file upload size in WordPress to free your self from the ordeal it brings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Check Your Maximum File Upload Size Limit in WordPress?<\/h2>\n\n\n\n<div class=\"gtech-migrated-from-ad-inserter-placement-2\" style=\"text-align: center;\" id=\"gtech-3923306334\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-4234499932\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/17207\" rel=\"noopener\" class=\"notrack\" aria-label=\"26001\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg 1024w, https:\/\/gtechbooster.com\/media\/2023\/01\/26001-768x960.jpeg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"500\" height=\"625\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div><p>WordPress automatically display the maximum file upload size limit during file upload. To check it you can simply go to&nbsp;<strong>Media \u00bb Add New<\/strong>&nbsp;page and you will see the maximum file uplaod size limit for your WordPress site. <\/p>\n\n\n\n<p>Diversity of WordPress has made it possible to increase or decrease file upload size in a variety of ways. <strong>NB<\/strong>: Always use one option&nbsp;a time. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1: Edit theme Functions File.<\/h3>\n\n\n\n<p>This option calls for adding the code below above the php declaration in your WordPress theme&#8217;s function.php file. The increase or decrease of the upload size is dependant on the figure you specify in M (ie. 64M) as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@ini_set( 'upload_max_size' , '64M' );\n@ini_set( 'post_max_size', '64M');\n@ini_set( 'max_execution_time', '300' );<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. Create or Edit existing PHP.INI file.<\/h2>\n\n\n\n<p>This option involves access to you root folder of your hosting (ie. where your hosting files are found). This can be achieved with your hosting&#8217;s file manager or an ftp access into your hosting.<\/p>\n\n\n\n<p>Navigate into the WP Admin folder. Locate the <em>php.ini<\/em> file if present. Be sure to carefully review to surity that it does not exist before creating it. Creat a file called <em>php.ini<\/em> if you find no such file in existence in the WP Admin folder.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>upload_max_filesize = 64M\npost_max_size = 64M\nmax_execution_time = 300<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. htaccess Method<\/h2>\n\n\n\n<p>This method requires that you backup the <em>.htaccess<\/em> file before proceeding. To do that copy the <em>.htaccess<\/em> file in your root folder and and name the copy <em>htaccess.bak<\/em> or as you deem fit for your recognition.<\/p>\n\n\n\n<p>If you have safely backed up your current <em>.htaccess<\/em> file then edit the <em>.htaccess<\/em> file in your WordPress site\u2019s root folder and add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php_value upload_max_filesize 64M\nphp_value post_max_size 64M\nphp_value max_execution_time 300\nphp_value max_input_time 300<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. Create .user.ini file<\/h4>\n\n\n\n<p>Our last option for you is the <em>.user.ini<\/em> file creation in the <strong>WP Admin folder<\/strong>. This option follows that of <em>php.ini<\/em> however the name of the file is <em>.user.ini\u00a0<\/em>. Edit the <em>.user.ini<\/em> file and type or past the code below into the file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>upload_max_filesize = 64M\npost_max_size = 64M\nmax_execution_time = 300<\/code><\/pre>\n\n\n\n<p>These options would set you free from the upload issues along with execution time and input value maximum time.<\/p>\n\n\n\n<p>We can&#8217;t end here without saying this. Shared hosting users may not enjoy all four options however they can try.<\/p>\n\n\n\n<p>The options that works for most shared hosting providers are the <em>php.ini<\/em> and <em>.user.ini<\/em> files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More Information<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/uk.godaddy.com\/help\/php-upload-limits-on-shared-hosting-1475\">Increase PHP upload limit on Godaddy<\/a><\/li><li><a href=\"https:\/\/my.bluehost.com\/hosting\/help\/110\">How To Change Upload File Size Limit In PHP on Bluehost<\/a><\/li><\/ul>\n<div class=\"gtech-end-cont\" id=\"gtech-2413525848\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-4042028190\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/17207\" rel=\"noopener\" class=\"notrack\" aria-label=\"26001\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg 1024w, https:\/\/gtechbooster.com\/media\/2023\/01\/26001-768x960.jpeg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"500\" height=\"625\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes. In this article, we will show yo&#8230;..<\/p>\n","protected":false},"author":7,"featured_media":4089,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[421,901],"class_list":["post-4050","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-htaccess","tag-wordpress"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/4050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/comments?post=4050"}],"version-history":[{"count":0,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/4050\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media\/4089"}],"wp:attachment":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media?parent=4050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/categories?post=4050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/tags?post=4050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}