WordPress is a powerful CMS used by millions of websites. Whilst its easy to get a WordPress website up and running, you may end up with the common problem of not being able to upload large files and media.
By default, the maximum upload size in WordPress is 2MB, although this value may vary among web hosting providers. To check what is the current max upload size limit in your WordPress website, do the following:
- Login to your WordPress admin area (WP Admin)
- From the left-side menu, navigate to Media > Add New
- You should see the value of max upload file size setting as shown in the screenshot below
If the current upload size limit does not meet your needs then you can continue reading this article where we will show you 6 easy ways of how to increase the maximum file upload size in WordPress.
1. Edit the .htaccess file
To access the .htaccess file you will need to connect on your hosting environment via FTP client, such as Filezilla, and navigate to the folder where WordPress is installed. Open the .htaccess file in your preferred code edit, or simply with Notepad, and add the following lines.php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
The above lines will define the max upload size in megabytes so feel free to adjust the numbers as per your needs.
2. Edit Functions.php file
If you are not able to access or edit the .htaccess file then there is an alternative option.
Increase the size limits of max upload file size by adding the following lines in the functions.php file of your theme.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Important: If you update your theme the above changes will be gone, so make sure you add them again after you update your theme or install a new one.
3. Edit settings in php.ini file
Changing the upload max filesize and increasing the memory limit can also be done through the php.ini file. In fact, this is one of the most common ways of doing this.
With the help of an FTP client (or SSH for those who have more experience) access the root directory of your WordPress site and look for the php.ini file. If you cannot find it then you will need to create it first.
Open any text editor and create a new file with the following lines of code. Once done save the file and upload it back to the root of your WordPress directory.
upload_max_filesize = 25M
post_max_size = 13M
memory_limit = 15M
4. Edit wp-config.php file
Another way of increasing the upload size in WordPress is to define the size parameter in the wp-config.php file. To do that, access your WordPress root directory using SSH or FTP and locate a wp-config.php file.
Open the file in any text editor and add the following code.
@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );
Save your changes and it should increase your file upload size.
5. Use the Increase Max Upload Filesize Plugin
If you are not familiar with server-side commands and therefore not confident to use any of the above options, there is a WordPress plugin available that will help you get the job done easily.
The plugin’s name is Increase Max Upload Filesize. To get this plugin installed please follow the steps below:
- Login to your WordPress Admin area
- From the left-side menu go to Plugins > Add new
- Search for “Increase Max Upload Filesize”, then install and activate it.
- Once activated, go to the plugin’s settings and simply enter your desired value for upload size. An example is shown in the screenshot below.
6. Contact your Web Hosting Provider
Since this change is considered to be server-side, you can always contact your web hosting provider to do this change on your behalf.
If you have a web hosting account with NetShop ISP then we can help you free of charge as all our web hosting customers enjoy the privileges of fully managed web hosting. This means that you can contact us at any time with any technical or WordPress-related support and we will assist you without extra charges.