How to Increase the Maximum File Upload Size in WordPress (Revealed)

Explore innovative ideas for Australia Database development.
Post Reply
Nihan009
Posts: 6
Joined: Sun Dec 22, 2024 3:21 am

How to Increase the Maximum File Upload Size in WordPress (Revealed)

Post by Nihan009 »

how to increase maximum file size upload in wordpress
Do you want to increase the maximum file upload size in WordPress? Low file upload limits can cause a “ Your file name exceeds the maximum upload size for this site ” error and prevent you from uploading files to your media library or installing large plugins and themes.

In this article, we will show you how to increase the maximum file upload size on your WordPress site .

How to Check the Maximum File Upload Size Limit in WordPress
If you are facing an issue due to the maximum file upload limit, you will first need to check the file upload limit of your site. You can easily check it from the WordPress dashboard.

To do this, you will need to go to the Media » Add New page from your WordPress dashboard. You will then see the maximum file upload size limit for your WordPress site .

wordpress-maximum-file-upload-size

Let’s move ahead and check out how to increase the maximum file upload size to fix the issues. Let’s start with the quick fix options first.

Note: The first 3 methods are intended to quickly fix issues caused by maximum file upload size limits. However, they may not work with some shared hosts. In that case, you will need to go with the fourth option, i.e. contact your hosting provider .

1. Edit your theme's functions file
The first way to increase the maximum file upload size thailand telegram group limit is to edit your theme's functions.php file.

For this, you will need to go to Appearance » Editor from your dashboard. Next, go to the functions .php link from the right-hand panel and click on it. When the file opens, scroll down to the bottom of the page and create a new line. Next, you will need to copy the code below and paste it there. Once done, don’t forget to update the file.

1
2
3
@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '400' );
edit-theme-functions

Once this is done, you can go ahead and check if it worked on your site. If it didn't, you can try the other methods below.

2. Create or edit an existing PHP.INI file
For this method, you will need to access the root folder of your WordPress site using an FTP application or File Manager in your hosting account's cPanel control panel.

Next, look for the php.ini file in the root folder. If you can't find it, you'll need to create a file called php.ini and upload it to the root folder. In most cases, if you're on a shared host, you won't see it.

Next, open the php.ini file and add the following code to it:



Image


upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 400
The file size defined above in the example can be adjusted according to your needs.

3. Edit the .htaccess file
To increase the maximum file upload size limit using this method, you will need to access the root folder of your site as in method 2.

Open your site's root folder and locate the .htaccess file there. Then open the file for editing and add the following code:

1
2
3
4
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 400
php_value max_input_time 400
That’s it. You can go back to the media upload option and check if it worked. If it didn’t work, you will have to contact your hosting provider as suggested in the next method.
Post Reply