Empire CMS: Raising the Upload Limit on the morepic Image Gallery

I was building a special event page using the "flexible multi-image gallery plugin for Empire CMS" approach, and the morepic gallery needed a lot of photos — more than 300.

With the default configuration, the first upload finished, but saving threw an error: "The field 'image description' is empty. Please complete the required fields."

I tried switching the morepic field type to LONGTEXT. That didn't help either.

After asking around, the fix turned out to be adjusting the PHP configuration (php.ini) to lift the system-level limits:
PHP caps the number of files per upload and the request size by default, and if you leave those alone the upload will fail.

  1. Find php.ini: check the Loaded Configuration File path in phpinfo(), or edit it directly under the PHP settings in BT Panel.
  2. Change the parameters (these are sample values; adjust as needed):

    ParameterDefaultSuggestedNotes
    max_file_uploads20500Max files per form submission; must be at least your planned count
    post_max_size8M500MTotal POST request size; must cover the combined size of all images
    upload_max_filesize2M5MMax size per image; adjust as needed
    max_execution_time30300Script timeout; keeps large uploads from timing out
    memory_limit128M256MPHP memory limit; prevents out-of-memory errors
  3. Restart the service: restart PHP-FPM, Apache, or Nginx for the changes to take effect.

With those steps done, morepic handles 500+ images in a single upload without any trouble.

Leave a Comment

Comments No Comments

Table of Contents