The best way to Repair the upload_max_filesize Error in WordPress – Choose Web Hosting

June 22, 2021


How to Fix the upload_max_filesize Error in WordPressHow to Fix the upload_max_filesize Error in WordPress

Most internet hosting suppliers set limits to the PHP reminiscence designated for working purposes and scripts. The uploaded file exceeds the upload_max_filesize directive in php.ini is an error that happens in your WordPress web site while you add a file that exceeds the restrictions set by your webserver.

As scary as this error could seem, the options are fairly straight-forward. On this tutorial, you’ll learn to repair the error by rising the default restrict of upload_max_filesize via a couple of strategies.

The best way to Repair the upload_max_filesize Error

The answer, as you might need guessed, entails rising the default restrict of upload_max_filesize. Let’s dive into it and see what steps we will take to repair this WordPress error.

Methodology 1. Modifying the .htaccess File

The quickest repair for the uploaded file exceeds the upload_max_filesize directive in php.ini error is rising your PHP useful resource limits by tweaking the .htaccess file. Right here’s learn how to do it:

  1. Login to hPanel and navigate to File Supervisor beneath the Information part.This image shows you how to find File Manager on hPanelThis image shows you how to find File Manager on hPanel
  2. Find the .htaccess file and right-click to Edit.This image shows you how to edit the .htaccess file in public_html directory to fix the upload_max_filesize error in WordPress.This image shows you how to edit the .htaccess file in public_html directory to fix the upload_max_filesize error in WordPress.
  3. Add the next line on the backside of the file: php_value upload_max_filesize 256M

    and Save the adjustments.

That’s it! Rising the upload_max_filesize worth ought to mechanically repair the error.

Attempt importing your file once more and if the error persists, Improve further PHP limits by including these strains 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

Regulate the PHP limits to any desired values so long as your internet hosting suppliers help it. You can even find the utmost accessible limits by checking the PHP data of your web site.

Methodology 2. Modifying the wp-config.php File

One other strategy to do away with the uploaded file exceeds the upload_max_filesize directive in php.ini error is by tweaking the wp-config.php file situated in your root listing.

All you must do is log in to the hPanel and entry public_html to edit the wp_config. php file. Add the next line earlier than the “That’s all, stop editing! Happy publishing” line:

@ini_set(‘upload_max_size’ , ‘256M’ );

This image shows you how to increase the php upload value by editing wp-config.php file.

This image shows you how to increase the php upload value by editing wp-config.php file.Now Save the file, refresh your net browser, and check out importing once more!

Methodology 3. Updating php.ini to Repair the upload_max_filesize Error

When you look nearer on the uploaded file exceeds the upload_max_filesize directive in php.ini error message, we will safely assume that it has one thing to do with php.ini, a file that holds all the PHP associated variables.

When you’re utilizing shared internet hosting by Hostinger, all limits are already on the most worth for person comfort, so it’s not doable to change php.ini.

Nevertheless, you may at all times modify your PHP settings via the PHP Configuration device on hPanel if you want.

When you’re utilizing VPS or a distinct platform, you may attempt updating php.ini to repair the error, right here’s what you must do:

  1. Navigate to your php.ini file and edit it. When you can’t discover it, ask help out of your internet hosting suppliers.
  2. Find the upload_max_filesize and enhance it by altering its quantity. You can even enhance a couple of different limitations, as proven beneath: upload_max_filesize = 256M post_max_size = 256M memory_limit = 512M max_execution_time = 180
  3. Save the file, and that’s it, the error ought to not happen.

Methodology 4. Making Adjustments to PHP Configurations on hPanel

For Hostinger purchasers, modifying PHP configurations can’t get any simpler. Hostinger affords a custom-built device to edit and modify the PHP settings of your internet hosting account.

Log in to hPanel and head to PHP Configuration beneath Superior. Then, swap to the PHP Choices menu and scroll down to search out upload_max_file row and make adjustments as wanted.This image shows you how to make changes to the PHP Configuration tool on hPanel

This image shows you how to make changes to the PHP Configuration tool on hPanel

Methodology 5. Contacting Buyer Assist to Repair the upload_max_filesize Error

If not one of the choices above fastened the error, attempt contacting your internet hosting help staff.

Clarify the scenario and allow them to know what steps you took to repair the WordPress error, and hopefully, they’ll resolve the issue for you.

When you’re a Hostinger shopper, our buyer success brokers are prepared that will help you out 24/7 via our stay chat function. Log in to the hPanel and entry the chat function on the backside proper of your dashboard.

Conclusion

On this tutorial, you could have discovered 5 other ways to repair the uploaded file exceeds the upload_max_filesize directive in php.ini error in WordPress. Right here’s a fast recap:

  • Rising upload_max_filesize and different PHP values via the .htaccess file
  • Setting greater upload_max_filesize via the wp-config.php file
  • Modifying php.ini file to extend upload_max_filesize
  • Modifying and adjusting PHP configurations via the PHP Configuration function on hPanel
  • Contacting your internet hosting suppliers for help

Straightforward, proper? In case you have any questions or solutions, don’t hesitate to remark down beneath!

AuthorAuthor

Domantas leads the content material and website positioning groups ahead with contemporary concepts and out of the field approaches. Armed with in depth website positioning and advertising data, he goals to unfold the phrase of Hostinger to each nook of the world. Throughout his free time, Domantas likes to hone his net improvement abilities and journey to unique locations.

Source