Editing the wp-config.php File

You can also adjust the upload limit via the wp-config.php file.

Step 1: Access Your wp-config.php File

  • Log in to your web hosting account.
  • Navigate to your File Manager or connect via an FTP client.
  • Locate the wp-config.php file in your root directory.

Step 2: Edit the wp-config.php File

  • Open the wp-config.php file for editing.
  • Add the following line near the bottom of the file, just before the line that says /* That's all, stop editing! Happy blogging. */:
@ini_set('upload_max_size' , '64M' );
@ini_set('post_max_size','64M');
@ini_set('max_execution_time','300');
  • Save the changes and close the file.

How to Increase Maximum File Upload Size in WordPress?

Increasing the maximum file upload size in WordPress is a common need for many site owners. Whether you’re uploading large images, videos, themes, or plugins, running into upload limits can be frustrating. This guide will show you various methods to increase the maximum file upload size in WordPress, step by step.

These are the following methods:

Table of Content

  • Updating the php.ini File
  • Modifying the .htaccess File
  • Editing the wp-config.php File

Similar Reads

Method 1: Updating the php.ini File

The php.ini file is the default PHP configuration file. Editing this file is one of the most effective ways to increase the upload limit....

Method 2: Modifying the .htaccess File

If you don’t have access to the php.ini file, you can use the .htaccess file to increase the upload size....

Method 3: Editing the wp-config.php File

You can also adjust the upload limit via the wp-config.php file....