Theme
Theme

WP upload max size is the maximum allowed size for a file to upload to your WordPress website. A file can be a theme, plugin, image, video, audio, document or any other kind of file. The default upload max size for WordPress is 2MB which is very low for any website. If you want to upload a file that exceeds 2MB, then it will be prudent for you to increase your maximum file upload size.

How to increase WP upload max size

The recommended WordPress maximum file upload size is 64MB.

a. functions.php

  1. Open your theme files and locate the functions.php file. You can contact your theme developer for assistance if required
  2. Locate the line that has; @ini_set(‘upload_max_size’ , ‘2M’);. If you can’t find that line, you can simply add it
  3. Change the upload max size from 2M to 64M
  4. Save the functions.php file then refresh your website
ALSO READ  How To Speed Up A Slow Mobile Data Connection

b. php.ini

  1. Locate the php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation. If you have access to cPanel, the go to File Manager > public_html
  2. Locate the .php.ini file under the public_html folder, right click on it and select the ‘Edit’ option
  3. Locate the line that has; upload_max_filesize = 2M. If you created your own php.ini file, ensure you add the line
  4. Change the upload max size from 2M to 64M
  5. Save the php.ini file then refresh your website

Note:

Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

c. .htaccess

  1. Locate the .htaccess file in the root directory of your WordPress installation. If you can’t find it then it might be hidden. Make sure to check your hidden files when locating it. If you have access to cPanel, the go to File Manager > public_html
  2. Locate the .htaccess file under the public_html folder, right click on it and select the ‘Edit’ option
  3. Locate the line that has; php_value upload_max_filesize 2M. If you can’t find that line, you can simply add it before the # END WordPress line
  4. Change the upload max size from 2M to 64M
  5. Save the .htaccess file then refresh your website
ALSO READ  TikTok Parent Company ByteDance Developing Its Own Smartphone

10 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here