Knowledge Base
MilesWeb / How-Tos

How to change the maximum upload size in php.ini?

Approx. read time : 3 min

There are a couple of common errors that you may encounter with while using WordPress and other PHP-based programs that use the php.ini for certain settings. One of the most common is the maximum upload filesize settings (“upload_max_filesize“). This setting can be found within a file known as the php.ini file.  Below is an example screenshot of a program with max file size limits exceeded during an upload attempt:

Fixing the "Maximum upload size exceeded" Error

Error text: file_name” has failed to upload due to an error – This file exceeds the maximum upload size for this site.

To fix this error, you will need to increase the allowed memory in your php.ini file. The instructions below will help you to fix the php memory error and for this, you will need to make some adjustment in the appropriate sections of your local php.ini file.

Fixing the “Maximum upload size exceeded” Error

Step 1: Login to your cPanel Control Panel.

Step 2: Scroll down to the FILES section of your cPanel, and then click on the FILE MANAGER icon.

Step 3: Use the File Manager to navigate to the web root.

Step 4: Search for php.ini file in your public_html folder. If the file is not there, you can ask our Technical Support team member to place a default one in your account or you can simply create a blank file by clicking on the New File icon and naming it php.ini. Once you are done, you can edit and add your own settings.

Once you have a php.ini file, click on the file name to highlight it on the right side of the File Manager. If you need further information on editing with the File Manager editors, go to Using the File Manager Code Editor.

Step 5: Search the php.ini file for the following text:

;;;;;;;;;;;;;;;;

; File Uploads ;

;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.

file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not

; specified).

;upload_tmp_dir =

; Maximum allowed size for uploaded files.

upload_max_filesize = 128M

The file_uploads should be set to “on” and “Maximum allowed size for uploaded files” should be set to the file size that you will need.

Step 6: Click the Save Changes button to save your changes.

This change affects all files within the directory that a php.ini is saved unless the file is set to be recursive.  If it is set to be recursive, then it affects all directories as per the setting in the .HTACCESS file.

Pravin is Journalist Specializing in Blogging, Social Networking and Community Management. As a constant learner, he is always aiming towards new ideas and greater knowledge. When he is not doing research, reading, or writing for blogs, you can find him hanging around social media sites.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna