Create Beautiful Responsive Photo & Video Galleries For Your Site in Minutes

Envira Gallery Blog

Digital Photography Tips, Tutorials and Resources

Large Images In WordPress

How to Upload Large Images in WordPress

Written By: author avatar Waseem Abbas
author avatar Waseem Abbas
    

Do you want to upload large images in WordPress? Are you getting the maximum upload size error? Often, the default maximum upload file size is 2 MB. In this article, we will show you how to upload large images in WordPress by increasing the file size limit.

Increase Maximum File Upload Size

As photographers, we want to upload high resolution photos in WordPress. However if you’re using shared WordPress hosting, then you may run into the maximum file upload size error.

You can increase the maximum file upload size in WordPress, but you need to edit some code files in your root folder.

If you don’t feel comfortable doing that, then you can ask your hosting provider to increase the maximum file upload size.

Below are the ways to increase maximum file upload size in WordPress, so you can upload large images.

PHP.INI File

If you’re on a shared host, then you will not see a php.ini file in your FTP. However, you can create a file and upload it in the root folder and add the following code:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

This is the most used method and works for majority of the people. In case, if 64 MB doesn’t work, then try changing it to 10 MB.

.htaccess File

You will find .htaccess in your root folder of your site. If you don’t see, then make sure that you check the setting to display hidden files in your FTP software or in cPanel file manager.

After that, edit the file and add the following code:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

This is just another method to increase the file upload size in WordPress.

If both of the methods sounds too advanced, then your best bet is to contact your hosting company.

Optimize Images

We also recommend that you optimize your images for the web to reduce file size. It will save your time and help you increase your website speed.

If you don’t want to edit the code, then this is another option for you.

While the process may lower your image quality, it’s barely noticeable. You can check out these 9 best free image optimization tools for image compression.

We hope this article helped you upload large images in WordPress. You may also want to check how to easily edit images in WordPress.

If you like this article, then please follow us on Facebook and Twitter for more WordPress tutorials.

author avatar
Waseem Abbas

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how Envira Gallery is funded, why it matters, and how you can support us.

author avatar
Waseem Abbas

The Best Drag and Drop WordPress Gallery Plugin

Envira Gallery: Create, Showcase, and Sell Your Work – Trusted by 150k+ Sites.

Enter the URL of your WordPress website to install

Please enable JavaScript in your browser to complete this form.

Upgrade to Envira Gallery Pro

Unlock even more powerful features designed to make your galleries even more beaituful.

Video Galleries

eCommerce

Social media Sharing

Adobe Lightroom

And much more!

Popular on Envira Gallery Right Now!

How to Create a Beautiful Masonry Image Gallery in WordPress

How to Create a Beautiful Masonry Image Gallery in WordPress

Facebook14TweetLinkedInPin1 Are you looking to showcase your photography or image…
Polished and Protected: How to Watermark WordPress Images

Polished and Protected: How to Watermark WordPress Images

Facebook20TweetLinkedInPin Are you wondering how to add a watermark to…

Comments

  1. Thank you for this info, much easier than expected! I just tried on several .htaccess files in my cpanel file manager (inmotion hosting). Had to edit then undo several times because adding the code for this procedure caused a 500 error. Turns out, since I’m using InMotion’s BoldGrid as an editor, I had to choose the .htaccess file within the BoldGrid “inspirations” (themes) folder and it worked! Now the limit is 128MB! It works! But I can’t edit the extra large images, oh well… thanks again!

Add A Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.


Copyright © [#this year :%Y] Envira Gallery, LLC. Envira Gallery is a trademark of Envira Gallery, LLC.