Hey, what's up guys? This is Joy from Cordillera Technologies, Bangalore. In this video, we'll be showing how you can install and configure Magento. So, but before we get our hands down and dirty in Magento, first we're going to need a couple of tools to get started.
So the first tool is we need a server which is which has PHP and MySQL configured along with it. So since I'm on a Mac system I'm using this tool called MAMP. If you're on a Windows system, I would recommend XAMPP. And for Linux users, you always have the LAMP stack. Or if you're on NGINX and all, it's not LAMP, it's the LEMP stack. And then for NGINX lovers and all you have the LEMP stack as well. So that's that. After you have installed... so I have already installed the MAMP software on my system and it's up and running. So after you have your server ready, the next thing we need is a tool
Using Composer for Dependency Management
called Composer. So what Composer is, is that if I go to the Composer's website, it says right here that it's a dependency manager for PHP. So what that means is it allows you to manage all your extensions, all your add-ons which the project uses, and it helps you manage the project as a whole.
So the problem with downloading and just unzipping Magento in your directory like how we did in Magento 1 is that it becomes very, very difficult to actually manage or update the versions, or even more difficult if you're actually using a ton of different extensions and then you need to update those extensions. So manually doing it is a very tedious task. So this Composer comes to our rescue and we are surely going to be using this tool to actually install and, I mean, download and install Magento.
So after you have that installed, so I already have my Composer installed in my system. If I type composer, you can see that it shows up here. So after you have your composer ready, the next thing is we're going to be actually installing Magento.
Downloading Magento with a Composer Command
So let me just open this up real quick. So this is a list of, you can say it's a cheat sheet of the important commands which you would need to execute during your Magento development or installation process. I'm going to be leaving these commands here as well so that you also have a cheat sheet where you can copy and paste instead of searching here and there.
So this is the first command for downloading Magento. I'm just going to copy that and then I'm going to go inside my MAMP project directory, which in my case is applications/MAMP/htdocs. And here I'm going to... Okay, I already have created a directory called magento2. I'm going to go inside that and here I'm going to execute the command. So instead of this 2.2.7, you can have 2.2.6 or you can have 2.3.0 depending on which version you want to install. So since 2.3 is not that stable yet, so we're going to be working with 2.2.7 for now. And then we just press Enter.
Authenticating with Magento Marketplace Access Keys
So it's going to ask for the username and password here. So that you can get from by logging into the Magento Marketplace. So if we go there, and after you sign in, you go to My Profile and here, in under Access Keys, you're going to get the actual username and password. So you're just going to copy those and paste it here and then the installation should start.
So as you can see here, I have put in my credentials and it started installing Magento project Community Edition 2.2.7. So this might take some time depending on your internet speed and things like that, the server's performance at the time. So it should not take more than five minutes or so on average. So I'm just going to forward this video to the time when it's actually installed. So as you can see the download is complete. It downloaded a couple of modules which are required from Magento. And now if I list out the files of the directory, you can see all the files which are required for Magento to run are downloaded.
Starting the Web-Based Installer
So next thing is actually installing the system. So for that we have two different ways to do it. One is we can actually go to our command line and type this command. So we have to change the base URL, the database name, username, password, etc, etc. And that would install the Magento system. But the easier way to do this, which we're going to do right now, is we're going to go to the directory where we installed and we are greeted with this installer.
So one more thing which I think you guys should know is don't try to use localhost here. Instead of localhost, always opt for 127.0.0.1 when you are doing your local development because there are known issues with localhost. The cookies are not set properly. Because of that, the 'add to cart' doesn't work sometimes. So always go for this and you're good to go. Alright, so now we click on Agree and Setup Magento.
Step-by-Step Web Installer Configuration
Start the readiness check. Wow, everything's good to go. Click on next. I give my username and password and I've already created a database for Magento 2. So you can name it whatever database you have created, and then Next. Let's change this to something simpler like admin or, let's say, demo-admin. Next.
So all of these things we don't need to change. We can just click Next because the default timezone, the local currency, the language, all of these things can be changed later as well after the installation is complete. So I'm just gonna leave it as they are. I'm gonna click Next.
Creating an Admin User and Finalizing Installation
And I'm going to have to create a user. So I created a... admin is the username, Joy's the... The password is, let's give something. Alright. Next and Install. So that would start the installation process. This would also take some time, but it won't take as much time as Composer to download the files. So let's just wait for some time. You can see here we are installing the database schema and installing the deployment configuration. So the installation should start at any point now. So now we are actually installing the modules which are required.
Verifying the Installation: Frontend & Backend
Alright, so you can see that it's success. We have created a username and we have created our store. So this is our store URL and this is the back end for our store URL. We go there. The homepage is opening. It's opening... it's taking a little too much time to open. Let's check the back end till then. The back end itself is also loading.
Alright, so we have our home page here. This is the Luma theme which Magento comes with. So this theme is installed by default. You can put your own themes and also I'm going to show you those in the next videos, how to install your own theme, how to make your own theme, things like that. And also we have the backend loading as well. Alright, so let's use the username and password which we had created and see if it logs in. Alright, so we have our admin panel already here and we have our home page ready here. So we have successfully installed Magento.
Recommended IDE and Conclusion
So in the next video... so I'm going to try to make this as a series of videos so that you can follow along and you can go through the ride with me and you can start developing on Magento. So this video was a very basic video and it just showed you how to install and configure Magento.
As a bonus, I'm going to show you the IDE which I prefer and which Magento, most of the Magento developers prefer, which is PHPStorm. So if you can... it's not free but you will get a free trial. So if you need a very good IDE which will actually improve your development time, I think PHPStorm is the best there is. So I'll just open my project which is inside... So this PHPStorm is what I use and what I would recommend you guys use as well to do your development on Magento.
So this video was... I mean, that concludes this video. So if you have any ideas for the next videos, what the next video should be, if you have any doubts which you want cleared, please leave me a comment on the comment section below. And please like and subscribe this video so that I can continue making more. So thank you, that's all. Bye bye.