Soliloquy Blog

WordPress slider tips, Tutorials and Resources.
Upload Large Image Files in WordPress

How to Upload Large Image Files in WordPress

by Waseem Abbas on February 5, 2018

Do you want to add large image files on your site? When uploading images with large sizes, WordPress shows a file size error because of the upload size limit. In this tutorial, we will share how to upload large image files in WordPress.

By default, you can’t add large photos in the WordPress media library. You need to edit a few lines of code to increase the upload file size limit.

To upload large image files in WordPress, you’ll need to follow these 2 steps:

  • Step 1. Edit your PHP.INI file and add the code
  • Step 2. Edit your .htaccess and add the code

Ready to get started? Let’s go!

Step 1: Edit Your PHP.INI File and Add the Code

It is the most used method to increase the upload file size limit in WordPress. You can find the php.ini file in your FTP. Edit the file and add this code:


upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300


If 64 MB doesn’t work, then simply change it to any other value like 10 MB.

In case, you are using a shared hosting, then you may not find this file. We recommend you to create it in the FTP root of your site and add the above code.

Step 2: Edit Your .htaccess and Add the Code

The php.ini file will allow you to increase the image file size limit. However, if the above method fails, then you can simply edit the .htaccess file in your site’s root folder and add this 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


Sometimes the file isn’t visible, so you need to view the hidden files in your FTP root to access it.

These two steps include the code editing. If you don’t want to edit the code, then contact your hosting company to increase the file size for you.

It is also recommended to optimize the file size before uploading images on your site. You should check out this ultimate guide to optimize your WordPress images.

That’s all. We hope this tutorial has helped you to learn how to upload large image files in WordPress. You may also want to check out our guide on how to wrap text around images in WordPress. In case, your images are loading slow in WordPress, you should check this ultimate guide to boost speed and performance.

If you like this tutorial, then please follow us on Facebook and Twitter for more free WordPress guides and resources.

Waseem Abbas is a content writer for SoliloquyWP and Envira Gallery.

Leave a Reply

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.