Let’s build a Magento 2 store from scratch

Reading Time: 5 minutes
Share on Pinterest

In this series named “Let’s build a Magento 2 store”, I’m going to be creating an eCommerce Store using Magento 2 from scratch. And I’m going to tailor the store to selling cases for eyeglasses. This gives me a great set of options for creating variable and personalised products.

The project will consist of a few key stages. Firstly, I need to plan what products and variations I plan to sell on the website and how I want to categorise and market them. Because this is a fictional store, I’ll have to create a completely fictional database of information for the eyeglass cases that I wish to sell – And that will probably be something I do off-camera, but I will share what I have put together.

The next stage will include installing and configuring Magento 2 for my fictional business requirements. And the third key stage will involve setting up the store to provide my fictional customers with the best possible shopping experience.

A quick heads-up: It’s unlikely that I will put as much post-production into these videos (compared to my tutorials) just to cut down on the time it takes to get these videos up. Also, I’ll be trying to keep the videos in the series under the 20-minute mark (but we’ll see how that goes).

Newsletter Subscription

Let’s build a Magento 2 store: reference materials

Episode 1: The Plan!

So, I’m going to start off this first episode by telling you a little bit about my fictional business. I probably haven’t accounted for all of the questions that I’ll need to answer along the way, but I’ll give it a good go.

Knowing these details before even starting to build an online store is absolutely critical, as it lays a plan for the journey you need to take and helps you make decisions more effectively. I’ve lost count how many times I’ve spent a few days working on something only to change my mind and do something else because it didn’t quite fit in the bigger picture.

Episode 2: Setting up a web server

In this episode, I’ll be showing you how to set up a Magento 2 web server using a web host company called Nexcess. You can find a link to their services in the video description.

Checklist

  • Check Front/Backend of Magento 2 loads correctly
  • Whitelist IP to enable SSH/SFTP login
  • Update passwords
  • Forward domain nameservers
  • Replace default Magento 2 admin account

Episode 3: Configuration (Part 1)

In this episode, I’ll be going over some of the Store Configuration options to help initially setup our online store. Part 2 will be available next week.

Episode 4: Configuration (Part 2)

In this episode, I’ll be continuing with the initial Magento 2 Configuration of the online store and touch on the Terms and Conditions feature. Also, at the end of the video I’ll be going over the details for a giveaway. I’ve also added an additional link for the Business Logo downloads above.

Rules for the giveaway

  • Sign up to Digital Startup Newsletter to enter
  • Existing subscribers are automatically entered
  • Competition ends 4th May 2018
  • If prize not claimed within 3 weeks, the winner will be re-rolled
  • Your personal details will not be shared with anyone else and only used for the purpose of the Newsletter
  • YouTube Community Guidelines
  • Rules subject to change (in case I missed something at time of production)
    • Episode 5: Customers, TAX and Sitemap

      And in this episode, I’ll be revisiting Customer Configuration, XML Sitemap – As well as Tax Rules and Rates.

      Episode 6: Backing Up and Upgrading to 2.2.3

      And in todays episode, I’ll be backing up and upgrading to the latest version of Magento due to a recent release that came out a couple of weeks ago

      Episode 7: Shipping and Table Rates

      In todays episode, I’ll be checking through the Shipping Configurations and setting up the Magento Table Rates Shipping Method so that I can use variable delivery charges for my customers based on the value of their order and where they are having it delivered. Useful links from this episode include:

      • Official Magento Documentation on Table Rates
      • Table Rates Generator Tool
        • Episode 8: Attributes and Attribute Set

          In todays episode, I’ll be setting up the Attributes and Attribute Set within Magento. This information mostly comes from the preparation that I did for episode 1.

          Please, bare in mind that some things you see in this episode (e.g. CSV) have been changed in the next episode. So be sure to watch that too.

          Having looked back at this video, I just wanted to make a quick comment on Swatches. Setting “Use Product Image for Swatch if Possible = YES” in the “Color” attribute will override the swatches (that took ages creating) with the product image of the item. However, it’s still useful to create swatches incase you do list an item without an available image to represent the “color”.

          Episode 9: Importing Products and Images

          In todays episode, I took the CSV and Images from the preparation I did for episode 1 and imported it into Magento. Along the way, I realised I’d made some mistakes from a previous episode and highlighted what I did wrong and how I fixed them.

          Episode 10: Timeout! More about Importing, CSVs and Attributes

          In todays episode, I spend a bit more time revisiting the ideas and concepts behind Importing with a CSV Spreadsheet and Attributes within Magento.

          Episode 11: Payment Gateways

          In todays episode, I’ll be looking at how to integrate Paypal and Stripe into Magento 2. A big thanks for Magenest for providing me with a copy of their Stripe Payment and Subscription extension! You can find a growing collection of other Magento 2 Extension reviews here. Useful links from this episode include:

