Skip to main content

How to Create a Magento 2 website with sample data

To install Magento 2, we need the newest tools to run that application. Make sure your web-server has the following stuff installed:
  • ·        PHP 5.5 or higher
  • ·        MySQL 5.6 or higher
  • ·        Apache 2.2 or higher
  • ·        Command line access
  • ·        Composer

We can install Magento 2 in different ways. we will install Magento 2 using
Composer. The advantage of this is that we can use GIT to add version control to our custom development.




1.We will install Magento 2 with Composer. For this, we need authentication keys.With an account on the magento.com site, go to Developers | Secure keys in the My Account section. On this page, you can generate public and private keys that will be your username and password in the next step.

2. To install Magento 2 with composer, we have to run the following command:

composer create-project --repository-url=https://repo.magento.com
magento/project-community-edition <installation_dir>.

3. You will be prompted for a username and password. The username is the public key and the password is the private key that we generated in the previous step. When the command has run, the installation directory will have the following structure:

app
bin
CHANGELOG.md
composer.json
composer.lock
CONTRIBUTING.md
CONTRIBUTOR_LICENSE_AGREEMENT.html
COPYING.txt
dev
.gitignore
Gruntfile.js
.htaccess
.htaccess.sample
index.php
lib
LICENSE_AFL.txt
LICENSE.txt
nginx.conf.sample
package.json
.php_cs
php.ini.sample
pub
README.md
setup
.travis.yml
update
var
vendor

Tip:-
Check that the user and group of these files are the same as your Apache user. One recommendation is to execute all the commands as your Apache user.

4. We have installed the codebase with composer. Now we can run the installation
wizard. Open your browser and enter the URL of your site. You should see the
following welcome screen:

5. Hit the Agree and Setup Magento button and start the environment check.

6. Click on Next and enter your database information as follows:

Database Server Host: The hostname or IP address of the database server
Database Server Username: The username of the database account
Database Server Password: The password for the account
Database Name: The name of the database
Table Prefix: Optionally, you can give a prefix for each table

7. Go to the next step and check if the right information is filled for the URL part. In the advanced section, you can optionally configure HTTPS, apache rewrites, and your encryption key. For our test environment, we can leave these settings as they are configured.

Note:-
Make sure that the mod_rewrite option is enabled for the apache server. When not
enabled, the URL rewrites will not work correctly.

8. In the next step, you can configure your time zone, currency, and default language.

9. In the last step, you can configure your administration account. After clicking on the Next button, you are ready to install. Click on the Install Now button and the
installer will start. This will take some time because the installer will add the sample data during the installation. You can open the Console Log to see what is currently happening.

10. When the installer is ready, you will see the following success message:

11. Run the following commands in your Magento installation directory to configure the sample data:

php bin/magento sampledata:deploy
composer update
php bin/magento setup:upgrade

12. The preceding commands will download and install the sample data packages.Because they contain a lot of images, this could take some time. The setup:upgrade command will install the sample data, and this also takes some time.

13. The installation of the webshop is now complete. You now have an up-and-running Magento 2 webshop. When you navigate to the category Gear | Bags, you should see something like in the following screenshot:



Comments

Popular posts from this blog

How to add bootstrap css to Magento 2 theme | Magento Developer's Diary

what I need to do is to include bootstrap to my theme (currently i'm working on luma theme) to customized it in my own requirement . later on I will use blank theme.let's start May be this is wrong way to do but I do this way. Comments are welcomed to correct me. Preconditions: 1. Magento 2.2.0 installed with sample data (luma & blank theme)  Expected Layout:  Result:  add my css to file My_Magento2_folder(m2)/pub/media/style.css .half-web{ padding:0; margin:5px 0px; width:100%; height:359px; background-color:#ccc; display:block; } .full-web{ padding:0; margin:5px 0px; width:100%; height:200px; background-color:#bec894; display:block; } .container { padding-right: 5px; padding-left: 5px; margin-right: auto; margin-left: auto; } .row { margin-right: -5px; margin-left: -5px; } .col-xs-1, .col-sm-1, .col-md-1, { position: static; min-height: 1px; padding-right: 5px; padding-left: 5px; } and html design on homepage block in backend ...

How to remove subscriber box and footer links from footer in Magento 2

Preconditions: I installed Magento 2 with sample data used luma theme for customised right now . Now I'm trying to remove Footer subscriber form  in mycustom theme which I created before.  As I tried to remove it from layout by m2\vendor\magento\theme-frontend-luma\Magento_Theme\layout\default.xml Just need to copy paste      <referenceBlock name="form.subscribe" remove="true" /> if you want to remove footer then you remove block like this.       <referenceBlock name="footer_links" remove="true" /> in above file file  m2\vendor\magento\theme-frontend-luma\Magento_Theme\layout\default.xml default.xml file used to change layout of page if file doesn't exist then you can create your own file <?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:noNamespaceSchemaLocation="../../../../...

How to Create New theme in Magento 2.x with Sample Data Like Luma Theme

As previously I added bootstrap css file to luma theme . Now I tried to create new theme use blank theme instead of luma theme THIS IS MY WAY TO LEARN : 1. HOW TO DO IT = > HOW IT'S WORK This is first part of my journey how to do it. 1. Create theme directory Firstly,I created folders in m2(my magento 2 folder)/app/design/frontend/Lalit (vendor/namespace) app/design/frontend/                                              ├── <Vendor>/ │   │   ├──…<theme>/ │   │   │   ├── … │   │   │   ├── … compare to this structure I created folder like this  app/design/frontend/ ├── Lalit/ │   │   ├──…MyTheme/ │   │   │   ├── … │   │   │   ├── … 2.   Declare theme/  Create the theme...