I bet you are looking for a suitable method to increase the file upload size on your WordPress website.
Well, Depending on the web hosting provider, the default WordPress max file upload size ranges between 2MB to 200MB.
However, it is important to upload high-resolution images on your website, especially when it is a portfolio, photography, or multimedia website.
If someone maintains such a multimedia website and tries to upload a file larger than 2MB, he gets a message — exceeds the maximum upload size for this site.
— It sucks, right?
Just because the WordPress maximum upload file size is 2MB, he needs to increase the max upload size of his WordPress website. In order to quickly get indexed by Google, large high-resolution images are essential for a multimedia or portfolio website.
Arnhost is going to provide all the possible solutions to increase the WordPress file upload limit.
Table Of Content
How to point out the file upload limit in WordPress
— Okay, first thing first.
You need to know the maximum file size of your WordPress site. Inside your site’s dashboard, go to –
Media » Add New
You will notice a message saying “Maximum upload file size: _ MB” (where _ indicates the number of file size limit) like below –
There you go. Now you know the maximum limit to upload a file.
How to Increase File Upload Size in WordPress
The experts of Arnhost will demonstrate several methods to increase the file upload size limit in WordPress. Some of these methods are appropriate for beginners with no coding skills where some are appropriate for intermediate-level users.
The .htaccess Method
Accessing and modifying the .htaccess file is often a result-driven solution to increase the maximum file upload limit. — However, implementing this method can’t always be that easy. We will talk about that just a bit later.
First, let’s talk about how you can modify the .htaccess file.
The .htaccess file is located at the root directory of your WordPress site’s folder. Edit the file using a code editor (i.e. Notepad) and add the following lines –
- php_value upload_max_filesize 64M
- php_value post_max_size 64M
- php_value max_execution_time 300
- php_value max_input_time 300
Here, The max file upload size is defined in Megabytes (M) whereas, the max execution time and input time are given in seconds. Change the numbers to suit your website needs.
Not to mention – the execution time represents the time limit that is spent on each script. So, edit it wisely.
In this way, you can increase the file upload limit on a WordPress website.
Note:
The applicability of this method depends on the following factors –
- If an Apache module is set using both Apache and PHP
- An FTP client is needed to connect your server
- May not work for shared hosting packages
The php.ini Method
In the WordPress root folder, you will see a file named php.ini. Edit the file by adding the following codes and don’t forget to save it –
- upload_max_filesize = 25M
- post_max_size = 13M
- memory_limit = 15M
Replace the digits as per your website’s requirements. This process was reported not to work when you provide 64M. If that’s the case, then give it a try with 10M (works many times).
Like the .htaccess method, this method requires accessing the root folder using a File Manager that comes with your hosting account (inside the cPanel dashboard) or using an FTP client.
The php.ini file will be in the same root folder where the .htaccess file is –
Note: Sometimes, you may not see a php.ini file inside the root directory, especially when you are using shared hosting. In that case, you can create a php.ini file and save it inside your WordPress root folder.
The user.ini Method
Just like updating the php.ini file, you can also edit and update the user.ini file. This method is quite suitable for increasing the file upload size limit as many have complained that the file upload limit has not been increased even after editing the php.ini file. This means the php.ini method is a bit outdated.
You will find the user.ini file inside the root WordPress directory (where the .htaccess file is located). Use any code editor and insert the following codes –
- upload_max_filesize = 100M
- post_max_size = 105M
- memory_limit = 256M
— Make sure you change the digits according to your needs.
As this method is pretty much like the php.ini method, you will need to access an FTP server or hosting file manager to edit this file.
Note: If you don’t see a user.ini file inside the root WordPress folder, you will need to create one and then, edit the file. Don’t forget to save the file after editing the user.ini file.
Updating the wp-config.php File
Did you know?
You can define the size parameter using the wp-config.php file
Updating the wp-config.php file is another way of increasing the file upload size limit in WordPress.
However, just like the previous two methods, you need to use either an FTP or SSH server to access the wp-config.php file inside the WordPress root directory.
Open the file using a code editor like Notepad and insert the following code –
- @ini_set( ‘upload_max_size’ , ’20M’ );
- @ini_set( ‘post_max_size’, ’13M’);
- @ini_set( ‘memory_limit’, ’15M’ );
Saving the changes will increase the file upload size limit for your website. The wp-config.php file should also be in the same root folder where the .htaccess and php.ini files are located.
Please be informed: The first 4 methods are for the intermediate level users who are not using shared hosting and bear a certain coding knowledge.
On top of that, they must have the privilege to access an FTP or SSH server.
Edit the Functions.php inside Theme Editor
Those of us who have a WordPress website feel more comfortable editing WordPress theme files than the root directory files. And that brings us to edit the functions.php file. You can increase the file upload size limit by editing the functions.php file
Finding and updating the functions.php
If you are relatively new to WordPress, this file may be a little difficult to find. Now we will show you how to find and edit this file –
1.Providing sufficient credentials, login to your WordPress website by going to –
2. You will see the “Appearance” menu on the left panel inside your WordPress dashboard.
3. Go to Appearance >> Editor
4. Inside the Editor menu, you will notice the functions.php file under the “Theme Functions” title –
5. Great, you have found the functions.php file.
Now, it’s time to add the following codes inside this file –
- @ini_set( ‘upload_max_size’ , ’64M’ );
- @ini_set( ‘post_max_size’, ’64M’);
- @ini_set( ‘max_execution_time’, ‘300’ );
Provide data based on the maximum file upload limit you want to keep. However, there are some reasons for which it is better not to edit the functions.php file –
- When you change the theme, your edits will be lost.
- When the theme gets updated, the edits will be lost.
- Any mistake in the code can lock you out. So, make sure to keep an adequate backup before editing the functions.php file.
Increase upload size limit in Multisite
This is a conditional process. The condition is – you must run WordPress multisite network.
Okay,
Now follow the steps below –
- Head over to your Network Admin dashboard
- Then, go to – Settings >> Network Settings
- Now, keep on scrolling down until you see the “Upload Settings” title
- You will notice a field named Max upload file size where the value is set to 1500KB (~1.5 MB) by default.
- Change this value to a higher value as you like and hit the “Save Changes” button.
You cannot block the maximum server-level upload size limit from here. If the limit you set exceeds the server’s maximum upload size limit, the server will ignore it.
For example, suppose your server is set to 20MB. However, you can not upload any file of 25MB. However, if the network settings are set to 15MB, you can upload files of 20MB because in that case the server can be set to 20MB.
Plugin Method
It is the most familiar and probably the easiest method. Most of us know the process of installing and activating a plugin. In addition to that, it doesn’t require any coding skills.
Even for increasing the file size upload limit, there’s plenty of plugins out there. Each of these plugins works pretty much the same way.
We think the “Tuxedo Big File Uploads” plugin deserves a remarkable spot in this case. Therefore, we will explain the process of increasing the file size upload limit through this plugin.
1. Login to your WordPress dashboard by going to –
2. At the left bar, go to Plugins >> Add New
3. Type in ‘Tuxedo’ at the search bar-
4. To install the plugin, click on the “Install Now” button –
5. Once, it is installed, click on the ‘Activate’ button. This will turn the plugin for your website.
6. Great!
The installation and activation of the plugin are done. Now, go to Settings >> Media
7. Scroll down until you see the “Uploading Files” section.
8. Enter a value in the “Maximum Upload Size (MB)” input box. For example – 128, 256, 500, or anything.
After giving a suitable value, click on the “Save Changes” button to save your work progress.
9. Again, go to Media >> Add New –
10. You will notice that –
Maximum upload file size: (what value you have provided) MB
In this way, you can increase the file upload size for your WordPress website. The process for other plugins is pretty much the same.
Contact your hosting provider:
If you are not a tech guy and even don’t want to engage with plugins, then contacting your hosting provider is the easiest and quickest method.
Your hosting provider knows that the task of increasing the file size upload limit is trivial and they are always there to help you. In fact, this solution can be relaxing and effortless, especially for non-technical personnel.
— However, depending on the considerations of a WordPress hosting provider, the overall service quality can be understood.
Depending on the hosting provider, you will probably get a dashboard. Inside your dashboard, you will see a chat box icon in the bottom right corner. If you report your problem through the chatbox, you will get the solution very quickly.
Like the notable web hosting providers in Bangladesh, — ARN HOST offers all types of medium for 24/7 customer support including increasing file upload size limit.
Summary:
As you can see after reading this article, it is not too complex to increase the file size upload limit. There can be other ways to do this task depending on your web host.
Options like –
- Changing PHP Options via cPanel
- Increasing maximum file upload size using Nginx
- ‘upload_size_limi’ filter and etc
We haven’t discussed these methods as they can differ based on the WordPress hosting provider. Among all the methods that we have discussed, we honestly think reaching your hosting provider will be the best way as it is quick and you don’t have to take responsibility for any technical issues.
Leave A Comment
You must be logged in to post a comment.