Three Ways to Increase WordPress Maximum File Upload Size Ispis

  • 0

You must go into your hosting control panel and WordPress administrator dashboard in order to change the file upload size for WordPress. Before beginning the lesson below, make sure you have access to both of them.

Here are three methods to raise the maximum file upload size for WordPress:

 

1. Modifying .htaccess File

A lot of hosting companies let you modify the PHP settings using an.htaccess file. Utilizing this capability, you may apply the php value upload max filesize rule in this file.

Here is how this technique operates:

  1. By using a File Manager or FTP client, you may access the public html directory in the WordPress root. Users of Hostingli may go to the File Manager by going to the Files area of their cPanel dashboard.
  2. Add the following code at the bottom of the.htaccess file by opening it. Save the changes after you're finished.
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

 

2. Configuring php.ini File

Since shared hosting companies often do not permit altering the php.ini file, this solution is mainly appropriate for WordPress sites hosted on VPS servers. Whether you're using shared hosting, be sure to ask your hosting support staff if you may change the php.ini file before proceeding.

Here’s how to increase the maximum file upload size by configuring php.ini file:

upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300

 

3. Editing functions.php file

Alternately, you may raise the maximum file upload size for WordPress by altering the functions.php file for your theme. Nevertheless, if you alter the theme of your website, the update will return to its original state.

Here's how to edit the functions.php file to adjust the maximum file upload size:

  1. To use the theme editor, go to Appearance in your WordPress dashboard.
  2. Add the following code to the theme functions file (functions.php) by opening the file. Save the changes after you're finished.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

 

WordPress does enforce a maximum file upload size, but you may raise it. There are many methods to increase WordPress' maximum file upload size, as the lesson up above demonstrates. It is recommended to contact your hosting company and ask them to change it for you if these solutions don't work for you.


Je li Vam ovaj odgovor pomogao?

« Nazad