Magento 2 – tips, tricks and notes

Apache and PHP settings which need changing for this to work.

Server Config

  • PHP will need the intl extension – php-intl.
  • PHP will need the dom extension – php-dom package.


  • max_execution_time: 30 seconds isn’t log enough in the admin interface which doesn’t have caching
  • max_input_time: this will mostly catch you out for image uploads
  • max_input_vars: Adding configurable products with many options will fail at the default of 1000 as magento doesn’t serialise large data sets
  • memory_limit: Again the admin interface will need more
  • post_max_size: Either scale down images first, or increase this to allow large uploads. Try to make memory_limit more than the post_max_size as while image uploads do not go directly into RAM, the image processing will generally need as much space as the uncompressed image you’ve just uploaded.
  • upload_max_filesize: aim for 50% bigger than the photos you will be uploading.

Other issues

  • Adding configurable products with images often fails –
    magento 2 processes images seperately for each virtual product it seems, so often fails to save a configurable product with many options and images.

Remember to restart the apache2 server after changing these settings. If you’re using php_fpm then you’ll need to restart that too.

Magento message translation

  • Please re-run Magento compile command
  • cd $magento_root && /$PHP_PATH/php bin/magento setup:di:compile