How to Fix uploaded file exceeds the upload_max_filesize Error in php.ini WordPress?

Today, We want to share with you the uploaded file exceeds the upload_max_filesize directive in php.ini.In this post we will show you upload_max_filesize htaccess, hear for How to Fix the uploaded file exceeds the upload_max_filesize directive in php.ini Error? we will give you demo and example for implement.In this post, we will learn about PHP Upload File Size Limit with an example.

WooCommerce: “uploaded file exceeds the upload_max_filesize” Error

in the uploaded file exceeds the upload_max_filesize directive in php.ini. Best Solution Bellow
simple easy way to you need to increase your file size upload limit.

Updating Your php.ini file

first of all Each server has a available php.ini file, typically can be found in wp-admin folder.
here You required to edit open that file and write your new memory limit.

Follow these steps to edit the php.ini source file

  1. SignIn to your web hosting(Like as a Bluehost, HostGator, DreamHost, SiteGround, GreenGeeks, WPEngine, A2 Hosting, Liquid Web, Just Host, InMotion hosting, iPage, Pagely, Web Hosting Hub, Media Temple, Godaddy, Site5, HostPapa, Rocket.net and many more.) account after that go to cPanel
  2. Click on FILES -> File Manager
  3. Select “Document Root for:” from the Directory Selection and click on Go. (Make sure the checkbox for Show Hidden Files is checked)
  4. Go to your wp-admin folder
  5. Find a file called php.ini or php5.ini. (If you don’t see any php.ini, create a file titled php.ini)
  6. here Open the php.ini file. Find these lines in the php.ini file and replace it with the content below
  7. Save the changes you made to the php.ini file
  8. Now refresh your website and try uploading the file again.
Read Also:  Simple Get Category ID using Category Name

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Above settings may vary based on what web hosting company you are using.

Editing Your .htaccess file

If the above editingsimple PHP.ini file doesn’t work for you, then you can edit your .htaccess file to fix this issue.

Follow these steps to edit your .htaccess file:

  1. SignIn to your web hosting account as well as go to cPanel
  2. Click on FILES -> File Manager
  3. Choose “Document Root for:” from the Directory Selection as well as click on Go. (Make sure the checkbox for Show Hidden Files is checked)
  4. Find the .httaccess file.
  5. Open the .htaccess file as well as or edit the following source code at the bottom.
  6. Save or Update the changes you made to the .htaccess file
Read Also:  Get custom product attributes in Woocommerce

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Editing your wp-config.php File

If neither of these solutions works for you, you can try editing the wp-config.php file located at your websites root folder.

  1. SignIn to your web hosting account as well as go to cPanel
  2. Click on FILES -> File Manager
  3. Choose “Document Root for:” from the Directory Selection as well as click on Go. (Make sure the checkbox for Show Hidden Files is checked)
  4. Included the bellow to the very bottom of wp-config.php

@ini_set( 'upload_max_size' , '26M' );
@ini_set( 'post_max_size', '18M');
@ini_set( 'memory_limit', '18M' );

I hope you get an idea about the uploaded file exceeds the upload_max_filesize directive in php.ini. cpanel.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  WooCommerce Webhooks verification in PHP

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  WordPress plugin dependencies on Activation
  2. Read Also:  PHP retrieve_password wordpress function
  3. Read Also:  PHP wp_get_attachment_image_url wordpress function
  4. Read Also:  Check WordPress Plugin Dependencies
  5. Read Also:  WordPress AJAX URL GET POST Call PHP Function
  6. Read Also:  how to insert query in wordpress using wpdb? - Examples
  7. Read Also:  PHP retrieve_password wordpress function
  8. Read Also:  WooCommerce Webhooks verification in PHP
  9. Read Also:  WordPress plugin dependencies on Activation
  10. Read Also:  Simple Get Category ID using Category Name
CLOSEX