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 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


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


Laravel – PHP Artisan console commands with Laravel Framework 7.3

Introduction to Artisan

Artisan is the console command line interface included with Laravel Framework. Artisan provides a number of helpful commands that can assist you while you build your Laravel application.

How to use commands?

To view list of available Artisan commands by following command.


Each command also includes a “help” screen which displays and describes the command’s available arguments and options. We can view a help screen the name of the command with help

Available Aartisan console commands with description.

Below some most common uses commands with details:


Every time when we run different commands on the Laravel application laravel framework generates automatic some cache files in bootstrap/cache folder. Those files are compiled.php and services.php. Both of them file keeps list of mostly used classes/services needed by your project configuration. This php artisan clear-compiled command removes all the files from cache folder.


To enable maintenance mode, we need to execute the down Artisan command: php artisan down Put the application into maintenance mode.


To disable maintenance mode, we need to execute the up Artisan command: php artisan up Bring the application out of maintenance mode.


Create Local Development Server by artisan serve command php artisan serve The serve command is used to run the application using the PHP development server. This command is generally used for development and testing purposes.


To generating migrations for database each table migration file name contains a timestamp which allows Laravel to determine the order of the migrations php artisan make:migration create_users_table migration file created on “database\migrations” directory. We can use the –path option when executing the make:migration command, If we would like to specify a custom output path for the generated migration.


Laravel artisan db:seed command is used to add records to a database automatically using a Seeder Illuminate\Database\Seeder class to generate or provide the records. For the db:seed defines three options: class, database and force. By default the db:seed command will use for the DatabaseSeeder class, this class is defines in the project root database/seeds/DatabaseSeeder.php file. Importance seeder commands are below.


The user auth:clear-resets command can be used to remove expired password reset tokens from the database.


Flush the application cache.
Remove an item from the cache.
Create a migration for the cache database table.
Create a cache file for faster configuration loading.
Remove the configuration cache file.
Discover and cache the application’s events and listeners.
Clear all cached events and listeners.
Generate the missing events and listeners based on regist.

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