{"id":358,"date":"2014-04-17T10:41:19","date_gmt":"2014-04-17T10:41:19","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=358"},"modified":"2014-09-30T03:55:35","modified_gmt":"2014-09-30T03:55:35","slug":"increase-file-upload-size-wordpress","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/increase-file-upload-size-wordpress\/","title":{"rendered":"Increase File Upload Size WordPress"},"content":{"rendered":"<p><strong>We see this error when we upload a file that bigger\u00a0than upload limit size , the error look like this &#8220;exceeds the maximum upload size for this site&#8221;<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"374\" data-permalink=\"https:\/\/pixert.com\/blog\/increase-file-upload-size-wordpress\/fileuploadsize\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?fit=649%2C125&amp;ssl=1\" data-orig-size=\"649,125\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"fileuploadsize\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?fit=300%2C57&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?fit=649%2C125&amp;ssl=1\" class=\"aligncenter size-full wp-image-374\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?resize=649%2C125\" alt=\"fileuploadsize\" width=\"649\" height=\"125\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?w=649&amp;ssl=1 649w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?resize=300%2C57&amp;ssl=1 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><\/p>\n<p>The web hosting company may set \u00a0limit to file upload size, fortunately we could workaround this problem and increase file upload size WordPress.<!--more--><\/p>\n<p><strong>1. PHP.INI<\/strong><\/p>\n<p>UPDATE PHP.INI to increase file upload size WordPress<\/p>\n<p>If we have access to root admin, we could locate where php.ini file is by using phpinfo, just create a file name wherephpini.php, add following code to wherephpini.php and upload it to our root folder in your server<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\r\n&lt;?php phpinfo(); ?&gt;\r\n<\/pre>\n<p>Open wherephpini.php in the browser, look for\u00a0<strong>Configuration File (php.ini) Path .<br \/>\n<\/strong>Open php.ini in that configuration path, find and change following constants<\/p>\n<p>e.g from<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\r\nupload_max_filesize = 2M\r\npost_max_size = 2M<\/pre>\n<p>to<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">upload_max_filesize = 64M\r\npost_max_size = 96M<\/pre>\n<p>CREATE PHP.INI to increase file upload size WordPress<\/p>\n<p>If we don&#8217;t have root admin and host our site on shared hosting, just create php.ini and add following constants to newly created php.ini. Upload php.ini to wp-admin directory<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">upload_max_filesize = 64M\r\npost_max_size = 96M<\/pre>\n<p>Some web hosting may have different configuration that requires additional constants to make it work<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">memory_limit = 128M\r\nupload_max_filesize = 64M\r\npost_max_size = 96M\r\nfile_uploads = On<\/pre>\n<p>&lt;\/pre&gt;<br \/>\n<strong>2. htaccess file<\/strong><br \/>\nOpen .htaccess in root folder, you could use Control Panel File Editor or FTP<br \/>\nAdd following constant to .htaccess file<br \/>\n&lt;pre&gt;<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">php_value upload_max_filesize 64M\r\nphp_value post_max_size 96M<\/pre>\n<p>Some web hosting may have different configuration that requires additional constants to make it work<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">php_value memory_limit = 128M\r\nphp_value upload_max_filesize = 64M\r\nphp_value post_max_size = 96\r\nphp_value file_uploads = On<\/pre>\n<p>We could increase Max upload size on WordPress Multisite\/Network after we have increase maximum file upload size with one of methods above<\/p>\n<blockquote><p>Go to WP-Admin &gt; My Sites &gt; Network Admin &gt; Settings &gt; Upload Setting, change KB in Max upload file size from 1000 KB to 32000 KB (32MB)<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>We see this error when we upload a file that bigger\u00a0than upload limit size , the error look like this &#8220;exceeds the maximum upload size for this site&#8221; The web hosting company may set \u00a0limit to file upload size, fortunately we could workaround this problem and increase file upload size WordPress.<\/p>\n","protected":false},"author":1,"featured_media":374,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[6,7,44],"class_list":["post-358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-wordpress-2","tag-wp","tag-wp-admin"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?fit=649%2C125&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-5M","jetpack-related-posts":[{"id":62,"url":"https:\/\/pixert.com\/blog\/how-to-disable-phpinfo\/","url_meta":{"origin":358,"position":0},"title":"How to disable phpinfo","author":"Pixel Insert \/ Pixert","date":"March 22, 2011","format":false,"excerpt":"The phpinfo() function is a very powerful one, \u00a0you can learn quite a lot about your PHP installation.\u00a0Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":361,"url":"https:\/\/pixert.com\/blog\/allow-wordpress-upload-flash-swf-files\/","url_meta":{"origin":358,"position":1},"title":"How to allow WordPress to upload Flash SWF files","author":"Pixel Insert \/ Pixert","date":"April 29, 2014","format":false,"excerpt":"Some banner ads still use Flash SWF\u00a0format, unfortunately Flash SWF\u00a0is one of few format that has not been permitted in WordPress for security reason. WordPress generate error like this\u201cSorry, this file type is not permitted for security reasons.\u201c when we try to upload Flash SWF\u00a0files in WordPress Previously, we wrote\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"filetypeerror","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":53,"url":"https:\/\/pixert.com\/blog\/how-to-check-what-php-version-running-on-linux\/","url_meta":{"origin":358,"position":2},"title":"How to check what PHP version running on Linux?","author":"Pixel Insert \/ Pixert","date":"March 21, 2011","format":false,"excerpt":"It's very simple to check PHP version 1. PHP Info You can use the following to yield PHP version number via Command Line [bash]php -i[\/bash] or You can create a php file contain the following, upload it to your website [php]phpinfo();[\/php] Note: if your sys admin disabled phpinfo, you cannot\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":162,"url":"https:\/\/pixert.com\/blog\/web-page-compression-enable-gzip-encoding-and-caching\/","url_meta":{"origin":358,"position":3},"title":"Web Page Compression: Enable gzip Encoding and Caching","author":"Pixel Insert \/ Pixert","date":"November 10, 2011","format":false,"excerpt":"Website load is one factor Google been considered to rank websites in their search engine. The next tutorial explain a step to improve loading time in your website.\u00a0This step is focusing on gzip encoding and caching, it compress the content from your server to the client browser. The reduced file\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78,"url":"https:\/\/pixert.com\/blog\/limiting-access-to-admin-folder-htaccess\/","url_meta":{"origin":358,"position":4},"title":"Limiting Access to Admin folder via .htaccess","author":"Pixel Insert \/ Pixert","date":"March 31, 2011","format":false,"excerpt":"Some CMS have admin folder. It's an important folder because it has all the files that deal with administration. If the security of the files in it is compromised, bad things can happen. One effective option to reducing the risk of a security breach on the Admin folder is by\u2026","rel":"","context":"In &quot;Web Apps&quot;","block_context":{"text":"Web Apps","link":"https:\/\/pixert.com\/blog\/category\/web-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/lock-288x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":360,"url":"https:\/\/pixert.com\/blog\/wordpress-file-type-permitted-security-reasons\/","url_meta":{"origin":358,"position":5},"title":"WordPress file type is not permitted for security reasons","author":"Pixel Insert \/ Pixert","date":"April 17, 2014","format":false,"excerpt":"This article explain little bit about uploading files to WordPress and its error when WordPress don't allow some file types.\u00a0WordPress by default allow users to upload\u00a0following file types Images .jpg .jpeg .png .gif Documents .pdf (Portable Document Format; Adobe Acrobat) .doc, .docx (Microsoft Word Document) .ppt, .pptx, .pps, .ppsx (Microsoft\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"filetypeerror","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/filetypeerror.jpg?resize=525%2C300 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/374"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}