You can increase the maximum file size allowed for uploads on a specific website by modifying the PHP configuration. This allows you to upload larger files, such as high-resolution images or large installers, to your website.
Before you begin
You will need:
A Hostek account with access to the hosting control panel.
The specific website's management interface (such as cPanel or Windows Control Panel).
The current file path or name of the script you are using to perform the upload.
Adjusting the PHP upload limit
The method for changing this limit depends on the operating system of your hosting environment.
For Linux-based servers (cPanel)
Log in to your hosting control panel.
Locate and open the Select PHP Version or MultiPHP INI Editor tool.
Select the specific domain or account you wish to modify.
Locate the
upload_max_filesizedirective.Change the value to your desired limit (e.g.,
64M,128M, or256M).Locate the
post_max_sizedirective.Set the
post_max_sizeto a value equal to or slightly larger than theupload_max_filesizevalue.Click Save or Apply.
For Windows-based servers (Windows Control Panel)
Log in to the Windows Control Panel.
Navigate to the PHP Settings section for the specific website.
Locate the
upload_max_filesizesetting.Enter your desired limit (e.g.,
128M).Locate the
post_max_sizesetting.Enter a value equal to or larger than the
upload_max_filesize.Click Save.
Confirm the result
To verify that the change has taken effect, you can use a PHP information page or a script to check the current limits.
Navigate to your website's information page (e.g.,
example.com/info.php).Locate the
upload_max_filesizeandpost_max_sizelines.Confirm that the values match the limits you entered in the control panel.
Limitations
The
post_max_sizemust always be greater than or equal to theupload_max_filesize. Ifpost_max_sizeis smaller thanupload_max_filesize, the upload will fail for any file exceeding thepost_max_sizelimit.Some web applications or CMS platforms (like WordPress) may have their own internal limits that can override the server's PHP settings. If the limit does not change in your application, check your application's specific configuration files.
