How to install Magento 2.3 (from scratch) - Magento 2 Beginner Tutorials

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
for those of you who don't know me already my name is Craig host of digital start-up breaking down tricky tasks into simple steps so you can build a successful online store during this video tutorial I'll be showing you how to set up a web server from scratch and install Magento 2.3 the video will be split up into several chapters chapter 1 build a basic server chapter 2 converts to a web server for Magento 2.3 chapter 3 download Magento 2.3 with composer chapter 4 create a database for installing Magento 2.3 chapter 5 install Magento 2.3 via the setup wizard chapter 6 is a bonus chapter which is installing sample data you'll also find a link to an article in the description below the article is designed to help you follow along with the video at your own pace they'll also contain any commands that I use in the video so you can easily copy and paste them this means that you won't have to keep squinting at the screen to see what I'm typing to make it even easier each of these commands that you can copy and paste will also contain a timestamp next to it so that you know exactly at what point in the video I'm using them but before I start I just want to acknowledge that this tutorial is not for everyone the topics are aimed at nerds like myself who want to install Magento 2.3 from scratch however the tutorial has actually been designed for any skill level to follow if you're interested in using Magento but you would rather skip all the nerdy stuff then I would highly recommend the SOP 100 package from Nexus Nets they will build you a web server and install Magento 2.3 so you can just get straight to setting up the store and adding your products and if you ever run into any technical issues you can always get in touch with their 24/7 supports I've put a link in the description below in case you'd like to check it out so this video sounds like something that you might be interested in I'll see you in just a second as you can see I have split my screen into four sections we've got my web browser of choice in this case Google Chrome my SSH clients of choice which is for windows available at Paseo org a breakdown of chapters to help you quickly navigate through the video if you need to skip through it and finally my notes such as usernames and passwords that I'll need to remember during the set of an installation on a side note if you're working from an Apple or Linux operating system then you already have a built-in SSH clients called terminal unfortunately for Windows we don't have that built in so the go-to choice for us is putty so let's start building our web server so that we can install Magento 2.3 don't forget that you can follow along with me at your own pace by referring to the article that I wrote containing all of the commands that you're going to see me use first things first we need a web server personally I used digitalocean for all of my development servers the costs are reasonable and their services are spot-on you can literally create the server in minutes at the time of recording this I think I have eight servers running with them if you do decide to use them please consider using the link in the description below as it goes towards supporting their channel plus it will also entitle you to some free credits so be clear you don't have to use digitalocean but beware that results may vary with another provider and it's much easier to troubleshoot problems if we're all using the same setup so as you can see I want Digital oceans website now if you log in you're going to see a screen somewhat similar to this one obviously this is mines there's got my project name and a quarter of my servers for this project but what you're going to want to do is click the create button at the top right and you're going to want to hit droplets now droplets is digital oceans term for servers so to speak so just with in case you're using somebody else you're going to spin it it might not necessarily be called a droplet so I am going to go with the Ubuntu operating system now there is a version 16 and a version 18 now before doing this video I did some tests and doing it on 18 is it teeny we need a little bit more complicated if you're just starting out so I recommend going with version 16 as you'll have a much smoother experience and you'll be able to follow along with me step by step so I'm gonna set that to 16 0.04 now the minimum service size that I recommend is the $20.00 month one as it has the 4 gigs of RAM which is quite important for Magento to run efficiently if you go for the first here which is something I've done in the past sometimes when you run some commands the server will just stall because it hasn't got enough RAM to play with so like I said go with that one at the absolute minimum okay so I'm gonna skip these bits and pieces the data center that I want to use is going to be the one closest to me so my case the only one in my country is London so I'll be choosing that one and the reason for that is so that it minimizes the ping between me and the server and it basically just delays any lag when communicating and if we go to the bottom I'm just gonna call my server something so I'm gonna call this and D s for digital start up and then that's call it m23 V for this video and then hits create so as you can see it's building my server now in about 60 seconds to two minutes I'm going to get an email from digitalocean and it's going to contain the IP address for my server and it's going to contain my password as well so I'm just going to skip forward a minute or so wait for email and then I'll come straight back to you okay so I've just had my email and I'm all good to go you'll notice in the bottom right panel I have updated my notes where it has an IP now and a temporary root password now I try to go over this little window in a bit more detail you'll see there's like loads of names and passwords next to them that's because I know that during this installation setup I'm going to be asked a number of questions about usernames and passwords so I can preempt what I'm going to get asked and have those passwords ready now it's kind of good to have your passwords and usernames ready to go because having to think of passwords on the spot normally you end up doing stupid things like password one or whatever happens to be in front of you like a samsung phone or an nvidia monitor or something you end up doing things like that so to prepare in this way it's kind of good for security normally when I do these videos I tend to like to use the same password for everything because I delete the servers when I'm done doing this video so it doesn't matter but I'm just trying to create a good example for you so anyway that's all in there so we need to open putty Knox it for Windows I'm using putty anyway and it's going to look something like this when you open it for the first time what I'm going to need to do is put in the IP address of the server that I'd have just built so I'm going to put that in there I'm going to call it something so I'm going to call it DS - m23 V so that I can pick it from a list of bookmarks in the future but before I do anything else I'm gonna go over to the left and I'm gonna click on so look what is it connection there is now for a default setup it is set to zero change that to 60 the reason why I'm telling you this now is is more of a tip really if you are connected to a server using putty via SSH sometimes if you don't touch the keyboard for a while it'll kick you out this way it keeps the session alive by pinging the server and making sure that even if you step away for 20 minutes and then come back again that you'll still have a connection with the server which is kind of useful if you're waiting for some things to happen that take a long period of time so now that's there are we going to click back on session so then I'm going to save my settings so remember the settings that were saving is a bookmark called the s m23 V at the IP address and that connection changing from 0 to 60 so I'm going to hit save so as you can see it's been added to my bookmarks so if I double click on that now you're going to get a window come up and it says security alerts with their options of yes no or cancel you're gonna want to click yes so then you're gonna get a window very similar to this one so allow me a moment and one I come back I'm just going to enlarge in this text I'm gonna move the window to the bottom so that everything's nice and organized okay hopefully that's a bit more organized for you so let's log in as root which is the username it gave me in the email and then I'm gonna put in the password that it gave me the temporary password and hit enter to log in now if you've not used before SSH when it asks you for a password your little blinky green thing that you have here isn't going to move when you type and that's not because it's not recognizing you typing it's actually a security feature so that no one can kind of like look over your shoulder and guess how many characters there are so yeah so when I type things in you don't see anything that's absolutely normal okay so it's an Aspie for that password again that I just used to log in so I'm gonna put that in now and hit enter and then I'm gonna pop in a new password so rather than thinking of one up on the spot I'm just gonna get the one I prepared earlier so I'm gonna grab that now and put that in and one more time and there we go we're now logged in as a root so let me just tell you my notes of at the bottom right corner by deleting the routes temporary password line because we won't need that again there we go okay so we are now all logged in with a new password in place it's time to create a new super user that we're going to use instead of the routes user to carry out our administrative tasks this is a very common thing to do when building a new server as it adds to the security by minimizing any brute-force attacks plus as a super user you can't accidentally running routes tasks without first prefixing your command with sudo so let's create ourselves a new user I'm going to call mine Craig because it kind of makes sense so on a type in ads user Craig hit enter and now it's gonna ask me for a password that I want to use for this user so let me grab that password from the notes and put it in and then one more time and now I could put my details in here but I gonna keep pressing enter so enter enter enter and enter then I gotta put a why for yes this information is correct and I'm going to hit enter again so we're all good now we need to give this new user a super user privilege aka root this allows us as I said before to carry out administrative tasks so I'm going to do that by typing user mod as in user modification and then - a little a hey big G and then sudo and Craig which basically says do use modification add the this user Craig to the pseudo group so I'm gonna hit enter and that is now done all we're gonna do now is log out of our routes user and then we're going to log back in as Craig and make sure everything's all working I'm gonna carry on with the tutorial so to exit from this point you can simply use the little cross icon to close the window like you might know we do or you can simply type exit and that's logged me out so what I'm going to do now is reconnect to the server is gonna reach for my bookmark there hit load hit open and then what I'm going to do again is I'm just gonna tell you my screen up for you okay so everything's tidied up now that selects a login with the new user that we is created and I'll put my password in and there we go we are now logged in okay so now that we are logged in we're gonna want to change the ability to login directly as the routes user this will stop brute-force attacks happening to the obvious root username so I'm gonna start off by using the Nano text editor to edit a file and change the configuration to disallow that now let's start by typing sudo so I'm gonna say right let's carry out this supervisor command so and then I'm going to type nano so I want to use the nano tech so later and then I'm gonna want to open this file now remember you don't have to squint and copy everything that I'm doing on the screen you can use the article that I wrote to copy and paste the command that I'm typing and all the commands will be time stamped so you can see exactly when I'm typing them in on the video so that's config and then it's going to ask me for my password again because I'm carrying out a super user command there we go and I'm going to use a combination of the up and down keys on the keyboard as well as the page up and down keys to scroll down and find authentication there is and then I'm going to change permits root login press the Delete key three times and type no instead then I'm going to do ctrl + X to exits and it's going to ask me if I want to save my changes so I'm gonna press Y yes and hit enter and there we go my changes have now have been saved so to make those effects permanence we need to reload the SSH clients on the server for those changes to take effect so I'm going to do that by put it in a super user command again then system CTL reload SSH deep and I'm gonna hit enter now for those of you paying attention you notice that I didn't have to put my password in again where I did that super user command that's because I have used a super user commands very recently now if I went away for five minutes and I typed in pseudo again so in a command it's gonna ask me to put my password in again so I just thought I'd point that out okay so that was the easiest bits who disabled the root user now we go a Nabal a basic firewall on the server so in order to do that we're gonna use the super user command again and then we're going to say to the firewall so we want to allow SSH connections through it and again this is how we're currently connecting to the server so I'm going to press ENTER now and then I'm going to want those changes to take effect so we use the super user commands to enable the firewall and it's gonna say are you sure you want to do this I'm gonna say yes yes I do gonna hit enter there we go so now we have a very very basic firewall up and we're allowing SS allowing SSH connections to the server okay fantastic so just to quickly recap we've built a server and carried out some very simple security practices if this was your first time using SSH I hope it wasn't too intimidating for you in a moment so we're about to convert our server into a web server that will support a Magento - installation so if you want to pause and reflect on the tasks we've just done now is the time so now is the time to take our basic server and convert it into a web server that is capable of installing and running Magento 2.3 there are many commands commit in this video so pay very close attention to each step so the first thing we're going to want to do is update our repositories this tells a bun to what is available to download when we ask it to install something kind of like enabling your phone to access the App Store luckily our server comes with many repositories built in so we only need to add one this will allow us to download PHP 7.2 later in the chapter so let's start with that so again I'm gonna start my command with sudo doing the super user and I'm going to tell it to add to the repository and then I'm gonna tell it where to look and the command would look something like this so I'm gonna hit enter and then it's gonna ask me to confirm by hitting enter again and which I'm going to do now we valid it's valid this repository to operating system we just need to refresh our libraries on the operating system so we knew that with a super user command again and we're gonna use apt-get update and hit enter and it's gonna quickly update our repositories that we've gone there and then we should be done in just a moments there we go all done so now we have access to everything we need to install our programs so we install apache and configure it now specifically for Magento 2.3 Apache is the software that will ultimately convert our basic server into a web server so we're gonna start by installing Apache so let's do that with sudo apt-get install apache2 and then I'm gonna finish off with a - why now that little tag on the end says that if I prompted by the operating system to say are you sure you want to do this you sure you'll install that like it skips all those prompts because there will be a few of them so I'm just gonna hit enter to carry on with that you shouldn't take too long and what we're gonna do once this is done is update a configuration file so now we're done I'm gonna copy this command into the window cuz it's quite a long one so again this is a super user command we're gonna use the Nano text editor and we're gonna open this file in this location so now I'm gonna hit enter and we're gonna do is scroll to the very end of the document and then I'm gonna put this in again I can copy and paste this so let's leave another line there just to make things nice and clear there we go so we've put back and then we're gonna use control X again to exit our document hits Y to confirm our changes and hit enter all done so we also need to update another configuration file so again super user command no a text editor this document in this location hit enter for this one we're gonna scroll all the way down to the very end of the document again so I'll just gonna keep pressing page downs that come to the bottom and then I'm going to press ENTER again just to make it nice and clear to read and I'm gonna type in server name and then I'm going to use the IP address of our server so new 29.97 dots 1 3 4.30 and then again control X 2 exits why to say confirm save and hit enter okay so we've installed Apache and we've confited two documents so let's make sure we haven't type out anything we can do that by putting in a super user command and we're gonna do Apache CTL and we're gonna do a config test a configuration test and hit enter there we go we haven't typos anywhere syntax is okay so now we want to enable Apache rewrites which is very very important to Magento in fact in the past I've seen a lot of people miss this step and what you may have read or may have come across yourself is that which you finished installing Magento you end up getting a broken page where the styling or the images aren't loading correctly and the text is like showing in weird places that's because the rewrites aren't working properly so you know make sure that they are going to work properly by super using this command a to enable mod rewrites re loops writes there we go and then we need to restart Pachi for our changes to take effect so super user system CTL restarts Apache - oh yeah restarted now one of the last things we're going to want to do is enable Apache through that firewall that we did in Chapter 1 so let's do the super user firewall allow Apache o enter so as I said before Apache is the application or service that we use on the servers convert it from a basic server to a web server now we can very easily test this now to make sure it's working so we know the IP address of our server so if I put the IP address into my browser and hit enter we will see a test page to say this app at Apache is working correctly on your server so as you can see here it says it works so congratulations if you're following with me and you've done this great you just bill yourself a web server next we need to enhance our web server by installing PHP PHP is a scripting language which allows web applications like Magento to kind of supercharge normal HTML web pages it's a bit more complicated than that but needless to say it's a very important requirement for Magento so this next command I'm going to put in will install PHP and it's going to install a lot of extensions that PHP is going to need now there's going to be quite a long command because it's it's a series or a list of extensions that we're going to want so again you can copy and paste this one if you look at the beginning and end of this command now you'll see some familiar stuff you'll see super user command apt-get install and then a list well PHP and then a list of different extensions that were going to need followed by our - Y which is going to skip all of the confirmations of installing bits and pieces so now I'm gonna hit enter it shouldn't take too long so when it does finish doing what it needs to do that we're going to update a configuration file like we've done before using nano so let me just get that command ready there we go and we're gonna do super user nano editor to edit this file in this location I'm gonna hit enter now this one is a pretty simple one now these are different types of index files that can be read and this is a list in a list of priority so this says right if I happen to have a folder where there's different index files in place which one should take precedence over the rest now because Magento uses PHP and it is an index dot PHP that it uses we need to swap in index.html with index dot PHP pretty simple using my arrow keys I'm going to hover over HTML delete that replace it with PHP and then all the way over to the second instance and then we replace PHP with hasty now we know that when PHP is doing it sorry when Apache is doing its thing it's going to prioritize the index dot PHP files so let's exit that with control X hit Y hit Enter all done now let's make those changes take effect by doing sudo systemctl restarts Apache to there we go that was PHP installed along with all of the extensions luckily because everything was kind of like copied and pasted into one long command that we did just now so it's made this whole process so much more streamlines because that's where a lot of people can run into problems where they're installing magenta and magenta is like nope I can't install that because you're missing these files okay so now it's time to install MySQL MySQL is a database management system that allows the web server to store information that can be accessed by Magento so we're going to want to install a sudo apt-get install MySQL - server and then we'll pull that little white tag on the end and hit enter okay now we're getting a prompt about a password for MySQL so let's hit enter to put the password in luckily I preempted this so from my notes I'm going to copy a password and paste it in and then a second time there we go okay so now that is installs now we just want to run a security script so we're gonna do super user command MySQL underscore secure underscore installation and what this will do is run through a setup script as I said and it's going to prompt us with some questions and I'll tell you what those should be now so let's pick enter so let's pop in that password that we just had for our root user okay so first question validate password plug-in can be used to test passwords and improve the security shall we install that plug-in let's do it so now we have some options so we can go with low medium or strong passwords this basically says when you're trying to create passwords in the databases whether it allow you to put really basic ones in or not I tend to find that the medium was fine so in a pro type in 1 hit enter do I want to change my root password no I'm quite happy with the one that was set up just now's don't want to remove any anonymous users yes I do do I want to disallow log in remotely using root yes I do and do I want to remove a test but database yes and do I want to reload the privilege tables for my changes to take effect yes I do we've now got our web server to a points that is capable of running Magento 2.3 what we're doing now though is installing PHP myadmin this is not pay requirements but makes life so much easier when interacting with our MySQL databases it essentially allows us to log into a web page and make adjustments using our keyboard and mouse as opposed to using this black and white text screen that you see in front of you so let's just all phpMyAdmin so I'm gonna again I'm gonna copy and paste this command in you'll see the familiars of sudo apt-get install and then a list of programs we need to install and the little bash why attack at the end to skip all the prompts so the only problem that we're not going to skip is this one so in hit ok now it's going to ask me if it wants to reconfigure automatically whether it's gonna be Apache 2 or Lite PD now as you probably really notice we're using Apache 2 so to select this we're going to press spacebar which puts the little Asterix in to say this has now been selected and then I'm simply gonna press ENTER and then it's going to run through the installation we should gonna take a moment okay so now I've got another prompts if okay isn't already selected just press tab on your keyboard and then it will highlight it in that little red box to say it's selected and then hit enter and then I'm gonna hit enter again with yes selected and now it's gonna ask me for a password for PHP myadmin I'm just gonna stop the video right here for just a moment because I don't want you to fall into the same trap that I just fell into well I just had to spend five minutes just working out what the problem was and then anyway I don't want you to go through what I just went through so if you remember a few minutes ago we were running the MySQL secure script and it asked us it to make sure that whether we wanted our passwords to be low difficulty medium or high and I chose number one to go with medium so what I didn't think of before preparing this video was that the medium passwords needed to have a special character in and as you can see in the bottom right hand corner where my notes are none of my molesky or passwords have got special characters so because of this when I got to the screen that you see now where asked me for my password for PHP myadmin it allowed me to put in the password that I'd prepared for it however later on during the installation they actually aired out and said no it can't do this the password isn't strong enough so in order to get back to where I was I had to uninstall PHP my admin and reinstall it again so this is just a warning to make sure you don't go through that same issue that I just went with so I'd like to clarify with you what those requirements are so the password has to be greater than eight characters it has to contain numbers it has to contain both uppercase and lowercase letters and it also has to contain special characters so long as you meet all of those requirements and you put that password in at this stage then you won't go through the same error that I went with again I just thought I wanted to stop the video for a moment and just tell you about that okay I'll let you carry on with the video now so again I'm gonna grab that password that I already know I'd need from my notes I'm gonna paste it into this box and then paste it in one more time okay now that's installed we just need to restart Apache again so soubise command system CTL restarts Apache to cool now again like Apache we can test to see whether the installation of PHP was successful so so PHP Madden's success or someone open a tab and then IP address what was it again - oh nine nine seven one three four three oh and then slash PHP myadmin and hit enter and as you can see we've got PHP myadmin installed so let's login as the root user to make sure everything's fine again so root use their password in tego awesome that's the most difficult part out the way it actually gets easier from here on in so it's time to take a quick break get yourself coffee during that time I'd love for you to show your support by hitting the like button and don't forget to subscribe to the channel if you haven't already for more Magento 2 videos okay we're now at the point where we can think about installing Magento 2.3 just like the rest of this video so far you will want to pay very close attention it's especially important you run the commands as the correct user as you'll see issues further down the road that may not be obvious straight away so let's start by creating a Magento user the reason for creating a new user for added security the main user that we created in my case Craig has the ability to run super user commands if required where the web user would never need such privileges this user will also be who you log in as to upload and download your files via FTP so let's create this new user we're using the super user command to add a user and I'm going to call this user Magento can spell it correctly there we go keep Magento and I'm going to put a password in for me the Magento user so let's grab that again and then hit ten's enter Y and enter that's done now we're going to put this use there into the Apache grid so let's do that with super user command use a modification - little G www - data for Magento user there we go nice and simple we just created a Magento user and put it in the WW - data group so next we're going to look at file permissions when we install the patch II in Chapter two it's automatically created a web directory to store our web files however it will have created this under the default user known as the read W W - data so we just need to update the folder permissions for the directory that we'll be installing Magento this will have our our new Magento user to operate correctly without running into any permission issues so we do that by using the CPUs clan again and we're gonna type in yes I was right shown and Magento semicolon WWE data and then we're going to tell it which directory to do that to so we know about the web directory well I know that the web directory that Apache creates is VAR www HTML so I'm gonna put that in there so then we just quickly want for this command so the years that we created to do this was called Magento if you happen to call yours Bob for example then it would be sudo chown Bob or if you call it Jeff then it would be sudo chown Jeff so this this magenta here just reflects the name of the user that we created so now I'm going to answer and that's all done the next bit again super simple we just need to obtain our Magento access keys so before we do anything we need to head over to marketplace Magento calm which I have already done which is over here and you know what I created account or login so I already have an account so I'm just gonna click on my name and it go to my profile there we go and then I'm gonna click on access keys which is under my products which is under marketplace and here is a list of my existing access keys or where I can generate a new one so I'm gonna click on create a new access key and then I'm going to call this Magento 20.3 beyond the ends from I myself it's for this video oh no white spaces let me try that instead cool we can just put white spaces in the past okay so you can see that it's created a public key and it's created a private key for Magento 2.3 this is just a way of our server to be able to connect to a Magento account and it would use those credentials to validate who we are so that's it we've got keys that's nice and easy now we're going to install composure composure is an application that allows us to access and download package files from various repositories not only can we access and download Magento but many third-party developers will recommend installing their own extension of this way as opposed to traditionally downloading a zip file from their web site and uploading the file via FTP so I'm gonna copy and paste this command in so there we go so it's using the super user command and it'll be curled bash smallish largess and then the web sites and it's got a break a PHP the end this command is actually telling our web server to download this file via a website where it can be downloaded so you could put this website in now in your browser and download ZT desktop this is just saying write download this and put it into my onto my server so I'm going to press ENTER and there we go let's downloaded the file for me now in order to complete the installation for this composer all we need to do is move it so again I'm going to copy and paste this because it's a little bit quicker superuser command move the file that we currently just downloaded and then pop it into this folder and hit enter and that is composer installed pretty simple right now let's use composer to download Magento 2.3 so let's first navigate to our web directory so right now we're currently in our own personal directory kind of like my documents on Windows so what we're gonna use we're gonna change directory and we're gonna go over to var www HTML and hit enter so now we're currently working out of that directory before we do anything else we are going to want to switch users this is the important part where I said before that if we don't switch users it could cause complications further down the line so we're gonna do use the superuser command and then we need to do s user switch user and we're going to switch user to Magento there we go so now we are operating as if we were the what as the Magento user in order for composer to work correctly in these to be ran from within an empty directory otherwise it'll create an error however the web directory we're now sitting in isn't empty because well means saw the patch it created a test file in the web directory called index.html and affecting for us I think I still have that open there we go there's the file there so that file currently exists in our directory I know that because if i type LS - la and hit enter we can see that in this folder we have a file called index.html so oops let me delete that file so we did that via type in RM index.html hit enter am I sure yes I am and that's later so looking truck check it again by doing LS - it la hit enter and our file has now disappeared so let's start l composure to install the latest copy of Magento which happens to be 2.3 at the time of creating this video make sure that you don't miss the period at the end of this command this insignificant-looking Doc's house composer to install it in the same directory from where we're running the command missing the dark will cause Magento to install somewhere else so I'm gonna copy and paste that command in because again it's quite a long one so it's telling composure to create projects and then download the project from the repository and then as you remember that little dot we have on the end there that's telling it to install it here now if I press ENTER it's gonna ask us for a username and password and if I flick back over to my access keys on the Magento Marketplace I've got the public key which is actually the username I'm going to press copy and paste the Hin and hit enter and then scouts me for my password which is my private key so I'm going to copy that as well and paste that in as well and hit enter now this is the bit that it's probably going to take the longest amount of time when doing the setup so let me just press Y and unless I'm talking yes I do want to say those credentials so right now it's checking the repositories seeing what applications I need in order to run Magento from the projects and it's going to download them into the folder for us this as I said was going to say is gonna take the longest time where you'll be sitting and waiting so it's might be good for you to go and stretch your legs for five minutes what I'm going to do is I'm gonna fast-forward through all of this and then I'm gonna see you on the other side you should now see a screen similar to this where putty is waiting for our next command this is when we once take a moment to set the necessary farm missions in order for Magento to run correctly it's common to see an error 500 message when trying to access Magento and your browser before doing this so make sure you do not miss this step this next command looks like a long one in fact let me copy and paste this because it is so long there we go but it does in fact actually consist of four separate commands strung together in order to save a few steps and save some time so this set come out these four commands just check in our folder and file permissions to make sure that all correct and then it's going to make sure that one of the files that is very important for Magento to use is executable so with my command pasted in I'm just gonna hit enter this is gonna take like just a moment there we go and that is all done fantastic we're nearly there in fact we only have two chapters left and they're super super quick to do by the way if you're new to the digital startup Channel come and say hello in the digital startup forum you can share things you've learned ask questions if you get stuck or simply help others who may need your help I'm very active over there and it's much easier to have a conversation on the forum than it is on the YouTube comments I've dropped a link in the description if you'd like to say hi okay so this next chapter is super easy and super quick all going to do is log into phpMyAdmin and then we're gonna set up a user and a database so I've still got that tab open I think there we go let me just refresh the page to make sure I'm still logged in there are yeah I am cool so this is this is super super simple you've logged in as you root user into phpMyAdmin hopefully you've not lost your password so just head over and click user accounts and then click on add user accounts and then put in the username so I've got that ready in my notes so let me paste that in and then I'm going to change from any host to local and then I'm gonna paste my password in I've pre-prepared and then underneath that you're gonna see a box that says create date space with the same name and grant privileges and click that and then we scroll down on the bottom right you'll see go and click that and let's hope you'll see you have added a new user so if I just click back on localhost the top here that little link my apologies if you click user account sorry you're gonna see Magento master user and on the left you're gonna see Magento masters database which belongs to this user so again this is for Security's sake you would never use roots to install Magento this user only has access to this database and I don't I I'm gonna show you what it would see if it logs in so everything we see here are all the options and all the admin things we can do is the root user but if I log out and I used my new use that I just created and let me just log in as that user so from the perspective of the shoes that we just created we can't see who else has access to any of the databases and the only database that we can see is the Magento master database that we just created ok chapter 5 this is the point where we get to load up Magento in our web browser for the first time if for whatever reason you do see an error 500 message display when you try to load the page then go back and double check that you've completed the PHP sections and folder permission sections correctly as then normally the most obvious causes for that to happen okay so I'm gonna open a new tab in my browser and I'm gonna put the IP address into for the server to a nine nine seven one three four thirty and then slash setup and hit enter cool now you have that nice orange button in front of us so let's click that to proceed and let's do our readiness check now again this will make sure that all of our PHP extensions are set up and all our file permissions are all done so as you can see we've done everything spot-on let's click Next okay so this is where we put our database details in that we just created in PHP myadmin so the username was Magento tester and the database name was also called Magento sorry master and let me put the password in there we go I'm happy with that and I'm going to click Next and I'm also happy with this with the defaults and I'm going to click Next and then let's change this so I'm happy with GMT let's change this to GBP is it might change all the time on different systems British panels out there yeah there we go GBP and English to United Kingdom cool and I'm gonna hit next now it's gonna ask me for a username for the login details for Magento so let me pre-fill those that's my thing that's my thing in there and this should call my username Craig don't use your first name for your admin login because that's such an easy login name to guess pick something obvious but yeah and then click Next and then hit install now so again this is gonna take a minute maybe two minutes so I'm gonna fast forward this before you okay so that actually only took a minute so let's make sure that we can load our front end and our back-end successfully it's normal for everything to run slow at first the most regular issue you might come across is the pages not loading correctly anything from images and styling not loading on the front end and the back end we're resulting in a 404 in almost all of these cases this is down to a patch who rewrites not being enabled something that I mentioned to you back in Chapter two so let me load the front end and the back end so this is the front end loading now again like I said I did say it'll take a moment for everything to load so that's Magento loaded there's nothing to see obviously because there's no products or anything on the page and if we check the back end that's a back end of our Magento but before you get too excited and start playing with Magento we will want to increase our PHP memory limit by default Magento will be using 756 megabytes of your web service available memory this will commonly make Magento slow and results in errors so we head back down to our SSH window at the bottom we're going to use the Nano editor to editor a file called dot HT access now you'll notice that I didn't have to put sudor at the beginning of that and that's because I'm still logged in as the user called Magento and all of these files in the Magento folder belong to me so I don't have to use any super user commands to do anything because they all I can do whatever I want so anyway that's in place again I'm going to use their combination of the up and down keys and the page up and down keys to find a section of this file called that says memory underscore limits you're gonna see two instances the first one is going to be for PHP 5 which in fact can't be used anyway because we can only use PHP 7 so we'll ignore that bit and we'll keep going down and there we go we can see that bit that says if module is PHP 7 and there's the line that says in memory limit 756 M so I'm gonna press delete until all of those are on and then I put in two G to say use two gigs of my servers memory again this could go further than that depending on on your server so if you've got sixteen gig around free then go higher so let's control X to exit Y to confirm on a save and enter to actually save so now Magento is able to use a lot more of our RAM without that bottlenecking now finally we want to set up our cron tasks these are scheduled tasks that are required to run in the background they assist with tasks like indexing backups of dates and so forth luckily in Magento 2 three as opposed to previous versions this is now really simple to do all we need to do is type the bin / magenta space Kron : and install and hit enter and that's that so congratulations you just built a web server and installed magento 2.3 again if you ran into any problems along the way feel free to reach out for help either via the comments section below in the articles comments or on the digital startup forum you probably get the best answers on the forum because we can hold a good conversation there and then we can share screen prints if necessary as we've actually come this far I figured I'd throw in a bonus chapter show you how to install sample beta into Magento 2 this is useful if you've never used Magento before as it shows you what a standard setup looks like so it would actually be a shame to have spent all this time now building your web server and installing Magento just to fill it up with sample beta so I would recommend creating a backup of your installation or your web server by doing one of these two things okay so before we do any sort of backups let's throw our Magento's mode into developer mode magenta actually has three modes or designs who use optimal settings based on your current usage in developer mode you can access more tools and the backend of Magento than any other mode I'll cover these modes in a more in-depth video later on but in order to switch modes because currently we're in default mode we're gonna type in bin Magento deploy colon mode : set space developer and hit enter and then we'll get confirmation saying that we've enabled developer mode okay now I wouldn't developer mode we just need to delete or clear some of our cache so we didn't use that by doing our m-space RF and then we list the two directories that we want clearing so I'm gonna do that now now we're also going to clear the other caches so we use bin Magento C : C so that says cash clear it so there we go and now if I log in to Magento use my really bad username and then put the password in every time we clear the cache by the way you'll find Magento gets slower again for the first time you visit pages on both the front end and back in so go to stores configuration and then advanced system and then under backup settings you're going to want to change an able backup from no to a yes and then I'm going to leave scheduled backup off and hit save configuration now if I go to system and then backups I'm able to do a system backup a database and media backup or just a database backup as we want to just be updating sorry we just want to be backing up our database and media so let's call this backup name vanilla because is a clean install and we're not doing anything to it and I'm gonna hit OK and this is gonna take a moment just to update well there we go that's already done the bigger your store gets in terms of products images and data the the longer and longer this process is going to take so as I mentioned there's two ways of doing this backup there's this way and there is my other kind of like favorite way and other reason why I love digital ocean so much so let me go back to that tab now if I click on the server that we built earlier you'll see option called snapshots so if we click on that I can take a live snapshot of my server as it is now and I can do one of two things with that snapshot I can in fact let me get this going what I often talk over the top of it I can revert the whole server everything that I do not just the Magento bit back to this very instance when I clicked take live snapshot something else I can do is I can take this snapshot and I can create brand new servers or droplets based on this very instance so let's say for example I want to build another server after configuring it in the way that I've just done I can simply show create a new server and choose a snapshot instead of a droplet when I create it there's again another fantastic reason to use digitalocean it saves so much time and you can do as many of these snapshots as you want I think hardly cost anything I've got so many snapshots on the go what is it here it's five cents per gigabyte per month I mean my math isn't very good but I know a typical Magento installation depending on products could be anywhere between 20 or 30 gig so you'd be backing that up every month but there you go I mean looks a very fancy cool way of backing up your server so this is going to take about a minute two minutes so I'm just gonna fast-forward through this before doing anything else okay so that's like no time at all and it backed up three gig so the entirety of my server is three gig okay so let's jump back over to the window underneath Magento has a really useful command for installing all of the sample data from the Magento repository by a composer this step can normally take a couple of minutes to complete at times it may appear that nothing is happening but just give it some time again you may want to go stretch your legs during this process make yourself a drink but we're going to trigger their soft bites going to type in Magento sample data and then we use the colon and type in deploy and hit enter you may get here yes a you may get asked for your keys again so let me get those so I'm gonna put that in and my private key and yes only save the credentials and then it's gonna start doing its thing so again I'm gonna fast forward this and I'll see you back here in a second ok so it's been a couple of minutes now and putty is waiting for our next command all we need to tell Magento to do now is install the latest changes that we've just made so we can do that by typing bin slash Magento setup : : Tom Titan code on them upgrade and hit enter there we go all done so if we go to the front-end now and then we hit refresh we should see all of our sample data load on the page so that will be a home page that'll be menu item items products etc so there we go there's our demo store with our products on it and we got our whole menu set up and then if we click into a product now we will see it products and this is all using Magento's default theme called luma by the way so there we go now if I go over to catalog products as I've in the backend what we'll see is a list of all of the products now say the beauty of having sample data if you've never used Magento before is by seeing how all the settings have been used and how like different widgets have been implemented I've been kicked I again um one thing you're gonna wanna do a later stage when you get into Magento is change the admin login settings so the cookies don't keep cooking you out again there those are kind of settings I'll go over in another video I'll say if we go to catalog products at this load and we can see all of these products now so if I click into one we'll be able to see all the kind of like attributes that you can change you can even add new attributes but anyway we're stumbling into another videos with territory now thank you so much for sticking with me during this video tutorial I truly hope this video gave you the knowledge and confidence to try this out for yourself do let me know if you found this video useful by leaving a comment below and clicking that like button and don't forget to come visit over at the digital startup forum to share your experience ask for help or maybe even assist others so until next time take care before you go make sure you subscribe to the channel for more weekly videos and if you found this video useful please don't forget to hit like burn if you want to watch more great content you can try clicking on the video suggestion and until next time take care
Info
Channel: Digital Startup
Views: 85,283
Rating: undefined out of 5
Keywords: starting business, starting an online store, build an online store, how to, tutorial, ecommerce, Web Design (Interest), Web Development (Interest), web development, html, web developer, Magento 2, Magento beginner tutorials, How to create a server, Ubuntu Server, magento, magento tutorial for beginners, magento 2 beginners guide, magento 2 tutorial, magento tutorial, magento tutorials, magento guide, magento overview, learn magento 2, digitalstartup, magento2.3, magento 2.3
Id: whzgC8Lc6IA
Channel Id: undefined
Length: 64min 43sec (3883 seconds)
Published: Mon Dec 10 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.