With the latest Git Hub push, Magento 2 can now be downloaded and installed completely using Composer! Composer is used to manage the dependency. We will update alternate step by step guide to install Magento 2 on Windows on XAMPP server with GIT with problems if you face and solutions for those problems.
Review the system configuration.
Mod rewrite must be enabled and Apache version 2.2 or 2.4 for the server to be able to rewrite URLs.
PHP: version 5.4.x with x=11 or later 5.5.x and
The following PHP extensions should be enabled: PDO/MySQL, mbstring, mcrypt, mhash, simplexml, curl, gd2, or both soap. You might need to download some PHP DLLs like php imagick.dll, php mcrypt.dll, and php mhash.dll because XAMPP doesn’t have them all loaded.
Versions of MySQL 5.6 and later
- Get the Git GUI application.
- Install normally on your Windows OS.
- Once installed, the screen below will appear.
- To clone an existing repository, click.
- Put Source Location here
- Your XAMPP htdocs will be the Target Directory; it will look like this.
- Let the process run its course.
- When you’re done, the Target Directory will contain the Magento 2 clone files. Files are similar to
- Install Composer for Windows.
- Copy Composer-Setup.exe after downloading it, then paste it in the root of the Magento2 files. See the screenshot up top.
- At php.ini, add xdebug.max nesting level=50000.
- Open the Command Prompt as an administrator.
- Navigate to the Magento 2 directory using XAMPP’s htdocs.
- Execute this command.
1composer install
- The process will begin.
- After finishing, you ought to see this display.
- If you want to set up Magento using test data. There are three ways to do it.
a. Method 1
Activate the test data. In the root of the Magento2 files, locate the composer.json file. Launch it, then add.
1“minimum-stability”: “alpha” - Run the following command now.
1composer config repositories.magento composer http://packages.magento.com
- Start composer by saying need magento/sample-data:1.0.0-beta
- Await the procedure’ conclusion.
- Installing the sample data itself would be the last step. Run the Magento 2 executable located in the bin folder by following these instructions:
123php magento setup:upgradephp magento sampledata:install <your Magento administrator user name>
b. Method 2
1. Locate composer.json in Magento’s root directory.
2. If the file has a “repositories” section, look for it and add the following block. Whenever possible, add the entire block.3. Composer.json file should be saved.
4. Access the Magento installation directory in Command Prompt.
Run an order1composer update5. Complete the installation procedures.
C. Method 3
1. To incorporate the new Sample Data repository, locate the composer.json file. if you don’t want to alter this file directly. You carry out the subsequent command to finish this task:
1composer config repositories.magento composer http://packages.magento.com2. Add the sample data and sample data media packages by running the command below.
1composer require magento/sample–data:0.42.0.beta1 magento/sample–data–media:0.42.0–beta1 –dev3.Use the following command to install the sample data.
1php dev/tools/Magento/Tools/SampleData/install.php –admin_username=adminHere, the username is admin; replace it with your own.
Be patient; the process can take some time. Interrupting might corrupt or crash Magento. - Go to the following address right now in your browser: http://localhost/magento2.Hopefully, you can view this screen.
- Select Agree and install Magento, then select Next.
- It will begin the Readiness Check, which includes checking the PHP version, PHP settings, PHP extensions, and File Permissions.
- If all works well, you should see the screen below. Choose Next.
- The database settings are configured on the following screen.
- Web page setup.
- If you already downloaded sample data, the choice will be visible on this screen. Select the default time zone, then select Next.
- Set up the administrator account.
- Once you click Next, the Ready Install button will appear; click it to continue with the procedure.
- Visit the frontend and backend after installation to check out the brand-new Magento 2.0.
Problems I faced
First time error
Problem: Your system does not include the necessary PHP extension, ext-intl *.
Solution: Enable uncomment in php.ini.
If you cannot use the token and encounter an error like
Could not get https://api.github.com/repos/module. Please generate a Github QAuth token to request more data than is permitted by the API rate limit.
Solution:
Visit the link in your browser that is listed after “Head to” and log in to Github using your password. Then choose Generate Token. Get the token, copy it, and then paste it into the appropriate SSH field (hidden). The process will continue.
Magento 2 was successfully installed, but CSS and JS were missing.
Getting “NetworkError 404 Not Found – path of Css or JS” errors.
Solution 1:
You get 404 responses probably because you don’t have mod_rewrite
enabled.
Solution 2:
Perhaps the pub/static subdirectory is to blame. For these static materials, there is a “cache” mechanism. Every time Magento requests a resource from pub/static, the request is changed to../static.php?resource=resource name here if the file does not exist.
Activate this command,
1
2
|
php bin/magento setup:static–content:deploy
|
Each module’s static resources will be copied by the command to the pub/static subdirectory. Be patient since this procedure will take some time. Therefore, don’t forget to use the above command every time you make a modification to a module’s static content to see the results.
Conclusion
All the above information is the data about A Complete Guide install Magento 2 on Windows on XAMPP server with GIT, hope you will have a useful experience with the information we have provided. If you are having difficulty in this experience, you can connect with Onextdigital, which will help you to troubleshoot any difficulties and questions.
Additionally, Onextdigital is the company to turn to if you require website advancement and employment growth for your e-commerce venture. We also offer economical Shopify Development, Bigcommerce Development, and Magento Development services along with a team of knowledgeable specialists and developers who cooperate closely with designers.
>Read Also