If you are reading this post, you most likely have to keep running into an issue uploading files to your WordPress website and searching for a handy solution. When you have a WordPress site, you need to upload files once in a while and at the same time to keep your site dynamic. By default, WordPress has a humble limit for uploading videos, pictures, and other files. The upload error “The uploaded file exceeds the maximum upload size for this site” can be very frustrating so, in today’s article we will show you how to easily increase the WordPress maximum upload file size to resolve this issue.
1: Using the .htaccess Method
2: Through the PHP.INI file
3: Through the Theme Functions File
4: Reach out to Your Hosting Provider
First, you should check which is the maximum file upload size limit for your WordPress website. You can go to “Media” -> “Add New” and see the size.
Method 1: Htaccess Method
Numerous hosting providers permit changing different PHP settings through the .htaccess file. In this way, by applying the php_value upload_max_filesize rule in the .htaccess file you can increase PHP maximum file size upload limit. By changing the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Using the .htaccess technique for increasing the size limit is less demanding than updating the php.ini file.
Once you have the .htaccess file, you need to add the following codes:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
When you have done it simply save the file and you are ready at this point.
Method 2: Through the PHP.INI file
By default, php.ini files are the ones that administer how your server is set up. Because of security reasons in servers, you will most likely be unable to use . files. To edit your php.ini file, access your files by using File Manager, FTP client or even SSH and look for php.ini file in your root directory. If you do not see such file, create it and add the following code:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
3: Through the Theme Functions File
Another simple method to increase the size of your image is just by adding the below code in theme’s functions.php WordPress file. These lines can be written in wp-config. , themes functions.php file, etc.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
4: Reach out to Your Hosting Provider
On the off chance that you are experiencing difficulty with uploading files and size limits, one of the quickest solutions is to contact your hosting provider and ask for help. With WPlook Hosting you will already have 112M to upload the image, but if you need help, don’t hesitate to contact us.
5: For Non-Technical Users
If you are a non-technical user, our support team can do this small job for you. The only thing you have to do is order a small job, and we will provide the service in less than 24 hours.