Many WordPress users ( Mostly photographers) get errors when they try to upload big photos . Normally any fresh WordPress installation comes with limit of 2mb , 8mb , 16 mb , 32mb , 64mb and 128 mb. depending upon file size limit.

Cause of Image Upload error –

The most common cause for this error is your WordPress hosting configuration . Your hosting provider configured your server in a way that portion of space designated on file size. For checking the current file limit of your website you have to visit Media> Add New

file_upload_limit

If the file size is bigger than the upload limit then you will see error like this  “filename.jpg exceeds the maximum upload size for this site”

This issue is due to low memory allocation in php.ini file of your WordPress installation . Although many host provides maximum limit of 64 mb. or 128mb in the case of Dedicated hosting. But for normal WordPress user 32mb is enough to meet his demands.

How to fix this issue :

Many host help users over call or chat and fix this issue. But some never do. I am sharing the easiest way to fix this issue.

Fix by using code: If you want to increase file size upload limit by code, then use the code below . Paste the code at bottom of your theme’s function.php file.

@ini_set( 'upload_max_size' , '32M' );
@ini_set( 'post_max_size', '32M');
@ini_set( 'max_execution_time', '300' );

This code will work for most of the WordPress websites. However some WP sites need some extra work for fixing file upload error. So you can try adding the following codes in .htaccess file of your website’s root folder

php_value upload_max_filesize 32M
php_value post_max_size 32M
php_value max_execution_time 300
php_value max_input_time 300

Above examples are only for increasing your file size upload limit to 32M you can change them to 4, 8 ,16 , 64, 128  as per requirement.

Increasing file uploading limit of WordPress website hosted on shared server.

For shared hosting you have to create php.ini file for increasing file upload limit.  Here is step by step guide :

Login to your cpanel or use ftp to access site’s folder

Create a blank file name php.ini

Copy and paste this code into php.ini file ( you can use code editor available on your hosting )

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

and save the file. You will see your file upload limit increased to 64mb.

Conclusion –

Large images takes huge time to upload than articles without images. But for photographer or designer it is important to show high quality image in their portfolio .So this makes sense to increase file size upload limit.

You can use CDN ( Content delivery network) to host your static images. This will help you in making your website fast loading and SEO friendly .

If you think that your hosting is not good enough to support file uploads or your hosting accounts has space limitations then it will be better to move on the best unlimited hosting

Bluehost_WordPress_Hosting