Increase upload_max_filesize in WordPress Site.

🖊 Written by Updated on

WordPress is the most popular Content Management System, if you are a blogger then you have encounter Maximum Upload Size Limit on WordPress. This issue mostly is seen when the website owner uses limited shared hosting for their website. When your file uploads through WordPress then showing “The uploaded file exceeds the upload_max_filesize directive in php.ini”. Then what you should do, there are two methods one editing php.ini file from your cPanel file manager or second is file upload directly through FTP Client (eg. FileZilla).

upload_max_filesize error in WordPress

But there are other problems on FTP Client, if you want to upload photos for your articles or blog post, then this FTP method is complicated. So, we are going to see how to fix this WordPress upload_max_filesize error. We are going to explain the two methods.

WordPress default upload_max_filesize
  1. php.ini Editing through cPanel
  2. php.ini Editing through FileZilla or FTP

Increase WordPress upload_max_filesize through cPanel.

In the case of a new blogger or who wants to become a blogger mostly they use shared hosting with cPanel. So Host provider gives pre-configured setup. So after purchasing these hosting customer faces these types of problems. One of them is the WordPress file upload limit, you can contact your host provider and fix this problem through them or you can do yourself.

Some users or bloggers use Cloud hosting with pre-configured Software like “Bitnami WordPress certified by Automattic”, also they face this type of “upload_max_filesize” error. So they can also fix by themselves. Read the article if you are using Cloud hosting.

Edit php.ini file located in public_html folder

Login your hosting dashboard and go through file manager and find “public_html”, you can see below in the image. After clicking public_html then scroll down and find “php.ini”, and click the edit button by clicking the right button of the mouse or just clicking on edit. See below in the Image.

Open public_html on cPanel

Add these lines of code in your php.ini file in cPanel

When we click on edit, then cPanel would prompt to select txt encode, leave them just hit enter then a new window will open.

Now add these lines of code:

Upload_max_filesize = 64M
Post_max_size = 64M
Max_execution_time = 300

Note:- These lines of code set for only 64 Megabyte if you need more then change the variable as your necessity.

After adding this line of code just hit “Save Changes”.

Edit php.ini in WordPress

Check the Increased size of upload_max_filesize in WordPress Dashboard.

After adding these code line we should check our maximum upload file size. So go to WordPress Dashboard and click “Media” and “Add New”, then WordPress will show the limit on our screen.

Check Upload limit on WordPress Dashboard

Increase WordPress upload_max_filesize through File Zilla or FTP Client

We can also increase our WordPress upload_max_filesize using FTP Client Software like File Zilla. Connect to your hosting server using your IP Address or Password. These credentials you can get form your host provider or your hosting dashboard.

Retrieve credentials and connect to the server.

Connect to Your Server Through FTP and Click public_html

Now, we are going to find “public_html” then click on it. Now down side will show some files, find “php.ini” and click your mouse right button.

Connect FTP Client for editing php.ini

Right Click on php.ini for editing

File Zilla will prompt you to “Download” and “View/Edit”, You should select one option of them. Now a new window will open and prompt you to select the editor if you have downloaded “Notepad++” then select this one or by default Windows Notepad will open.

Ftp option Download or Edit

Add these lines to increase WordPress upload_max_filesize.

Upload_max_filesize = 64M
Post_max_size = 64M
Max_execution_time = 300

Now same as it was before in cPanel you should add these lines of code and save the file. If you download and then editing the file then you should upload the edited file, just drag and drop.

Edit the php.ini on any notepad

Thank You!


I am a blogger and a digital marketer based in Delhi, India. I have a passion for blogging and influencing people from my work. I am a student pursuing a Bachelor's Degree in Science from Delhi University.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap