Wordpress max file upload size

How to Increase WordPress Max File Upload Size Limits

In today’s article, we will learn how to fix WordPress max file upload size errors. If you want to upload quality content to your site, sometimes it may take more memory than the default limit. The result will be the following error: upload_max_filesize.

There are several applications and platforms available to build and host your website. Today, you don’t own the market if you don’t have an amazing and interactive website. WordPress is one of the most widely used platforms that offers you various features and plugins. You can create a customizable website without going into the technical parts. With these many advantages come some drawbacks; You don’t have to worry about solving them as they can be fixed with simple steps

If you are using WordPress as a web hosting provider, there may be some errors regarding upload file limits. You may encounter these errors while installing a plugin, theme, or uploading a file or image that may hinder the functionality of your website. It could be that there is an issue with your server settings that is causing you the maximum size error.

Exceeding the uploaded file size is a widespread problem that can be easily and without much effort eliminated. Many hosting providers or platforms limit the PHP memory designated for running applications and scripts. Whenever the uploaded file size exceeds the upload_max_filesize directive value specified in the php.ini file set by the web server, it causes an error on your WordPress site. Handling this error may seem complicated, but you can fix it seamlessly.

The following article will let you learn what the upload_max_filesize error is, its prerequisites, and how you can fix this error in a few simple steps and various ways.

What is WordPress Max File Upload Size Error or Problem?

Some settings on your web server prevent you from uploading files that exceed the PHP memory limit. If you run WordPress on your server, you can control the amount set for PHP memory. But, if you are using a shared hosting server, you cannot change the server settings manually. This is the limit set for a single file to upload to WordPress. Although WordPress comes with different maximum file sizes, most are 64MB but can vary sometimes.

This error prevents you from installing plugins and themes that would exceed this limit and will make it difficult for you to continue your work until it is resolved. The error display may vary and may vary from server to server. The following image is one of the displays you can get.

How to Increase WordPress Max File Upload Size

Requisite

  1. First, you need to install a working WordPress application.
  2. Next, you must have access to the WordPress hosting WordPress application, either locally or via SSH.
  3. If you’re working from a client system, you’ll need a file manager like cPanel.
  4. Log in to the server with a sudo privileged account.
  5. You must have access to a command line or other interface and the necessary knowledge to use it.

There have lots of ways to  Fix the Upload_Max_Filesize Error

  • Edit the details of the .htaccess file using the command-line interface.
  • Modify the file- wp-config.php.
  • Change the php.ini file via cPanel to fix the error.
  • Update the PHP configuration on CPanel.
  • Contact customer support to resolve the error.

Edit the details of the .htaccess file using the command-line interface

One of the easiest ways to fix this upload_max_filesize parameter error is to increase PHP’s resource limit by changing the .htaccess file description. You can follow the simple steps outlined below to make this happen.

First, log in to the cPanel console and then go to the File Manager option from the Files section as shown below:

edit the details

From the list of files, search for the .htaccess file. Right-click the file to make further changes.

Will open a file and append the following file below the file to set the new limit.

 

php_value upload_max_filesize 256M

After you make changes, save the file contents to make the changes permanent This process will increase the upload_max_filesize parameter and solve the problem automatically. Once you save the changes, you can try uploading the file again, if the error comes up again, increase the PHP limit by adding the following lines to your .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

You can try expanding the PHP limit until it solves your memory problem. Be sure to check if the new limit is supported by your web hosting provider. You can also check the PHP information on your website for the maximum limit available.

Modify the file- wp-config.php

The second method to fix the upload_max_filesize error is by changing the wp-config file stored in your root directory. To modify the wp-config file, you need to log into cPanel and access public_html.

Open the wp-config file and see the below image and place or edit this code: @ini_set(‘upload_max_size’ , ‘256M’ );

Modify the file- wp-config.php

Once you have made the changes, click Save to continue and make the changes permanent. Reload your web browser for the changes to take effect and try uploading the file again.

Change the php.ini file via cPanel to fix the error

If you understand the upload_max_filesize error, you might know that it might be related to the php.ini file. You can change the php.ini file variables to solve the problem. Some shared web hosting providers set this value to the maximum limit so you don’t run into errors because you can’t change PHP variables on a shared host. You can change the PHP settings using the PHP configure tool available in cPanel. If you are working on a VPS or a different platform, you can upload the modified php.ini file to resolve the issue Follow the simple steps described below and get it done.

First, go to the php.ini file to make the changes. If you can’t see the file, you can ask your hosting providers for help. Open the file and look for the upload_max_filesize variable to change. Now, increment the value of this directive as shown below.

  • upload_max_filesize = 256M
  • post_max_size = 256M
  • memory_limit = 512M
  • max_execution_time = 180

To make the changes, save the file and you will surely get rid of the error.

Update the PHP configuration in cPanel

If you work with a shared web hosting provider, changing the PHP configuration may not be easy. Follow these simple steps to resolve the issue.

First, log in to cPanel and navigate to PHP Configuration which falls under the Advanced tab.
Then click on the PHP Options menu and search for the upload_mx_filesize variable to make the necessary changes.

 

Contact customer support to resolve the error

If you have tried every method mentioned above and still encounter the error, then you should try contacting the customer support of the web hosting server. You can mention the error you are facing and what steps you have taken to resolve the error. The support of most web hosting providers is available 24×7 to help you.

Conclusion

We have discussed all possible ways which can help you to solve the upload_max_filesize error on your WordPress site. If you are new to WordPress and don’t know about the upload_max_filesize error, you can refer to this article to understand its causes.

You can easily find effective steps to solve the problem We have discussed five methods for implementation.

  1. You can increase the upload_max_filesize value and other PHP variables using the .htaccess file.
  2. Can set a higher upload_max_filesize by editing the wp-config.php file
  3. And You can edit the php.ini file to increase the upload_max_filesize value.
  4. You can edit and adjust the PHP configuration by changing the PHP configuration properties through cPanel.
  5. Or you can contact your hosting providers for further assistance with your issue.
Scroll to Top