Increasing WordPress Image Upload Size Limit

Sure! Here is the content formatted for easy copy-paste into the WordPress block editor:


Increasing WordPress Image Upload Size Limit

Increasing the image upload size limit in WordPress can be done through several methods, depending on your hosting environment and permissions. Here are the most common methods:


Method 1: Edit php.ini File

If you have access to your server’s php.ini file, you can increase the upload size limit by editing this file.

  1. Locate the php.ini File:
    This file is typically found in the root directory of your server or in the PHP installation folder.
  2. Edit the File:
    Open the php.ini file and look for the following lines:
   upload_max_filesize = 2M
   post_max_size = 8M

Change the values to your desired limits, for example:

   upload_max_filesize = 64M
   post_max_size = 64M
  1. Save the File:
    Save the php.ini file and restart your web server.

Method 2: Edit .htaccess File

If you do not have access to the php.ini file, you can modify the .htaccess file in your WordPress root directory.

  1. Open or Create the .htaccess File:
    The .htaccess file is typically located in the root directory of your WordPress installation.
  2. Add the Following Lines:
   php_value upload_max_filesize 64M
   php_value post_max_size 64M
  1. Save the File:
    Save the .htaccess file and try uploading your images again.

Method 3: Edit wp-config.php File

Another method is to add a few lines to your WordPress configuration file.

  1. Open the wp-config.php File:
    This file is located in the root directory of your WordPress installation.
  2. Add the Following Lines:
   @ini_set('upload_max_size' , '64M' );
   @ini_set('post_max_size','64M');
   @ini_set('max_execution_time','300');
  1. Save the File:
    Save the wp-config.php file and try uploading your images again.

Method 4: Using a Plugin

If you are uncomfortable editing these files manually, you can use a WordPress plugin to increase the upload size limit.

  1. Install and Activate a Plugin:
    Search for and install a plugin like “Increase Maximum Upload File Size” or “WP Maximum Upload File Size”.
  2. Configure the Plugin:
    Follow the plugin’s instructions to set your desired upload size limit.

Method 5: Contact Your Hosting Provider

If none of the above methods work or if you do not have sufficient permissions, contact your hosting provider. They can increase the upload size limit for you.


Verification

After making these changes, you can verify the new upload limit in WordPress:

  1. Go to Your WordPress Dashboard.
  2. Navigate to Media > Add New.
  3. Check the Maximum Upload File Size:
    The maximum upload file size should be displayed at the bottom of the upload box.

Simply copy and paste the above content into your WordPress block editor.