2 Things Must Do When Deploying Wordpress on Docker | Installation of Wordpress on Portainer/Docker

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we're gonna install WordPress on Docker so here I'm using a protein a tool called pertainer which is a container management tool for Docker so you can use Dockery you don't have to have this pertain a tool but for me it's just convenient to have this container tool to install any thing that I want on my Docker so let's begin so logging into you I'm going to log into my protainer and then here I'll show you all the stacks that I've already installed so there are a few ways to install um WordPress on potainer or Docker but then I'm going to install you I'm going to show you the quickest ways to install it so go to app templates and here you will see all these predefined um compose files to install any of these applications that is listed on Docker Hubble that's available anything that is available for Docker anyway so I'm gonna just search for WordPress and then just click on WordPress and all you have to do is set give it a name and it could be anything and also just set up a database password and and then click on deploy the stack it will take literally a couple of seconds to you know deploy the whole WordPress website on your Docker server so now you can see in my containers list I have staging site staging database and WordPress installed and on right hand side you can also see the port it is running on um so if you click on that port it will open up the website you know the recent installed um WordPress site and now here you are this is this this is the starting window of press where you um it can play the installation process of Wordpress so select the language that you we need to use on WordPress and then click on continue give you aside my name could be anything when it's right side staging a username to log it into the site password could be anything and enter your email address where you want to hold this configuration information to be sent to and then click on install WordPress so you can switch in the complete now you can log in and browse your website and start working on it [Music] so here's your dashboard you can see everything's good if you click on a visit above the site this is your first website running on your docker you can already see how fast it is you can quick quickly switch Through the Windows very efficiently without any problem right this is a benefit of having a WordPress installed on local server on Docker it's very quick the very first thing you need to do once you when you install a WordPress on on Docker is set up a port you can always say it's running on well Docker automatically picked up at the sport 4918. and we can make the support permanently um defined in this in its compass and compose file [Music] but before I do that let me tell you why we need to change or permanently Define this port if I stop my containers or whole stack if I just stop it um both database and WordPress site now you can see it's convenience stopped so now I will restart it you will see a change so the changes it picked up a new Port when I restarted it so and if I try to open that website on that New Port it won't open uh it would say refuse to connect let's try again I'm gonna shut it down again both database and WordPress site I'm gonna stop it and then restart it you can see the port is changed again if I try to open using that New Port it won't open and it will try to go back to its original Port which is 4958 if you remember it was the first time we deployed a new website a WordPress website on Docker it it was installed on Port 49158 so every time if we every time now you if you try to restart your container it will get it it will fetch a new I New Port but it won't show you anything and it will try to redirect to the Old Port in order to fix this click on stacks and go to go to editor and here you have your combo compose file and all you have to do is just add the port 4958 or original Port which was allocated to your container add that port and just click scroll up scroll down click on update the stack and that's it and now you can click on that porn here you go your website is back on so from now on every time doesn't matter how many times you restart or kill that process your website will be always be running on this port and an old you know show up there won't be any stupid orders so that's next chain that you must do when you install um WordPress on Docker is change upload size because once you your WordPress site isn't running of course you need to upload data and you you by default the max the maximum float size float file sizes to mbn and I'm pretty sure this is not enough you need to you know probably need to import data which is probably higher than 100 MB or even 500 MB right so you definitely need to change this default limit and I'm going to show you how to do that first thing first you need to log in into your server where Docker is installed so I would say use putty or CMD to SSH into your um server so in my case it's installed on this IP and the username is lab so I'm going to enter my password and I am logged it oh sorry let me let me retry so yeah so now I'm logged into my server now I need to go to directory where my WordPress is installed so in order to find the the um the folder or directory WordPress is installed all you have to do is go back to your container click on stacks and um your stack that I installed and click on your WordPress website scroll down and then scroll down and you will see um four limbs so this is where your WordPress is installed if you click on that volume it will give you the whole path where you hold Mount path where the WordPress install so copy paste copy that Mount path and then go back to your terminal [Music] type CD and paste that path that you just copied oh my gosh permission denied because I'm not logged in as a super user so if you type sudo as you and enter your password it will now let you go to the directory now to see the content of that directory row all the files and folder that kind of just type LL and you can see everything that directory has but what we are most most interested in is this file called dot htt.st access so if you type Nano and the name of that file which is dot htt.st access you should be able to um edit that file and once that file is open we need to add this um add these values that I'm highlighting into the into the command prompt so you can just copy and paste it I already have it done so that's why you see them but I'm going to just do it again just so you can see what's going on um so you can change this value according to what you like um I changed to one gig because that's what I saw that I might need him the max file upload I will be the max the maximum size of the file I'll be building is one gig so so in order to save that file click or control and x and then type y and then just hit enter and it will save the whole file just to double check just um just hit Nano dot stx's again just to make sure that what you just typed into the file is saved so now if you go back to your container and make sure your stack is running if you have to restart it restart it and then go to your WordPress website and then you would see that your maximum plot size have changed
Info
Channel: Amritium
Views: 3,523
Rating: undefined out of 5
Keywords: amritium, wordpress, docker, portainer, CMD, canada, sikh
Id: wZ9heYfe5Tw
Channel Id: undefined
Length: 11min 0sec (660 seconds)
Published: Sun Dec 25 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.