softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

Learn to Fix the upload_max_filesize Error in WordPress

HomeLearn to Fix the upload_max_filesize Error in WordPress

Offer Expire Soon..


Only New User..


Mostly there is a limit set to the PHP memory by web hosting providers to run applications and scripts. An error “the uploaded file exceeds the upload_max_filesize directivein php.ini” occurs on your WordPress website when the file you upload exceeds the limits set by the web server.

Though this error may seem to be scary, it has straight-forward solutions. In this tutorial, you will learn about fixing the error by increasing the default limit of upload_max_filesize using a few methods.

Methods to Fix the upload_max_filesize Error

Method 1. Edit the .htaccess File

Method 2. Edit the wp-config.php File

Method 3. Update php.ini

Method 4. Edit php.ini File Through cPanel

Method 5. Contact MilesWeb’s Customer Support

Table of Contents

Toggle
  • Method 1. Edit the .htaccess File
  • Method 2. Edit the wp-config.php File
  • Method 3. Update php.ini
  • Method 4. Edit php.ini File Through cPanel
  • Method 5. Contact MilesWeb’s Customer Support
  • Conclusion

Method 1. Edit the .htaccess File

The quick method to fix the error “the uploaded file exceeds the upload_max_filesize directive in php.ini” is to increase your PHP resource limits by modifying the .htaccess file. It can be done as below:

  • Login to your cPanel and go to Files->File Manager.
  • Find the .htaccess file and right-click on it to Edit.
  • A confirmation window for editing the file will pop-up, click on Edit again.
  • Include this line below the file:
php_value upload_max_filesize 256M
  • Now, Save the changes.
  • In this way, you can increase the upload_max_filesize value that will automatically fix the error.
  • Upload your file again and still the error occurs, increase the additional PHP limits by including the below lines into the .htaccess file:
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_input_time 180
php_value max_execution_time 180
  • Modify the PHP limits to your preferred values until your web hosting provider supports it. Moreover, find the maximum available limits by checking the PHP info of your website.

Method 2. Edit the wp-config.php File

  • The second method to get rid of this error is by modifying the wp-config.php file located in your root directory.
  • Just log in to the cPanel, go to public_html and search for the wp_config. php file. Right-click on the file and click on Edit.
  • A confirmation window for editing the file will pop-up, click on Edit again.
  • Include the below line before the “That’s all, stop editing! Happy publishing” line:
@ini_set('upload_max_size' , '256M' );
  • Then Save Changes to the file, refresh your web browser and try to upload it again.

Method 3. Update php.ini

When you keenly check uploaded file exceeds the upload_max_filesize directive in php.ini error message, you can assume that there is something related to php.ini, a file that comprises of all of the PHP related variables.

On a shared server of MilesWeb, you can modify it by altering php.ini.

  • In terms of VPS or a different platform, try to update php.ini to fix the error.
  • Go to your php.ini file, right-click on it and click on Edit it. In case you don’t find it, ask for help from your hosting providers.
  • Find the upload_max_filesize and increase it by modifying its number. You can also increase a few other limitations, as below:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 180
  • Now, Save the file and the error should no longer exist.

Method 4. Edit php.ini File Through cPanel

If your web host has offered you cPanel, you can easily edit the php.ini file and upload_max_filesize directive via the cPanel dashboard.

  • Go to MultiPHP INI Editor under Software section.
  • Select your WordPress website from the dropdown and edit the upload_max_filesize directive as below and click on Apply:

You can increase the value based on your requirements.

Method 5. Contact MilesWeb’s Customer Support

If none of above options helps in fixing the error and you are a customer of MilesWeb, contact their customer support team.

You can explain them the situation and the steps you followed to fix the error. They will resolve the problem for you.

You can contact MilesWeb’s support team at any time. There are two contact options: email and live chat.

Conclusion

Hopefully, you will able to resolve the upload_max_filesize error with the above methods.

Also Read

Ways to View Access and WordPress Error Logs

How to Generate The Default WordPress .htaccess File?

Faizan Khan
25
Content Management System (CMS), Latest News, WordPress
Prev PostStep by Step Guide to Manage and Use WordPress Custom FieldsMay 11, 2024
Next PostLearn About WordPress Database Management with phpMyAdminMay 11, 2024

Related items

Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
147
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
132
Latest News

Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate xx bytes)

WordPress is a free open source blogging tool. When posting a article OR uploading a image

Faizan Khan
14/05/2024
145
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.