Comments

  1. nrsinga

    Hello Craig. Thanks for your videos and courses. I have a question. If I had an instance of Magento 2.1.5 with 3rd Part Plug ins, can I upgrade this to Magento 2.2.5 without any issues? I lot of products have been configured and also I am using the Absolute Theme on the old version. Would appreciate your feedback.

    Regards
    Naresh

    1. Craig Post author

      Hey nrsina. Great question.

      This is one of the reasons I try to keep my extensions down to a minimum. I always had issues with things like this when I used to work with Magento 1 stores back in the day. It’s not like upgrading a WordPress installation.

      I would be surprised if you didn’t come across an issue during your upgrade, to be honest. The changes from M2.1 to M2.2 were quite significant if I recall. Basically, you just need to prepare yourself so you can work on them.

      These are the steps I would take:
      1. Read all of the patch notes for your 3rd party extensions
      2. Read the patch notes for Magento 2.1 documentation
      3. Create a copy of your Production site in a Development environment
      4. Test your upgrades in the Development environment and make plenty of notes. Test the hell out of it. (Upgrade your 3rd party extensions first, then Magento).
      5. Once you’ve found and fixed all of your issues, you’ll be prepared to apply these changes in your Production environment.

      Just make sure you completely back your Production Environment before you make any changes. To be super-safe, you could upgrade your 3rdy party extensions one at a time over a period of days or weeks. This will allow you to work out the cause of an issue easier. Because if you upgrade everything at the same time, it’ll be hard to work out what caused the issue.

      I’d consider starting this sooner than later. The longer you leave it, the harder it gets. Especially with Magento 2.3 coming out later this year.

      Again, make sure you back everything up. It’s critical.

      I know it’s not what you wanted to hear, but I hope this helps in some way. Good luck!

      1. nrsinga

        Hello Craig. Thanks for the tips. Regarding the products can these be exported and imported easily and hassle free from 2.1.5 to 2,2,5?

        1. Craig Post author

          No problem. I’m pretty sure you’ll be fine with the import/export of data between versions. Just watch out for any specific product attributes that rely on 3rd party extensions. If you were simply upgrading Magento and didn’t have any 3rd party extensions then upgrade process “should be” flawless. It’s just upgrades in general that using 3rdy party plugins can sometimes cause an issue.

  2. GiftedFox

    Hi Craig, Great series
    I have just watched Video 2
    I have purchased a host with Jolt. they have installed Magento for me.
    I am using an iMac to access the server.
    After following this video I have installed Cyberduck and got the SFTP working.
    How do I get the SSH command line working using my Mac

    Andy

    1. Craig Post author

      Hi there. I have zero experience with using Mac software/devices. However, I believe Mac has something called “Terminal” installed by default as part of their OS.

      How you interact with a server via SSH is the same, regardless of the software you’re connecting from. With this in mind, try the following. Open “Terminal” and connect to your server using the following command: “ssh user@ipaddress” (e.g. “ssh craig@123.123.123.123“). Make sure you’re whitelisted (you’ll need to check with your web host for more information).

      1. GiftedFox

        Thanks Craig. That worked a treat.
        I had to use the -p switch to change the port from the standard 22
        but after that it worked great

        Thanks

  3. Bob_Wool

    Hi Craig, I’m enjoying your Magento 2 course immensely and, thank you for taking the time to create such an in depth knowledgeable course like this.

    Have you ever used Magmi and, if so, have you managed to get a copy installed and working successfully on M2 at all? I used it on M1 and found it a brilliant tool.

    Kind Regards Bob

    1. Craig Post author

      Hey, thanks for the positive comment.

      I tried Magmi on 1.7 back in the day, but never actually used it in a production environment in the end. I remember it being somewhat useful, but a bit intimidating to setup. If I remember correctly, the main purpose we thought about using it was to automate CSV imports every night. But instead we just developed our own API.

      I have no plans to use something like Magmi for future projects, especially as Magento 2 has made some decent improvements on its import system. Although, I understand most might benefit from add/updating huge lists of products.

      From what I’ve found, there is a version of Magmi that is compatible with Magento 2 but documentation is a little light (https://bit.ly/2jrGwo7). Also, one of the guys here in the community brought a product to my attention that might be useful to you. I’ve not tested/tried and I don’t know if it’s any good or not, but have a look at Store Manager for Magento (https://bit.ly/1M4JUgR).

      1. Bob_Wool

        Thanks for the insights Craig and, for the links. I will check them out and let you know how I get on. Do you then advocate the use of the new import system in Magento for mass product import or, do you feel it would be beneficial to use another mass importer?

        1. Craig Post author

          Great question. To be honest, I’ve never had to update more than ~2,000 products at a time. And Magento was more than capable of dealing with that. But I know some of you have 10s of thousands of products, which I have no experience with.

          I’m also aware that Magento doesn’t allow you to import some information (well at least not in Magento 1), which lead for the need for 3rd party services. All I can say, is that my experience with the Magento 2 import system has been much better than Magento 1.

          As a rule, I try to install as few extensions as possible. So if I can avoid using something then I will. But I’d love to know how you get on 🙂

  4. david

    HI Craig,

    Thanks for taking the time to create these videos, they are most helpful. I have finished watching up until the last video. When is the next one out?

    Also, how do we upload a theme, import products, set categories etc? I have an excel file with products, images, but don’t really know what to do with it, so any help on bulk upload would be helpful. This is my first ecommerce site and so there is a lot of stuff to get through.

    Best,
    David

    1. Craig Post author

      Hi David, thanks for reaching out.

      Last week, I was recording the latest episode on Thursday (I leave it quite late incase anyone has any last-minute questions they want me to address), but then I messed up to the point where I had to roll everything back and reshoot the lot 🙁

      So rather than stress about it, I just took advantage of the long bank holiday weekend for Easter because I was feeling a bit overwhelmed with all my work.

      So this week I’m aiming for a double-episode to make up for it. I’ll be covering; Adding Attributes, Setting up Attributes Sets, Uploading Images and Importarting Products (and assigning the uploaded images).

      Also, you should check your Theme Documents for installation instructions (but I’ll be covering this in a later episode anyway)

      Sorry for keeping you hanging…

      1. david

        Thanks Craig,

        Keep going, you are doing a fine job. Looking forward to your next episode.

      2. david

        Hi Craig,

        How can I contact you to ask more question, I don’t see your email address anywhere?

        Thanks,
        David

        1. Craig Post author

          There’s a few ways if you want to send me a private message. Twitter, Facebook Page or sign up to this website and send me a message using the inbuilt messaging system. Whichever option you chose, I’ll normally get back to you within a couple of days.

  5. darkicelee

    Hi Craig:

    I ‘ve got an issue for backing up the database by asking for the permissions, said You need more permissions to create a backup; by using chmod 777 -R for /var/ dictionary it can be fixed, but these could address security concerns, do you have any suggestions for best practise?

    Thank you!

    1. Craig Post author

      Hi darkicelee. You’re 100% correct about using 777. I suspect your issue is to do with the File Owner.

      Example 1: Say for example, all of your M2 files are www-data (owner) and www-data (group), if you try and run the backup command whilst logged under the username “bob”, then you would get that issue. Running the command as the user “www-data” would fix this.

      Example 2: You can also get the exact opposite. In this case, you’re M2 files are www-data (owner) and www-data (group)… But you’re running the command as “www-data” and still get this issue. Sometimes, you may find that you accidently ran a command as “root” once. This then causes the same error. A quick fix for this would be to reset all of your Folder/Files Ownership/Groups back to your chosen user (e.g. “www-data”).

      On a final note, if you setup your own crontabs, make sure they are being run as “www-data” and not “root”.

      Further Reading: http://devdocs.magento.com/guides/v2.2/install-gde/prereq/file-system-perms.html

      I hope this helps.

  6. jasper

    Hey Craig, thanks so far! just to be sure, did you really cover the store/configuration/customers section? because I’ve missed it…
    Looking forward to the new video…

    1. Craig Post author

      Damn… Did I miss that section? I’ll go back over my videos and cover it in the next episode. Thanks for letting me know!

  7. Kevin

    Craig – I was referred to your videos by my developer to hopefully grasp some basic setup of M2. I must say that I enjoy watching your videos. You are straightforward, and don’t go on and on. Looking forward to Part 2 of Configuration.

    1. Craig Post author

      Hey Kevin. I appreciated your positive feedback. I’m glad I’m able to help with your Magento project. I understand the platform can be quite daunting at first. A big thank you to your developer as well. I must be doing something right 🙂

      Don’t be afraid to ask any questions in the video comments if you need me to elaborate on anything. I haven’t gone super-detailed in this series because I didn’t want to drag out the videos.

      Thanks again!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.