{"id":565,"date":"2020-06-05T14:38:35","date_gmt":"2020-06-05T21:38:35","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=565"},"modified":"2020-07-03T14:12:04","modified_gmt":"2020-07-03T21:12:04","slug":"6-ways-to-increase-the-maximum-upload-file-size-in-wordpress","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=565","title":{"rendered":"6 Ways To Increase the Maximum Upload File Size in WordPress"},"content":{"rendered":"\n<p>&nbsp;By&nbsp;<a href=\"https:\/\/www.bitcatcha.com\/blog\/increase-maximum-upload-file-size-in-wordpress\/#:~:text=From%20the%20left%20pane%20of,That's%20it!\">Mustaasam Saleem&nbsp;&nbsp;&nbsp;<\/a>&nbsp;&nbsp;<\/p>\n\n\n\n<p>When you have a WordPress website, you have to upload files every now and then to keep your site active and pretty. So you need to know that there is more than one way to upload your picture, theme, or any other content to your WordPress.<\/p>\n\n\n\n<p>Basically, there are three ways to upload files in WordPress:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Log in to your hosting provider by accessing their online file manager.<\/li><li>Connect to your server via an FTP client like FileZilla.<\/li><li>Upload your media, themes, or plugin files directly from the WordPress Dashboard.<\/li><\/ol>\n\n\n\n<p>If you want to upload anything other than media, themes or plugins, you can always upload them via a file manager. However, for all normal uploads, simply navigate to your desired location within the WordPress Dashboard and choose add\/upload file.<\/p>\n\n\n\n<p>For example, if you want to add a video, navigate to&nbsp;<em>Media -&gt; Add New<\/em>&nbsp;and either select the file from your computer or you can just drag and drop it in the box. Here\u2019s a screenshot:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.bitcatcha.com\/wp-content\/uploads\/2016\/10\/Filesize-Error-on-WordPress.png\" alt=\"File Size Error on WordPress\" class=\"wp-image-6777\"\/><\/figure><\/div>\n\n\n\n<p>Did you notice something weird, though? No, not in the article. In the screenshot above. Yes, the maximum upload file limit of&nbsp;<em>just 5MB<\/em>. Isn\u2019t this off-putting? And this limit also applies when you want to upload a theme or plugin directly from the WordPress Admin Dashboard. This threshold varies from hosting to hosting though. Some even allow only 2MB by default while others may allow more.<\/p>\n\n\n\n<p>Don\u2019t worry though; we\u2019re here to tell you exactly how to increase the upload limit.<\/p>\n\n\n\n<p>Let\u2019s get started without further ado.<\/p>\n\n\n\n<p>PRO-TIP<\/p>\n\n\n\n<p>Slow site kill sales!&nbsp;Supercharge your WordPress speed&nbsp;with these 8 hacks.<\/p>\n\n\n\n<p>While there are several ways to remove this cap on file size, we\u2019ll be working with three settings within PHP that should deal with the upload limit. Let\u2019s define the settings first so that you know what you\u2019re actually doing:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>upload_max_filesize<\/strong><br>This defines the maximum upload limit for files.<\/li><li><strong>post_max_size<\/strong><br>This defines the maximum upload limit that will be handled in a POST request.<\/li><li><strong>memory_limit<\/strong><br>This defines how much memory is allocated for PHP. This number should be equal or higher than the upload_max_filesize.<\/li><\/ul>\n\n\n\n<p>Let\u2019s assume we have a 20MB file. We\u2019ll set the&nbsp;<em>upload_max_filesize to 25MB, post_max_filesize to 27MB, and memory_limit to 30MB<\/em>.<\/p>\n\n\n\n<p>Here are the steps you can take to increase the upload limit. Depending on your server, any one of them should work.<\/p>\n\n\n\n<p>Note<\/p>\n\n\n\n<p>Please make sure to create a backup file before making any changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Create Or Modify PHP.Ini File<\/h2>\n\n\n\n<p>PHP.ini contains the PHP configuration for your server. You can find it in the root directory of your server. Go to your hosting root directory and search for php.ini file. Due to security reasons, it might be hidden, so don\u2019t forget to check \u201c<em>Show hidden files<\/em>\u201d.<\/p>\n\n\n\n<p>Open&nbsp;<em>php.ini<\/em>&nbsp;file with any text editor and search for the three settings to modify them according to your requirement. We\u2019ll use the following numbers for this example:<\/p>\n\n\n\n<p>File size to be uploaded: 20MB.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>upload_max_filesize = 25MB<\/li><li>post_max_size = 27MB<\/li><li>memory_limit = 30MB<\/li><\/ul>\n\n\n\n<p>If you didn\u2019t find the php.ini file, don\u2019t worry! You can create it with a&nbsp;<em>Right Click<\/em>&nbsp;of your mouse and selecting&nbsp;<em>Add New File<\/em>. Open the new file and paste the three lines above and save it as&nbsp;<em>php.ini<\/em>.<\/p>\n\n\n\n<p>Sometimes your server\u2019s php.ini file is named as&nbsp;<em>php5.ini<\/em>, hence, don\u2019t get confused between the two.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Create Or Modify .Htaccess<\/h2>\n\n\n\n<p>.htaccess is an important file and contains various configurations for your server. Most hosting providers keep it hidden though. To modify it, you need to check \u201c<em>Show Hidden Files<\/em>\u201d once again and locate&nbsp;<em>.htaccess<\/em>&nbsp;file within the root directory of your server.<\/p>\n\n\n\n<p>Open it with any editor and paste these three lines at the end of the file where it says&nbsp;<strong>#END WordPress<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>php_value upload_max_filesize 25MB<\/li><li>php_value post_max_size 27MB<\/li><li>php_value memory_limit 30MB<\/li><\/ul>\n\n\n\n<p>If you don\u2019t find the .htaccess file, you can create one and paste the default&nbsp;WordPress .htaccess&nbsp;file attributes and then paste the three lines above to increase the upload limit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Modifying A WordPress File<\/h2>\n\n\n\n<p>If the above two methods didn\u2019t work for you, there is always an alternative. You can paste the following 3 lines within your WordPress files. These lines can be written in&nbsp;<em>wp-config.php<\/em>, themes&nbsp;<em>functions.php<\/em>&nbsp;file etc. However, this is not the recommended way to increase upload file size limit.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>@ini_set( \u2018upload_max_size\u2019 , \u201925MB\u2019 );<\/li><li>@ini_set( \u2018post_max_size\u2019, \u201927MB\u2019);<\/li><li>@ini_set( \u2018memory_limit\u2019, \u201930MB\u2019 );<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4. Directly From The Platform<\/h2>\n\n\n\n<p>Some WordPress Hosting providers like Cloudways have a built-in feature to change the file size limit. Here is how you can do it directly from the platform if you have Cloudways as your hosting provider:<\/p>\n\n\n\n<p>Go to&nbsp;<em>Servers<\/em>&nbsp;from the bar on the top and get into your desired server. Select&nbsp;<em>Settings &amp; Packages<\/em>&nbsp;from the left pane and you\u2019ll see&nbsp;<em>Upload Size<\/em>&nbsp;under basic settings tab. Change it to your requirement. In our case, we\u2019ll use 25MB.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www.bitcatcha.com\/go\/cloudways\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.bitcatcha.com\/wp-content\/uploads\/2016\/10\/cloudways-edit-memory.png\" alt=\"Cloudways Edit Memory\" class=\"wp-image-155819\"\/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">5. Plugin<\/h2>\n\n\n\n<p>If you don\u2019t want to do it manually, there is always a plugin in the WordPress repository. You just need to find the right plugin that is compatible with your current WordPress version. Try using&nbsp;<a href=\"https:\/\/wordpress.org\/plugins\/upload-max-file-size\/\" target=\"_blank\" rel=\"noreferrer noopener\">Increase Upload Max Filesize<\/a>&nbsp;which is compatible with the latest version of WordPress.<\/p>\n\n\n\n<p>From the left pane of your WordPress Dashboard, navigate to&nbsp;<em>Plugins -&gt; Add New<\/em>, search for the&nbsp;<em>Increase Upload Max Filesize<\/em>&nbsp;plugin from the top right corner, and&nbsp;<em>Install<\/em>&nbsp;it.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.bitcatcha.com\/wp-content\/uploads\/2016\/10\/increase-max-upload-plugin.png\" alt=\"Install the plugin\" class=\"wp-image-155817\"\/><\/figure><\/div>\n\n\n\n<p>Once the plugin is activated; navigate to its settings and enter the desired size for your new upload size.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.bitcatcha.com\/wp-content\/uploads\/2016\/10\/increase-max-upload-settings.png\" alt=\"Enter the value\" class=\"wp-image-155818\"\/><\/figure><\/div>\n\n\n\n<p>That\u2019s it! You have just increased the WordPress Maximum Upload File Size Limit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. The Last Resort Option<\/h2>\n\n\n\n<p>If nothing else works, simply ask your&nbsp;hosting provider&nbsp;to increase the file size upload limit on your WordPress application and they\u2019ll surely help you out. Cloudways 24\u00d77 support is highly responsive and you\u2019ll be able to work your way towards your goal within no time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;By&nbsp;Mustaasam Saleem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When you have a WordPress website, you have to upload files every now and then to keep your site active and pretty. So you need to know that there is more than one way to upload your picture, theme, or any other content to your WordPress. Basically, there are three ways to upload <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=565\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-565","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=565"}],"version-history":[{"count":0,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/565\/revisions"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}