How to Increase the Maximum File Upload Size in Cpanel For WordPress or Other Application

Table of Contents

  • Method 1 – Increasing max upload size in .htaccess
  • Method 2 – Configuring php.ini file
  • Method 3 – Changing maximum upload size in cPanel
  • Method 4 – Modifying wp-config.php file

Method 1 – Increasing max upload size in .htaccess

Many hosting providers allow changing various PHP settings via .htaccess file. Thus by applying php_value upload_max_filesize rule in .htaccess file you can increase PHP maximum file size upload limit.

We will use File Manager to edit .htaccess file, but the same can be done by using FTP client. You should be able to find .htaccess in the same directory as your WordPress files. For example, if you can access your blog via yourdomain.com address, WordPress and .htaccess should be in the public_html folder.

Once you located .htaccess file, select it and click on Edit button.

Edit

You need to add the following codes at the bottom of the file:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

Once you are done save the changes by pressing Save icon at the top left corner.

Code

Method 2 – Configuring php.ini file

IMPORTANT: This method is the most suitable if you host your WordPress on VPS. Many shared hosting providers do not allow editing php.ini file. If you are using shared hosting, contact your hosting support team to make sure you can apply changes to php.ini file.

If .htaccess method did not work for you, you could try increasing WordPress upload limit by editing php.ini file. Access your files by using File Manager, FTP client or even SSH (if it’s supported) and look for php.ini file in your root directory. If you cannot see such file, create it and enter the following rules:

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Once you are done save changes and revisit your WordPress admin area –> Media -> Add Newsection to confirm the change.

Method 3 – Changing maximum upload size in cPanel

If your hosting provider is using cPanel and allows changing PHP settings, you can easily increase maximum file upload size:

  1. Access cPanel and look for Select PHP version in Software section.
  2. Select PHP version
  3. Click on Change to PHP options.
    Change PHP Options
  4. Modify the post_max_size and upload_max_filesize values.
    Increase upload size in cPanel
  5. Click on Save button to save the changes.

Method 4 – Modifying wp-config.php file

Do not worry if above methods do not work for you. Another way to increase upload limit in WordPress is to add the following line to wp-config.php file:

define('WP_MEMORY_LIMIT', '128M');

Access WordPress files using File Manager or FTP client, locate wp-config.php and amend the above line to the bottom of the file. Once you are done, wp-config.php should look similar to this:

WordPress wp-config.php upload limit increased

Conclusion

By finishing this tutorial you have learned how to increase the maximum upload file size in WordPress, you will be able to upload bigger files from now on.

WordPress Upload Limit Increased

  • 5 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

Powered by WHMCompleteSolution