When you join WordPress and install it, your WordPress hosting provider will establish a default maximum file upload size. This limit is generally set by your hosting provider and normally runs from 2MB to 500MB.
This limit will suffice for the vast majority of WordPress website owners. However, there will be situations when you need to increase this limit to avoid upload issues. That is where you will have to increase the maximum file upload limit.
This generally occurs when you have to upload large-sized content on your website like photos, audios, videos etc.
You also need to expand the file upload limit in case you want to install larger WordPress themes and plugins.
How can you increase the maximum file upload limit in WordPress?
First, check the maximum file upload size by, going to Media »
Add New in your WordPress admin panel. Here, you can easily find the maximum file upload limit.
If you have a dedicated server, you can create or edit
.user.ini in the document root and add the below contents and restart the webserver.
1. upload_max_filesize= 256M 2. post_max_size= 256M
You can add code to your functions.php file in your WordPress theme. Post that, you have to open your functions.php file via FTP or the file manager app in your hosting account dashboard. Then, add the following code at the bottom of your functions.php file.
1. @ini_set( ‘upload_max_size’ , ‘256M’ ); 2. @ini_set( ‘post_max_size’, ‘256M’);
3. @ini_set( ‘max_execution_time’, ‘300’ );
You can alter the values as per your requirement.