Do you want to Allow Large File Uploads in your WordPress Website?
By default, the upload size in the WordPress website is 2 MB. When you try uploading the files greater than this size, your website can’t upload it. In this case, you need to increase file upload size in your site.
Knowing that the large numbers of file 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 on your site.
In this tutorial, we will learn to Allow Large File Uploads in 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 these code in 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 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!