Error: the Uploaded File Exceeds the Upload_max_filesize Directive in Php.ini. E107

Introduction

The Uploaded file exceeds the upload_max_filesize directive in php.ini error in WordPress, occurs when uploading big files, themes, or images. The result is the outcome of a server-side setting that limits file sizes.

This guide provides vi (half-dozen) solutions on how to adapt the appropriate parameters and resolve the file size mistake.

Introductoru image with WordPress logo and file icon.

Prerequisites

  • A working WordPress installation
  • Access to the server that hosts the WordPress installation (local or SSH)
  • If you lot are working from a client system, a file manager (or cPanel)
  • A user account with sudo privileges
  • Access to a command-line/terminal window (optional)

6 Ways to Gear up Uploaded File Exceeds upload_max_filesize error in WordPress

Use the WordPress dashboard to check your current maximum upload file size. Select the Media > Add together New option, as shown in the image beneath.

Image is an example of where to find the maximum file limit within your WordPress dashboard.

In this example, the maximum file size is limited to 232 MB. It is not possible to modify this setting using WordPress. We provided vi simple solutions on how to configure maximum file size on your server.

Option 1: Edit the .htaccess File (cPanel)

1. Open up cPanel and launch the file manager.

ii. Right-click the .htaccess file, so click edit.

Notation: If you are not able to locate the .htaccess file, you may need to click Settings in the upper-right corner and bank check the box to show hidden files.

3. Explore the file and find the line php_value upload_max_filesize. Edit the line to look as follows:

          php_value_upload_max_filesize 256M        

This instruction changes the server-side limit on the size of the file you're immune to upload to 256 MB.

4. Salve the changes and exit the file.

Option two: Edit the .htaccess File using Command Line Interface

ane. Access the server that hosts your WordPress site.

two. Enter the following command in your Command Line Interface to access the WordPress directory:

          cd /path/to/wordpress        

Notation: The /path/to/wordpress is an example. You need to enter the correct path to your WordPress directory.

3. Open the .htaccess file with a text editor of your choice. In this case, we used the nano text editor:

          sudo nano .htaccess        

4. Explore the file and notice the line php_value upload_max_filesize. Edit the line and define the size you need:

          php_value_upload_max_filesize 256M        

This instruction changes the server-side limit on the size of the file you are immune to upload to 256 MB.

5. Save the changes and leave the file.

Option 3: Editing wp-config.php File

This method changes the limits on the PHP file size by editing the wp-config.php file directly:

1. Access the public_html binder using cPanel.

two. Find the wp-config.php file. Right-click the file and select the edit selection.

edit wp-config file window

Ringlet nearly to the end of the file and detect for the following comment line:

/* That's all, stop editing! Happy blogging. */

three. Add together the following code merely above that line:

          @ini_set('upload_max_size' , '256M' );        

4. Salvage the file and exit. Try to upload your file again.

Option 4: Edit the wp-config.php File from Command Line Interface

i. Access the server that hosts your WordPress site.

two. Enter the following command and admission the WordPress directory:

          cd /path/to/wordpress        

three. Open the wp-config.php file with a text editor of your pick.

          sudo nano wp-config.php        

four. Find for the post-obit comment line:

/* That'southward all, stop editing! Happy blogging. */

Displays the location of the line that needs to be added to the wp-config file to increase max upload size.

5. Add the following line merely higher up:

          @ini_set('upload_max_size' , '256M' );        

6. Save the file and exit.

Selection 5: Edit php.ini File

The php.ini file is a configuration file for PHP variables. The following steps show you how to edit the php.ini file:

ane. Log into your server hosting the WordPress site.

2. Access the Command Line Interface, and enter the post-obit:

          cd /etc/php/7.0/cli        

Note: If y'all're running a different version of PHP, make sure to replace vii.0 with the version you lot are currently using.

iii. Use a text editor to open the php.ini file:

          sudo nano php.ini        

4. Locate the following line:

          upload_max_filesize = 100M        

five. Replace 100M with a higher value in megabytes. (256 MB for example)

Image shows the location of the line that needs to be edited to increase limit.

This file allows you to configure other settings as well:

  • memory_limit 256M – Sets the max amount of memory a script tin apply.
  • post_max_size 32M – Sets the max size for the total of the Mail trunk data.
  • max_execution_time 600 – Max time, in seconds, that a script is allowed to run.
  • max_input_time 900 – Max time, in seconds, that a script is allowed to parse input data.

6. Relieve the file and get out.

Exam your file upload in WordPress – the issue with file size is now resolved.

Choice 6: Contact Host'south Support

It is not uncommon for hosting companies to gear up limitations on the settings clients can edit themselves. Depending on your particular hosting company, you might not exist able to perform some of the actions described in the previous steps.

In those cases, it might be necessary to contact your host's support services. Most hosts perform this blazon of configuration every bit part of their standard service.

Conclusion

At present yous know how to fix the fault "The uploaded file exceeds the upload_max_filesize directive in php.ini." in WordPress. This tutorial covered half-dozen unlike methods to increase the maximum file upload size.

Regardless of the chosen method, by following these elementary instructions, y'all are now able to ascertain the maximum file size when uploading files to your website.

Was this article helpful?

Yes No

mccorkleephimagent.blogspot.com

Source: https://phoenixnap.com/kb/fix-the-uploaded-file-exceeds-the-upload-max-filesize-directive-in-php-ini-wordpress

0 Response to "Error: the Uploaded File Exceeds the Upload_max_filesize Directive in Php.ini. E107"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel