How to upload large images in WordPress. Many users see an error when trying to upload larger images in WordPress. This is due to the file size limit. In this article, we will show you how to fix this issue in WordPress.
Reasons Why You Cannot Upload Large Images in WordPress?
The reason you cannot upload large images in wordpress is because your hosting provider may have configured the server in a way that places a reasonable limit on file upload sizes. The image below shows you an example of how to see the limit
Another issue which may stop you from uploading large image files is memory limit.
By default, your WordPress site is allowed to use a reasonable amount of memory. When a script runs for too long and exhausts the defined memory limit, then you will see an error.
If you’re encountering either of these errors, then this article will help you fix that so you can easily upload large files to WordPress.
How to fix the issue with uploading large images in WordPress
Step1: Add this code in your functions.php file
@ini_set( 'upload_max_size', '64M'); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300'); |
Step2: In case this method fails, you can try adding this code to your .htaccess file in your site’s root folder.
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300 |
Step3: Simply add this code below in your php.ini file;
upload_max_filesize = 64M post_max_size = 64 Mmax_execution_time = 300 |
Step4: Contact us for assistance if you need help doing this. Our technical support team is available 24/7 to handle your website issues.