Solution

Don’t install sample data in production mode. Switch to developer mode and clear some var directories and try again.

Enter the following commands in the order shown as the Adobe Commerce file system owner:

cd <magento_root>
bin/magento deploy:mode:set developer
rm -rf generated/code/* generated/metadata/*
bin/magento sampledata:deploy

Symptom (security)

During installation of optional sample data, a message similar to the following displays:

PHP Fatal error: Call to undefined method Magento\Catalog\Model\Resource\Product\Interceptor::getWriteConnection() in /var/www/magento2/app/code/Magento/SampleData/Module/Catalog/Setup/Product/Gallery.php on line 144

Solution

During sample data installation, disable SELinux using a resource such as:

Symptom (develop branch)

Other errors display, such as:

[Magento\Setup\SampleDataException] Error during sample data installation: Class Magento\Sales\Model\Service\OrderFactory does not exist

Solution

There are known issues with using sample data with the Adobe Commerce develop branch. Use the master branch instead. You can switch to the master branch as follows:

cd <magento_root>
git checkout master
git pull origin master

Symptom (max_execution_time)

The installation stops before the sample data installation finishes. An example follows:

(more)

Module 'Magento_CustomerSampleData':
Installing data...

Sample data installation does not finish.

This error occurs when the maximum configured execution time of your PHP scripts is exceeded. Because sample data can take a long time to load, you can increase the value during your installation.

Solution

As a user with root privileges, modify php.ini to increase the value of max_execution_time to 600 or more. (600 seconds is 10 minutes. You can increase the value to whatever you want.) You should change max_execution_time back to its previous value after the installation is successful.

If you’re not sure where php.ini is located, enter the following command:

php --ini

The value of Loaded Configuration File is the php.ini you must modify.

NOTE
We are aware that this article may still contain industry-standard software terms that some may find racist, sexist, or oppressive and which may make the reader feel hurt, traumatized, or unwelcome. Adobe is working to remove these terms from our code, documentation, and user experiences.
Previous pageExceptions during installation
Next pageDuring installation, fatal PDO error displays

Commerce


Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth

Online | Strategy Keynote | General Audience

B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more