WordPress

Increase Maximum File Upload Size in WordPress (upload_max_filesize and post_max_size)

0
WordPress

To increase the maximum file upload size in WordPress, you can modify the upload_max_filesize and post_max_size values in your WordPress installation.

Method 1: Using the WordPress dashboard

  1. Go to Settings > Media.
  2. Under the Maximum upload file size section, enter the desired maximum file upload size in MB.
  3. Click the Save Changes button.

Method 2: Editing the wp-config.php file

  1. Open the wp-config.php file in a text editor.
  2. Add the following lines of code to the file, just below the line that says define('DB_NAME', '');:
PHP
@ini_set('upload_max_filesize', '20M');
@ini_set('post_max_size', '23M');

Replace 20M and 23M with the desired maximum file upload size in MB.

  1. Save the file and upload it back to your WordPress installation.

Method 3: Using a WordPress plugin

There are also a number of WordPress plugins that can be used to increase the maximum file upload size. One popular plugin is called Increase Max Upload Filesize.

To use this plugin:

  1. Install and activate the plugin.
  2. Go to Settings > Increase Upload Size.
  3. Enter the desired maximum file upload size in MB.
  4. Click the Save Changes button.

Note: If you are increasing the maximum file upload size, you may also need to increase the memory limit for your WordPress installation. You can do this by adding the following line of code to the wp-config.php file:

PHP
@ini_set('memory_limit', '256M');

Replace 256M with the desired memory limit in MB.

Please note that your hosting provider may have limits on the maximum file upload size and memory limit. If you are unsure of what the limits are, you can contact your hosting provider for assistance.

White Screen of Death in WP-Admin

Previous article

How to Improve Page Speed in WordPress

Next article

You may also like

Comments

Leave a reply

Your email address will not be published. Required fields are marked *

More in WordPress