Categories
Magento 2

Install Magento 2 Using Composer in localhost XAMPP server

Install Magento 2 Using Composer in localhost. In this article I will guide to you how to install composer and how to install Magento 2 with Composer in localhost XAMPP server or web server.

At first we want to know about Magento 2 System Requirements? Here is the full checklist.

Step 1: Install Composer

After setup XAMPP server go htdocs directory E:\xampp\htdocs and Download and Run the Composer Windows Installer from here:
Download Composer

Check the installation using composer -V
Output: Composer version 1.10.1 2020-03-13 20:34:27

If you want to Composer setup on web server please please login into SSH terminal and run following commands to check and install composer. If nothing displays or you face any errors, please install Composer Download Composer

Step 2: Setup Virtual Hosts

Setup Virtual Hosts and create a url for run magento project. Open E:\xampp\apache\conf\extra\httpd-vhosts.conf add following lines for setup Virtual Hosts.

Step 3: Setup a URL

Setup URL on windows host file. Open C:\Windows\System32\drivers\etc\hosts add following lines for browse site via browser.

Step 4: Download Magento 2

Go to XAMPP server htdocs E:\xampp\htdocs directory via SSH terminal and Run the following command in the htdocs directory.

Note: I have define “magento23” is project install directory in Setup Virtual Hosts section.

Step 5: Create The Database

Create an empty database to work with MySQL in case you have already created so ignore database creating step and next step.

Step 6: Install Magento 2

Run the following lines in Command Line to install your Magento 2

Magento 2 console command setup:install install Magento 2 via Command Line. If this command run without error you can see like following image:

Install Magento 2 by command line

Please check your Magento 2 project admin amd database information in app\etc\env.php file backend and db section.

Now Magento 2 setup is done in XAMPP windows server. Now write http://magento2demo.com/ in your web browser and enjoy magento 2 project.

Exception: in module: ‘Magento_Backend’ block’s name: ‘require.js’

If we gitting Exception: Invalid template file: vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml in module: ‘Magento_Backend’ block’s name: ‘require.js’

Open file vendor\magento\framework\View\Element\Template\File\Validator.php line no 138.

change line 138 from

to

See more derails Here…

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Please LIKE and SHARE

Categories
Laravel

Laravel install in localhost XAMPP server

Laravel install in localhost XAMPP server, please execute following 7 steps.

1. Download XAMPP for Windows, Linux or OSX Installer from here:
Download XAMPP and make ready your local web server.

2. Go to localhost web root directory E:\xampp\htdocs
Create a new folder for your project like “laraveldemo”

3. Run Command Prompt for Windows
Go to project root directory E:\xampp\htdocs

4. Download and run the Composer Windows Installer from here:
Download Composer

Download Composer
Download Composer

5. Check the installation using composer -V
Output: Composer version 1.10.1 2020-03-13 20:34:27

6. If Composer is works fine, than go to install laravel using the following command.
composer create-project laravel/laravel laraveldemo
OR
composer create-project laravel/laravel laraveldemo –prefer-dist “laraveldemo” is your project directory.

laravel composer create-project

7. After complete install and create laravel project we need to create Local Development Server by artisan command. Go to project root directory E:\xampp\htdocs\laraveldemo and run artisan command php artisan serve

php artisan serve command

Browser your laravel project using http://127.0.0.1:8000 url on browser and enjoy!

Laravel demo project

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with me. Please LIKE and SHARE