{"id":266,"date":"2020-12-09T15:52:01","date_gmt":"2020-12-09T15:52:01","guid":{"rendered":"http:\/\/laserphotonics.uk\/?p=266"},"modified":"2020-12-09T15:52:01","modified_gmt":"2020-12-09T15:52:01","slug":"increase-wordpress-max-upload-size","status":"publish","type":"post","link":"https:\/\/laserphotonics.uk\/?p=266","title":{"rendered":"Increase wordpress max upload size"},"content":{"rendered":"\n<h4>1: Theme Functions File<\/h4>\n\n\n\n<p>There are cases where we have seen that just by adding the following code in theme\u2019s&nbsp;<a href=\"https:\/\/www.wpbeginner.com\/glossary\/functions-php\/\">functions.php<\/a>&nbsp;file, you can increase the upload size:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td>123<\/td><td><code>@<\/code><code>ini_set<\/code><code>( <\/code><code>'upload_max_size'<\/code> <code>, <\/code><code>'64M'<\/code> <code>);<\/code><code>@<\/code><code>ini_set<\/code><code>( <\/code><code>'post_max_size'<\/code><code>, <\/code><code>'64M'<\/code><code>);<\/code><code>@<\/code><code>ini_set<\/code><code>( <\/code><code>'max_execution_time'<\/code><code>, <\/code><code>'300'<\/code> <code>);<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4>2. Create or Edit an existing PHP.INI file<\/h4>\n\n\n\n<p>For this method you will need to access your WordPress site\u2019s root folder by&nbsp;<a href=\"https:\/\/www.wpbeginner.com\/beginners-guide\/how-to-use-ftp-to-upload-files-to-wordpress-for-beginners\/\">using FTP<\/a>&nbsp;or File Manager app in your hosting account\u2019s cPanel dashboard.<\/p>\n\n\n\n<p>In most cases if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td>123<\/td><td><code>upload_max_filesize = 64M<\/code><code>post_max_size = 64M<\/code><code>max_execution_time = 300<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This method is reported to work for many users. Remember if 64 doesn\u2019t work, then try 10MB (sometimes that work).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1: Theme Functions File There are cases where we have seen that just by adding the following code in theme\u2019s&nbsp;functions.php&nbsp;file, you can increase the upload size: 123 @ini_set( &#8216;upload_max_size&#8217; , &#8217;64M&#8217; );@ini_set( &#8216;post_max_size&#8217;, &#8217;64M&#8217;);@ini_set( &#8216;max_execution_time&#8217;, &#8216;300&#8217; ); 2. Create or Edit an existing PHP.INI file For this method you will need to access your WordPress [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/posts\/266"}],"collection":[{"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266"}],"version-history":[{"count":1,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":268,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=\/wp\/v2\/posts\/266\/revisions\/268"}],"wp:attachment":[{"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laserphotonics.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}