How do I increase the upload file limit on WordPress?

admin/ March 2, 2020/ Our Blog

If your website is running on WordPress, as much as the platform is perfect for nearly everything, there are certain limitations to what you’ll be able to do. One of these limits is in regards to the maximum size of a file you’ll be able to upload to your site. Typically this can be an issue especially if you’re uploading large media files such as videos.

The standard limit for uploading files is 64MB in WordPress. You can find out if you have this limit by going to the menu in your dashboard, then to Media and then Add New. However, not to worry, there are a few different ways in which you can remove this upload limit.

The first method we’re going to look at involves editing some of the PHP code in your theme functions file. This can typically be found by going to your control panel and finding the functions.php file which is where you’ll see the following code:-

@ini_set( ‘upload_max_size’ , ‘64M’ );
@ini_set( ‘post_max_size’, ‘64M’);
@ini_set( ‘max_execution_time’, ‘300’ );

The first two lines you’ll see ‘64M’. This essentially means that the limit is, at current, 64MB. If you want to change this to, for example, 100MB, you would replace it with 100M and this now means you can upload files up to a maximum of 100mb.

The second method is to edit an existing php.ini file which would contain code similar to in the first method. However to do this you would need to use FTP or File Transfer Protocol, this is so you can access the root folder within your WordPress. Typically you can do this by going through CPanel in your dashboard. Once you’ve got there, you need to add the following code:-

Upload_max_filesize  = 64M
Post_max_size = 64M
Max_execution_time = 300

The final method will only work if you’re not on a shared hosting package. And is done by accessing the root directory through FTP, similar to the above, and going to the .htaccess file and adding the following code:-

Php_value upload_max_filesize 64M
Php_value post_max_size 64M
Php_value max_execution_time 300
Php_value max_input_time 300

That completes the tutorial. If you would like any help with your website then please feel free to contact us here.

Share this Post