Recently I tried to install Magento 2 with sample data and failed. I added the proper package to the composer.json file and when I run composer update it always fails just before finishing downloading:

  - Installing magento/sample-data-media (0.42.0-beta1)
    Downloading: 90%
Fatal error: Out of memory (allocated 652738560) (tried to allocate 556269568 by
tes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/
RemoteFilesystem.php on line 175

I set memory_limit in my php.ini file to 2048MB but it didn't help. I checked in command line that it is set correctly:

c:\WT-NMP\WWW\magento_2>php -r "echo ini_get('memory_limit');"
c:\WT-NMP\WWW\magento_2>php -r "$a = []; while(true) { $a[] = 'a'; }"

Fatal error: Out of memory (allocated 2019033088) (tried to allocate 24 bytes) i
n Command line code on line 1

Does anyone know what the problem might be? Or maybe you know some hacky way to install sample data without Composer?

  • This is not exactly linked to Magento but to PHP. I advise you to use a VM for the installation process since it will make things easier. Later today I will publish an article with a step by step on how to achieve this based on github.com/rgranadino/mage2_vagrant. – mbalparda Dec 23 '14 at 15:15

We apologize for the issues. There have been recent problems with sample data that are now resolved.

We just published updates to the procedure. There are two ways to do it:

Install sample data before installing Magento: http://bit.ly/1FIHnVO

Install sample data after installing Magento: http://bit.ly/1HSALaY

Please let us know if you have questions or issues.

|improve this answer|||||
  • I am trying to follow those instructions but there is no sampledata:install task for bin/magento script – Zefiryn Oct 16 '15 at 11:19
  • The procedure has recently changed. If you clone the Magento 2 CE GitHub repo and the Magento 2 sample data repo, you can install sample data using the Magento develop branch. Try this: devdocs.magento.com/guides/v2.0/install-gde/install/web/… – Steve Johnson Oct 20 '15 at 10:41

I get the same issue. Plus, the download via composer of the sample data takes 2 eternities until it crashes.
Here is what I did.
Download the sample data from here and unzip what you donwload in dev/tools/Magento/Tools/SampleData/.
Then download the media images for the sample data from here and unzip what you download to pub/media.
Then, when installing Magento 2, the "Install sample data" checkbox will be enabled.
But be patient. Installing the sample data will take a while.

|improve this answer|||||
  • Both links are broken. Any replacements? I ran into the same problem.. – Timothy Oct 11 '16 at 9:35
  • links broken still? – Jonathan Marzullo Jan 12 '17 at 18:13
  • yeah. apparently the links changed. I have no idea to which ones. – Marius Jan 12 '17 at 22:24

Update your memory_limit! If this setting is too low then you’ll get some unusual problems with your install like freezing at 2% or 96% with no error messages. You can change this globally in WHM or just add the following line to the very top of

public_html or htdocs/index.php:


Also set this same line at the top of dev/tools/Magento/Tools/SampleData/install.php


I actually set mine to 4096M to be safe.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.