How to allow uploading large files in octobercms?

by tressie.damore , in category: PHP CMS , 7 months ago

How to allow uploading large files in octobercms?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by ryan.murray , 6 months ago


To allow uploading large files in OctoberCMS, you can follow these steps:

  1. Update PHP settings: Locate your php.ini file. You can find its location by running php --ini in the terminal. Open the php.ini file in a text editor. Look for the following settings and update their values to the desired limits: upload_max_filesize = 20M post_max_size = 20M memory_limit = 128M Save and close the php.ini file.
  2. Update OctoberCMS settings: Open your OctoberCMS project and navigate to the config/cms.php file. Look for the 'maxFileSize' option and update its value to the desired limit. For example: 'maxFileSize' => 20971520, // 20MB in bytes Save the configuration file.
  3. Update Plugin settings (if necessary): If you have a specific plugin for file uploading (e.g., RainLab.Blog), check its configuration file for any upload size limits. Locate the plugin's configuration file (e.g., plugins/rainlab/blog/models/post/config_file.yaml). Look for settings related to file uploads and modify them accordingly, if needed. Save the configuration file.
  4. Restart your web server: Restart your web server to apply the changes to PHP settings.

After following these steps, your OctoberCMS installation should allow uploading large files.