On this Craft Cms lesson we prepare for git deployment and review utility updates.
It has been the best investment I made in my design journey so far. I would consider myself a novice but I honestly feel like I've gained a genuine professional insight into the process of creating a high-level website.
I'm an early adopter of the KreativePro Masterclass, and I love how well put together it is. Neftali takes you through each step of the process from paper sketches to marketing all with fun visuals & clear instructions!
All right guys, this is super exciting. We're almost ready to start pushing our local environment content over to our Fortrabbit server. Before we do that, we need to make a backup of all our data. Now we can do that in two ways. We can actually go and access our utilities section and pull a backup directly from there under database backup, or we can open up SQL pro and from here we can access our local environment database, which is the nitro craft database.
Simply by accessing that, we can export and that will be added to the desktop. The next thing I want to do is go ahead and open up tower. We're going to see that under the composer.jason, we're going to send this to the server so we can update that in Fortrabbit.
And we're just simply going to select to stage all of the files that we have updated. So all of these files are going to be updated and sent to our server. We can have pretty much everything we are adding in this push. Once we do that, we click commit and what that will do, it will add it to the queue under the master.
So you can see here, our initial commit that we created versus the one we're doing right now, click on the top button to push. We're going to push this to the master right here. We only have one option. And simply click push head, and that's going to compress all the information, send it at a commit log entry, and then start uploading everything to our Fortrabbit system.
Okay. So once that's done, all we have to do is open up our Sequel pro and we want to access our Fortrabbit server for the SQL. We've already added our information and for the SSH key, this is really important guys. You need to make sure you use the private key in this instance. So I'm going to select, this one as our private key, not the public key and just like that.
We should be able to connect. There we go. So now that we have access to the server, we can import and replace all of these fields, with the one we exported from our local environment. So I'm simply going to go over here to import, select the one on our desktop and then click open. That's going to replace all the entries and everything we worked on our local environment and it's pushing it out to the live server.
All right. So you also want to make sure you include the environment variables in your Fortrabbit document. So if you head over to your dashboard and access that ENV file, you'll be able to just paste that in here. Make sure you don't include the commented ones, this little hash won't let you save the document on the server one.
So make sure you only bring in the ones with the variables themselves, once you've clicked safe, we should be good. All right, guys. So once that's done, you should be able to just simply click on the preview button from the Fortrabbit and there we go. We have updated all our files and now we are actually on our production server.
We can see here this is different from our deploy. This is our local environment and everything looks to be working pretty well. Let's access to the admin, making sure that we have all our plugins installed correctly. There we go, yep it looks like it's good. And that's it. It's pretty much making sure that the database has all our entries.
Looks pretty good.
All right. So you can see here, we have found a small issue and it's related with the primary site URL, this variable, we did not include it in our documents. So this is something we need to add into our Fortrabbit server. So we go back in here and we want to make sure we have that right below the environment.
So just like that, we can add the primary site URL and this little URL is what we want to match with the new one, which is in this case, the Fortrabbit. So we just go ahead and change that here. Just like that, we click safe and, yep. That was it. It was just a matter of making sure you have variable inside the Fortrabbit documentation.
All right guys. And just to finalize, I want to just make sure I explain that you can actually go to the utility section and you'll notice you have access to the updates and every so often Craft and any plugin that you have installed will eventually have new updates coming out. So the cool thing about that is that Craft allows you to update them all at the same time and just a heads up ,make sure that when you do update, don't do this actually on the production server. You want to run those updates on your local environment first .
From here, you might want to do these updates to make sure that any issues that might occur you can handle before going live with the production server.
And the cool thing is, when you update from your local host environment and you let composer take care of all of the updating. So you can see here, how composers starts to update to change all these plugins to the latest version. From here what you want to do is do another push to the server and that way automatically Fortrabbit, anytime it receives a new commit, he will automatically install those on the new production server, which is really cool.
All right, so let's jump to the next lesson so we can connect our domain stream VR app to this production server and push our website live.
I'll see you soon.
Access our premium community including bonus tutorials, project files & weekly resources.UNLIMITED ACCCESS