How to Allow Large File Uploads in your WordPress Website?

How to Allow Large File Uploads in your WordPress Website

Do you want to Allow Large File Uploads on your WordPress Website?

By default, the upload size in the WordPress website is 2 MB. When you try uploading files greater than this size, your website can’t upload them. In this case, you need to increase the file upload size on your site. 

Knowing that the large numbers of files can decrease the speed of your website, sometimes it could be a must. Usually, the Website is fast and responsive when you have small size files.

In order to do so, you need to make some changes to your site. 

In this tutorial, we will learn to Allow Large File Uploads on your WordPress Website. There are two different ways briefly mentioned. So Let’s Start:

Theme Functions File

In this method, you just need to add the code in your function.php file. Once it is done, you can see the upload size of your website increases as per the necessity. It is easy and simple and just one step. But, it is necessary to be careful while adding this code to your PHP file.

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

Create or Edit an existing PHP.INI file

In this method as defined, you need to create or edit an existing PHP.INI file. For this, it is necessary to access your WordPress site’s root folder by using the File Manager app in your hosting account’s cPanel dashboard.

Just copy and paste the code below in the root folder.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

This method usually works in all cases. Just in case, it doesn’t work try keeping the file size 10 MB instead of 64 MB.

Here, you are done allowing Large File Uploads in your WordPress website. Easy, Simple and Quick. 

Also, follow our tutorial guide to learn more about WordPress!


Please enter your comment!
Please enter your name here