{"id":674,"date":"2019-01-23T00:48:00","date_gmt":"2019-01-23T00:48:00","guid":{"rendered":"https:\/\/buddydev.com\/mediapress\/?p=674"},"modified":"2019-01-23T00:58:53","modified_gmt":"2019-01-23T00:58:53","slug":"how-to-increase-php-maximum-upload-filesize","status":"publish","type":"post","link":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/","title":{"rendered":"How to increase PHP Maximum Upload filesize"},"content":{"rendered":"<p>PHP uses ini directives to control the maximum upload file size. There are two directives in the <strong>php.in<\/strong> file that affect what will be the maximum allowed upload size.<\/p>\n<p><strong>upload_max_filesize : <\/strong>It is the actual limit. By default it is set to 2M ( The default maximum upload size is 2MB)<br \/>\n<strong>post_max_size : <\/strong>It controls the maximum size of the post request. This should be set larger than the\u00a0upload_max_filesize.<\/p>\n<h3>Example:-<\/h3>\n<p>For example, to allow files upto 10MB to be uploaded, we can do the following.<\/p>\n<p>1. Update upload_max_filesize to 10 MB as shown below.<\/p>\n<pre class=\"lang:ini decode:true\">upload_max_filesize = 10M<\/pre>\n<p>2. Update post_max_size to 12 MB(a bit larger that the upload size) as shown below<\/p>\n<pre class=\"lang:ini decode:true \">post_max_size = 12M<\/pre>\n<p>That&#8217;s it.<\/p>\n<p>If you are not sure what the above values are, Please contact your hosting provider and ask them to update the upload file size limit for you. If the changes are not working even after applying in ini file, please make sure to restart the webserver(apache\/nginx etc) to force reload the config.<\/p>\n<h3>Reference:-<\/h3>\n<p><a href=\"http:\/\/php.net\/manual\/en\/ini.core.php#ini.sect.file-uploads\">http:\/\/php.net\/manual\/en\/ini.core.php#ini.sect.file-uploads<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP uses ini directives to control the maximum upload file size. There are two directives in the php.in file that affect what will be the maximum allowed upload size. upload_max_filesize : It is the actual limit. By default it is set to 2M ( The default maximum upload size is 2MB) post_max_size : It controls &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5270],"tags":[],"class_list":["clearfix","post-674","post","type-post","status-publish","format-standard","hentry","category-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev\" \/>\n<meta property=\"og:description\" content=\"PHP uses ini directives to control the maximum upload file size. There are two directives in the php.in file that affect what will be the maximum allowed upload size. upload_max_filesize : It is the actual limit. By default it is set to 2M ( The default maximum upload size is 2MB) post_max_size : It controls ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/\" \/>\n<meta property=\"og:site_name\" content=\"MediaPress | BuddyDev\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bpdev\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-23T00:48:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-23T00:58:53+00:00\" \/>\n<meta name=\"author\" content=\"Brajesh Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sbrajesh\" \/>\n<meta name=\"twitter:site\" content=\"@buddydev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brajesh Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/\",\"url\":\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/\",\"name\":\"How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/#website\"},\"datePublished\":\"2019-01-23T00:48:00+00:00\",\"dateModified\":\"2019-01-23T00:58:53+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/mediapress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to increase PHP Maximum Upload filesize\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#website\",\"url\":\"https:\/\/buddydev.com\/mediapress\/\",\"name\":\"MediaPress | BuddyDev\",\"description\":\"The Best Media Gallery Plugin For BuddyPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/buddydev.com\/mediapress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\",\"name\":\"Brajesh Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"caption\":\"Brajesh Singh\"},\"sameAs\":[\"http:\/\/buddydev.com\/members\/sbrajesh\/\",\"https:\/\/x.com\/sbrajesh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/","og_locale":"en_US","og_type":"article","og_title":"How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev","og_description":"PHP uses ini directives to control the maximum upload file size. There are two directives in the php.in file that affect what will be the maximum allowed upload size. upload_max_filesize : It is the actual limit. By default it is set to 2M ( The default maximum upload size is 2MB) post_max_size : It controls ...","og_url":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/","og_site_name":"MediaPress | BuddyDev","article_publisher":"https:\/\/www.facebook.com\/bpdev","article_published_time":"2019-01-23T00:48:00+00:00","article_modified_time":"2019-01-23T00:58:53+00:00","author":"Brajesh Singh","twitter_card":"summary_large_image","twitter_creator":"@sbrajesh","twitter_site":"@buddydev","twitter_misc":{"Written by":"Brajesh Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/","url":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/","name":"How to increase PHP Maximum Upload filesize &#8226; MediaPress | BuddyDev","isPartOf":{"@id":"https:\/\/buddydev.com\/mediapress\/#website"},"datePublished":"2019-01-23T00:48:00+00:00","dateModified":"2019-01-23T00:58:53+00:00","author":{"@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/mediapress\/tips\/how-to-increase-php-maximum-upload-filesize\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/mediapress\/"},{"@type":"ListItem","position":2,"name":"How to increase PHP Maximum Upload filesize"}]},{"@type":"WebSite","@id":"https:\/\/buddydev.com\/mediapress\/#website","url":"https:\/\/buddydev.com\/mediapress\/","name":"MediaPress | BuddyDev","description":"The Best Media Gallery Plugin For BuddyPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buddydev.com\/mediapress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb","name":"Brajesh Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","contentUrl":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","caption":"Brajesh Singh"},"sameAs":["http:\/\/buddydev.com\/members\/sbrajesh\/","https:\/\/x.com\/sbrajesh"]}]}},"_links":{"self":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":10,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":684,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/674\/revisions\/684"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/media?parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/categories?post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/tags?post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}