Now a days most of the bloggers and webmasters are facing the problem of upload file size in wordpress. By default upload size in wordpress is 2MB. This size much sufficient for images most of the images are below 2MB. But if you are looking to upload HD (High Definition) image in wordpress, then you are going to face same problem.
Most of the hosting company provide 2MB default upload size on wordpress. So you can contact your hosting service provider to increase the file upload size or you can follow any of the below steps to increase file upload size in wordpress.
1) Theme Function File (functions.php)
Most of the WordPress Theme are created in such a way that you can add your custom code and you can increase file upload size in wordpress. All you need to do is copy below code and paste it
@ini_set( ‘upload_max_size’ , ’64M’ );
@ini_set( ‘post_max_size’, ’64M’);
@ini_set( ‘max_execution_time’, ‘300’ );
2) Creating or Editing an existing PHP.ini file
If you using shared hosting then it might be chance that you can’t see php.ini file. If file is not available then you can create it and paste it at root folder. If there is the file on root folder then make below changes. Please Note: If below code (64M) is not work then you can make it 10M.
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
3) Editing .htaccess File Method
Most famous and easiest way to increase file upload size in wordpress is making necessary cahnges in .htaccess file. All you need to do is copy below code and paste it and save the file. In shared hosting you will find this file in root folder. If file is not available then you can create it.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
In most of the cases above mentioned steps may not work then in such situation you need to contact your website hosting service provider. If still you are facing any problem, then don’t wait you can contact us via Contact Us page or comment below.