Showing results for 
Search instead for 
Did you mean: 

Problems with execution after installing Magento2 Open Source to localhost

Problems with execution after installing Magento2 Open Source to localhost


I have the installation of Magento2 Open Source on localhost Windows 10, version 2.4.6 (currently in composer installation)
made (XAMPP, OpenSearch, everything fresh/up to date), additions and process see below (*).

Unfortunately, access to the standard/admin (/admin_xyz was generated) is not possible. is only assigned to localhost (in hosts). delivers "404", delivers a start page with text, amaong other things "CMS homepage content goes here.", only completely unformatted.

In the console, "Laden fehlgeschlagen für" "",
"http://127.0.1/magento2/static/version1700649929/frontend/magento/luma/de/requirejsjs-config.js", etc.

The "static" directory is completely missing.

* Process of the installation:

Adjust PHP.ini settings at XAMPP:

Username=public key and password=private key are stored.

Loadmodule rewrite_Module modules/ activated

Find all Occurrences of *allowoverride none *and change to *allowoverride all *

C:\XAMPP\htdocs\OpenSearch\bin\OpenSearch.bat execute and let them actively (like autostart?)

C:\XAMPP\phpmyadmin\ Password set

Composer Create-Project-Repository-URL=https: // magento/project-community edition C:\XAMPP\htdocs\magento2

C:\XAMPP\htdocs\Magento2\Vendor\Magento\framework\view\element\template\file\validator.php, line 138:
$ realpath=$ this-> FileDriver-> Trealpath ($ path);
$ realpath=str_replace ('\\', '/', $ this-> filedriver-> TroLalpath ($ path));

C:\XAMPP\htdocs\Magento2\Vendor\Magento\framework\image\adapter\gd2.php, line 96:
if ($ url && iset ($ url ['scheme']) &&! In_array ($ url ['scheme'], $ allowed_schemes)) {
return false;
if ($ url && iset ($ url ['scheme']) &&! In_array ($ url ['scheme'], $ allowed_schemes) &&! File_exists ($ filename)) {
return false;

php bin/magento setup:install --base-url= --db-host=localhost --db-name=magento2 --db-user=root --db-password=adminxy --admin-firstname=admin --admin-lastname=admin --admin-user=admin --admin-password=adminxy --language=de_DE --currency=EUR --timezone=Europe/Berlin --use-rewrites=1 --search-engine=opensearch --opensearch-host= --opensearch-port=9200 --opensearch-index-prefix=magento --opensearch-timeout=15

php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Of course, searched intensively, but no solution, especially for the new version, was found.

Can someone help?

Thanks in advance!


Re: Problems with execution after installing Magento2 Open Source to localhost

404 Error:

Ensure that the Apache mod_rewrite module is enabled.

Check your virtual host configuration for Magento. The <Directory> section should have AllowOverride All to allow the use of .htaccess files.

Missing "static" Directory:

Run the following command from your Magento root directory to deploy static content:

php bin/magento setup:static-content:deploy -f

Make sure the web server has write permissions on the Magento directories.

OpenSearch Issues:

Ensure that OpenSearch is running and accessible at the specified host and port.

Check Magento's configuration to verify that the OpenSearch configuration matches the actual configuration.

JavaScript/CSS Loading Issues:

The paths in the error message seem incorrect. Verify that your Magento instance is set up correctly.

Check file and folder permissions in your Magento installation.

Database Connection:

Verify that the database details in your app/etc/env.php file are correct.

Code Adjustments:

Ensure that any code adjustments made in the Magento core files do not interfere with the proper functioning of the application.

Error in Composer Installation:

Make sure that the Composer installation completed without errors and that all dependencies were installed successfully.

Check Logs:

Review the Magento logs (var/log/system.log, var/log/exception.log, and others) for any error messages that might provide more insights.

Web Server Configuration:

Double-check the virtual host configuration, ensuring it points to the correct document root and allows overrides.

PHP Version Compatibility:

Verify that your PHP version is compatible with Magento 2.4.6.

After making adjustments, clear the cache and restart your web server. If the issues persist, reviewing the error logs and Magento's debug information may provide more specific details on the problems encountered during execution. I would strongly recommend considering a transition to a managed cloud hosting solution. This shift can bring several advantages, such as improved performance, scalability, and simplified maintenance.