
When you try running a script, plugin, or uploading large files to your website, you might encounter an error. One of the possible causes of this issue – the upload exceeds the default maximum file size configuration on your web server.
In this article, we will show you three easy ways to increase the size limit by modifying the PHP maximum upload size.
The default maximum upload file size may vary depending on your hosting provider, usually staying around 128MB. While this is typically enough for audio or picture files, you may encounter an error when uploading large files such as long videos.
If your site consists mainly of such content, you might want to increase the upload file size limit for more flexibility. On the other hand, you may wish to decrease the PHP max post size if you have limited storage.
There are several methods to modify your site’s maximum upload file size, and they may vary depending on your circumstances and preferences. Users can change PHP parameters by using the PHP configuration menu on their hosting control panel or manually modifying specific scripts that handle file uploads.
In most cases, you can change the PHP maximum file size limit by editing the php.ini file. If you are using a shared or cloud hosting plan, you’ll want to modify the .htaccess file instead.
NB: Clearing the cookies will log you out of previously- visited websites. Thus, we recommend saving your login information before following this method.
Below are three methods use to change by editing the PHP settings and adjust the upload file size limit.




Important: Note that the postMaxSize should always be larger than uploadMaxFilesize to avoid errors when uploading data.
Access your cPanel Dashboard and find Select PHP Version in the Software section. In this menu, users can change their PHP version, choose which extensions to activate, and change other PHP-related settings.




php_value upload_max_filesize XXM
php_value post_max_size XXM
NB: You can also edit .htaccess via an FTP client like FileZilla. If you can’t find the .htaccess file, configure your control panel or FTP client to display hidden files.
After changing the settings of your uploaded file size limits, we need to confirm them with the phpinfo() function to ensure they’re already implemented on the system. Simply create a new PHP file in the public_html directory of your site and insert the following PHP code:
phpinfo();
phpinfo();
You can name the file anything you want. In this example, we named it phpinfo.php. To access the file we just created, just add /phpinfo.php at the end of your site’s domain. It may look like this: http://yoursite.com/phpinfo.php.

You’ll see two columns — local value and master value. Local values are set within .htaccess and override the master values which are set within the php.ini file. Pay no attention to the master values and seek the local values for upload_max_filesize and post_max_size instead.
If the local values of both parameters are the same as you configured, you have successfully changed your website’s PHP file size limits.
By modifying PHP settings on your web server, you may no longer encounter errors during file upload processes. This method lets you submit larger files to the web server by increasing the default limit for uploads. Alternatively, you can decrease it to reserve storage space.
Credits: Hostinger Tutorials
Is this blog helpful?
0
0
Popular Posts
We're sorry what you were looking for. please try another way
Popular Categories
Tags

The process of getting a KE domain name has become much easier, simpler and faster than before. These domains are equally more affordable and come with fast configuration features. KE domain names are geographically advantageous for the country they feature, in this case, domain representing Kenya.Cheap .co.ke domains cost as little as Kshs. 900 annually and comes with free website development tools. It is interesting to r
Read Blog
To add an image signature to your RoundCube webmail client, available to all WordPress installations, follow the instructions and procedures outlines below. Access your cPanel details and log in. Under the Email section, click on Email Accounts. <p
Read Blog
The WordPress schedule posts tool helps one to regulate the content they output on their site. It can also help increase traffic as automatic publishing can be done during busy hours. This can be done using the default WordPress editors or a plugin. How to Schedule Posts Using the Editor in WordPress WordPress has a built-in scheduling tool in both the Gutenberg and Classic editor. Using the Gutenberg Editor to
Read Blog