Skip to content

Website & Server Help

Unlimited Webspace Help

Menu
  • Home
  • Apps
  • Website
    • Sending email from a WordPress website hosted on an IONOS server
    • How to increase Upload Max Filesize
    • How to reset a WordPress password
    • 22 Ways To Speed-Up A Plesk Website
  • Server
    • Linux or Plesk Server Error 500
    • Windows Server: File cannot be loaded. The file is not digitally signed.
    • Adding or modifying IP addresses on a Linux server
    • Installing Remote Desktop on Debian 12
    • Installing Remote Desktop on Ubuntu 22.04
    • How To Install a Let’s Encrypt SSL in Apache on Debian/Ubuntu
  • Favs
    • How to Connect to a Server
    • The Ultimate Guide to Setting Up a Proper Plesk Email Server With IONOS
    • The Ultimate IONOS Migration Guide
    • Help! My Plesk Websites Are Down!
    • Running tests for a slow server or dropped packets
    • Checking File System and Hard Drive Health
Menu

How to increase Upload Max Filesize

Posted on January 18, 2023January 27, 2023 by admin

Are you having issues uploading large files? Do you receive an error about exceeding a maximum upload file size? Are you trying to increase the upload max filesize for a WordPress website, or PHP website?

The best way to increase the PHP Upload Max Filesize is by creating or editing a PHP.ini file in the directory. This may include the root directory of the website, as well as /wp-admin, or others depending on your website’s configuration.

  1. Create or edit php.ini file inside of applicable directories.
  2. Add the following lines:
    upload_max_filesize=128M;
    post_max_size=130M;
    memory_limit=256M;
    max_execution_time=300;
    max_input_time=300;

upload_max_filesize is the maximum size of file you want to allow to be uploaded on your website (through scripts/forms, this does not affect FTP uploads).
post_max_size will include other data about the file transfer and server-client communication, so should always be larger than upload_max_filesize.
memory_limit should be larger than post_max_size.
max_execution_time and max_input_time are in seconds, and indicated how long a script/process can run (ie, uploading script).

Note: If you also plan on uploading a lot of files at once, it may be required to also specify or increase the max_input_vars:

max_input_vars=1000;

Special Offer

The internet's fastest, cheapest, unlimited bandwidth VPS

VPS
1core | 1GB RAM | 10GB NVMe
Unlimited Bandwidth | 1Gbps
$2/month - risk free