How to Increase Media File Maximum Upload Size in WordPress

by Ahsan Parwez  April 5, 2017

WordPress has become an internet powerhouse with so many themes and plugins that allow you to build just about any kind of website. From ecommerce to a simple blog, WordPress has you covered.

However, there are many things one must take care of when building a site with WordPress, like improving its security, speed and page-load times.

If you are building a WordPress website that hosts a portfolio with large image files or a video hosting site with single media file size running into GBs, then you might face a roadblock of not being able to upload media files larger than 25MB (in most cases).

By default, maximum upload size in WordPress ranges from 2MB to 150MB depending on the settings of your web hosting provider is giving by default.

To check what is the current max upload size limit in your WordPress site then navigate to WP Admin -> Media -> Add New. You will see the current max upload size on the bottom as shown in the screenshot.

If the current max upload size limit meets your demand then you can leave it as it is. However, if it doesn’t then don’t fret, there are many ways you can increase the max upload size in WordPress. I am going to highlight following three ways in this tutorial.

  1. Update Your .htaccess file
  2. Edit Your Theme’s Functions.php file
  3. Contact Your Hosting Provider

1- Update Your .htaccess file

If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the max upload size in WordPress.

To access your .htaccess file, connect to your server via FTP client and navigate to the folder where WordPress is installed. Open up .htaccess file in a code editor or Notepad and add the following lines.

This will define the max upload size in Megabytes. Replace the numbers as per your requirement. The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Choose a number that is suitable for your site.

2- Edit Your Theme’s Functions.php file

In some cases, you might not be able to access your .htaccess file or you are more comfortable editing WordPress theme files.

You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.

However, remember if you change the theme then max upload size will return to its default values until you edit the functions.php file of the new theme.

3- Contact Your Hosting Provider

If you do not want to edit the files yourself then you can always contact your hosting provider to do it for you.

If you are on Cloudways then you can easily increase the max upload size limits of all your websites on a single server through the options in the platform. It is only a matter of a few clicks.

To edit upload size limit, log in to your Cloudways account navigate to Server under the Server Settings & Packages edit the Upload Size field as shown in the screenshot. Don’t forget to click on Save Changes at the bottom of the screen.

Conclusion

WordPress is a versatile CMS. There is always a way to do something. If you are not able to find an answer to any of your issue pertaining to WordPress, then you can always go and ask in the ever helping WordPress community. I am also a part of that awesome community, so you can always reach out to me as well.

Make Your WordPress Website 100% Faster.

Host it now on Cloudways WordPress Hosting Platform.

About Ahsan Parwez

Ahsan is the Community Team Manager at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in any aspect he can. In his free time, you can find him playing RTS PC games.

Stay Connected:

You Might Also Like...