📺 Develpreneur YouTube Episode

Video + transcript

WordPress on Docker - Part 3

2022-02-08 •Youtube

Detailed Notes

This series is a short set of tutorials on setting up a docker instance to run and develop your Wordpress installation.

Transcript Text
[Music]
we want the all-in-one
wordpress migration go install it
we'll activate it
all right it's now live we now have the
all-in-one wordpress migration option
here so it's going to import
we're going to import from file now
before we do this step there's something
i want to point out
the default maximum uploads file size
for wordpress is 2 megabytes this is not
going to work for most wordpress site
import connector
so we need to quickly update this file
so the first thing we want to do is we
want to go back out to our command line
and we want to view
our wordpress
and the first thing i want to do is i
want to come down to the bottom here
this
notes speed things up so we'll go down
to the end of our file
insert
and paste in our new settings
so we want to increase the upload max
size flag
to 128 megs
our post max size 128 our memory limit
256
max execution time 300 and max input
time of 300.
save that
and then we also
not always but it's also good to
add the same configuration to your ht
access because depending upon the site
that you're uh importing
it may or may not read the configuration
files from the config file they may be
hard coded in the h
ht access
so you come in here
or in between the begin wordpress and in
wordpress
we'll paste in these values so again
same kind of values
upload next file post
memory limit
and execution time
save that
and if we give it just a second
refresh
there we go real time there our max
upload size just jumped to 128 meg so
unlike virtual machines where you have
to actually go start stop with
containers if you set it up to restart
on config file changes the moment you
save the file boom the site is
automatically
updated next we'll import from file
right here
i have my watch consulting image
that i did on july 3rd
if i open that guy it will import it
fairly small image but it does take a
second or two to load
see
so it's kind of your last
warning before it overwrites your
database and you lose the current
configuration you have
that's still pranking it will come back
over here and go to our sql tab
so once this is finished depending upon
what plugin tool you use to import and
export your site you may still have to
do one additional step
and that will be to update your live url
links to your localhost
so what you'll need to do is you'll need
to update
you'll come out here
refresh your connection
and then you'll want to run these three
queries
so you'll want to run your update
wordpress options
wordpress post and post meta
and you're going to want to replace the
option
or wordpress option the option value
of your live site
with localhost my localhost site
and do the same thing for post content
and metavalue
just
database selected oh yeah
we'll reconnect there
okay they ran and as you can see no rows
were affected that's because the tool i
used actually updated those for me
that's one another reason why using the
all in one tool is really good
all right so we need to log in
and now
our login is not wordpress wordpress
this is going to be the actual login for
your site
right and we're getting a connection
refused error if we actually look at the
details
um
there's been too many redirects or
something going on
so i run it ran into this a couple
different times so the easiest way to
fix this problem
is first
we want to go in
to our configuration
go back into our wordpress configuration
file and at the bottom of our file
add one additional
settings change here
and let's define our wordpress home to
be our localhost 12002 and our wordpress
site url to also be localhost 12002.
the other thing you need to do
is you need to come in here and go to
your wordpress content folder
and
look for the plugins folder here
and then we want to run the command
move
plugins
and just essentially rename the folder
to plugins disabled
check that
plugin is disabled so we have now
disabled our plugins
back out to our site
go back to our container
and
wordpress click
and there's my site my last consulting
we're now live
but we're live on localhost
and because i disabled my plugins and i
added that redirect we now have access
to all of my content
so essentially i've now ported my logic
consulting
to my local website or to my local
machine or development
and now i can make changes i can come in
here and re-enable plugins as i need to
and just try them out
so we are kind of constrained on time
now so i won't go into the
extra piece that i had they'll probably
take another 10-15 minutes but what i
will do is i'll record that as kind of a
bonus section uh that i'll upload with
the
uh blog post when i post it out there
and into vimeo once we get it up there
and it's essentially we'll walk you
through how to export
the containers that we just built here
uh export this entire container set with
the volume
so that you can uh essentially either
save this as a template and reuse this
container image again and again
or take that whole container with the
image volume and then upload it to
another uh container system via
kubernetes to be a docker or amazon
website
so again we
needed to make sure that we had the
doctor community edition installed we
had to have dr desktop docker compose
and we installed the three services
mysql php admin in wordpress
anyone have any questions before we wrap
up
michael i just wanted to to get you to
talk a little bit about
a containerization
with the
prevalence of so many cloud technologies
and one of the things that
i have to be cognizant of at least i've
been challenged to be cognizant of is um
you know that if a business decides to
move from aws to google
um
will our with our code port
um you know we're using more lambda
functions which are you know of course
just the java that runs but of course
we're using the hooks or the interfaces
that aws provides meaning our code won't
port
can you talk a little bit about why
containerization
doesn't face that challenge
i can but that's actually a very a
longer discussion um
let's
let's table that and let me think on
that a little bit
i think that's actually a presentation
in and of itself that that's that we
have not touched on actually in previous
uh container uh presentations that we
have but that's a very good one to talk
about so let me actually give that one
um
let me
actually do a presentation on that and
give it a good
um
kind of walk through on that because
that's just something that i really
think just a quick one two minute answer
it's not going to be sufficient
yeah that's one of those uh you know we
way back we talked about the value for
value kind of idea of contributing to
the the greater good or cause and that
is a perfect question for that as soon
as you asked i was thinking the same
thing it's like oh that's like that's a
i think it'd be a very useful
presentation would actually be to look
at
uh vms and containers and maybe even and
we've we've touched on it but i don't
think we've really
had something we've really looked at
comparing a little bit container
technologies as well there's some
different things there that
um
i think that's a that is an excellent
um presentation topic maybe
may go beyond two presentations but yeah
i agree that's
that's a really good question timothy
and we definitely will bookmark it and
come back around to it one way or
another
awesome thank you
and that might actually be one at the
end if you're you know if that really
helps answer your question maybe you
could kind of do a short presentation
and kind of like lessons learned or what
you kind of like real world
here's what i'm working on or here's
what we're dealing with kind of deal
yeah awesome
i'd love that um i'll tell you a little
bit
one of the challenges i've already seen
is that you know we want to host um an
angular site
um
in uh aws well there's the straight um
you know upload your static site to s3
and host it that way
but i found the ability to
containerize our our angular app and
deploy it anywhere that
that seems just the best options that is
just a really small use case but
more to the larger point it would be
nice to have a presentation certainly
can provide some
input on that certainly
yeah no definitely and i
think like i said i think what even rob
said i think this will be a multiple
part discussion because really that then
starts getting into things like spring
boot um and some like
neutral container
standardization that you can use so that
you can port to different things like
that like aws
it's a good point yes sir
any other questions
with that thank you guys i appreciate
your time and if you'd love to discuss
any of these topic furthers you can send
questions comments and suggestions to
any of these methods
you can reach us on email at info
developer.com you can find us on the web
at developernerd.com
contact us we're also on youtube which
you can read this wonderful url or just
google us on youtube at developmenter
and youtube or you can reach us on
vimeo.com developernerd our goal is
making every developer better have a
wonderful day
[Music]
you
Transcript Segments
0.48

[Music]

28.72

we want the all-in-one

30.96

wordpress migration go install it

44.16

we'll activate it

47.039

all right it's now live we now have the

49.28

all-in-one wordpress migration option

51.28

here so it's going to import

54.8

we're going to import from file now

57.12

before we do this step there's something

59.52

i want to point out

60.96

the default maximum uploads file size

63.92

for wordpress is 2 megabytes this is not

66.799

going to work for most wordpress site

70.72

import connector

72.24

so we need to quickly update this file

75.28

so the first thing we want to do is we

77.52

want to go back out to our command line

79.92

and we want to view

81.759

our wordpress

94.64

and the first thing i want to do is i

96.799

want to come down to the bottom here

99.68

this

104.96

notes speed things up so we'll go down

106.96

to the end of our file

111.28

insert

116.159

and paste in our new settings

118.96

so we want to increase the upload max

121.04

size flag

122.479

to 128 megs

125.119

our post max size 128 our memory limit

129.039

256

130.56

max execution time 300 and max input

133.599

time of 300.

136.8

save that

138.319

and then we also

140.239

not always but it's also good to

143.599

add the same configuration to your ht

145.92

access because depending upon the site

148.319

that you're uh importing

151.36

it may or may not read the configuration

153.92

files from the config file they may be

156

hard coded in the h

158.08

ht access

159.599

so you come in here

161.2

or in between the begin wordpress and in

163.36

wordpress

164.959

we'll paste in these values so again

167.44

same kind of values

169.12

upload next file post

173.519

memory limit

176.879

and execution time

180.959

save that

183.04

and if we give it just a second

190.48

refresh

191.92

there we go real time there our max

194.239

upload size just jumped to 128 meg so

198.08

unlike virtual machines where you have

200.159

to actually go start stop with

202.319

containers if you set it up to restart

205.04

on config file changes the moment you

207.36

save the file boom the site is

209.68

automatically

210.84

updated next we'll import from file

216.319

right here

217.519

i have my watch consulting image

220.72

that i did on july 3rd

223.04

if i open that guy it will import it

228.799

fairly small image but it does take a

231.12

second or two to load

260.72

see

261.759

so it's kind of your last

264.4

warning before it overwrites your

266.08

database and you lose the current

268.32

configuration you have

300.8

that's still pranking it will come back

302.72

over here and go to our sql tab

307.199

so once this is finished depending upon

310.32

what plugin tool you use to import and

312.8

export your site you may still have to

314.72

do one additional step

317.199

and that will be to update your live url

320.96

links to your localhost

323.44

so what you'll need to do is you'll need

325.28

to update

332.479

you'll come out here

334.88

refresh your connection

337.199

and then you'll want to run these three

339.039

queries

340

so you'll want to run your update

342.16

wordpress options

344.56

wordpress post and post meta

348

and you're going to want to replace the

350

option

351.199

or wordpress option the option value

354

of your live site

356.24

with localhost my localhost site

361.44

and do the same thing for post content

364.319

and metavalue

367.52

just

370.24

database selected oh yeah

377.52

we'll reconnect there

387.28

okay they ran and as you can see no rows

389.919

were affected that's because the tool i

392.56

used actually updated those for me

395.36

that's one another reason why using the

397.52

all in one tool is really good

401.6

all right so we need to log in

403.6

and now

404.72

our login is not wordpress wordpress

407.28

this is going to be the actual login for

410.479

your site

418.72

right and we're getting a connection

421.199

refused error if we actually look at the

423.84

details

425.199

um

427.199

there's been too many redirects or

429.36

something going on

431.199

so i run it ran into this a couple

433.12

different times so the easiest way to

435.919

fix this problem

438.24

is first

439.84

we want to go in

441.68

to our configuration

445.84

go back into our wordpress configuration

448

file and at the bottom of our file

451.68

add one additional

454.72

settings change here

458.639

and let's define our wordpress home to

461.039

be our localhost 12002 and our wordpress

464.879

site url to also be localhost 12002.

471.12

the other thing you need to do

473.68

is you need to come in here and go to

476

your wordpress content folder

487.12

and

488.319

look for the plugins folder here

493.36

and then we want to run the command

495.919

move

496.72

plugins

498.24

and just essentially rename the folder

500.319

to plugins disabled

505.44

check that

507.36

plugin is disabled so we have now

509.36

disabled our plugins

514.32

back out to our site

523.2

go back to our container

526.48

and

527.519

wordpress click

530.56

and there's my site my last consulting

532.88

we're now live

535.279

but we're live on localhost

541.68

and because i disabled my plugins and i

544.399

added that redirect we now have access

546.959

to all of my content

548.88

so essentially i've now ported my logic

551.2

consulting

552.32

to my local website or to my local

555.36

machine or development

559.44

and now i can make changes i can come in

561.6

here and re-enable plugins as i need to

566.399

and just try them out

569.12

so we are kind of constrained on time

571.76

now so i won't go into the

574.959

extra piece that i had they'll probably

576.72

take another 10-15 minutes but what i

579.04

will do is i'll record that as kind of a

580.959

bonus section uh that i'll upload with

583.68

the

584.959

uh blog post when i post it out there

587.44

and into vimeo once we get it up there

590.24

and it's essentially we'll walk you

591.839

through how to export

593.6

the containers that we just built here

598.48

uh export this entire container set with

601.36

the volume

602.56

so that you can uh essentially either

605.12

save this as a template and reuse this

607.839

container image again and again

610.16

or take that whole container with the

612.56

image volume and then upload it to

614.48

another uh container system via

616.839

kubernetes to be a docker or amazon

619.68

website

635.519

so again we

637.2

needed to make sure that we had the

638.399

doctor community edition installed we

640.88

had to have dr desktop docker compose

644.079

and we installed the three services

645.76

mysql php admin in wordpress

650.16

anyone have any questions before we wrap

652.16

up

654.72

michael i just wanted to to get you to

656.959

talk a little bit about

658.56

a containerization

660.56

with the

662.399

prevalence of so many cloud technologies

665.12

and one of the things that

667.279

i have to be cognizant of at least i've

669.44

been challenged to be cognizant of is um

672.88

you know that if a business decides to

675.6

move from aws to google

677.92

um

678.8

will our with our code port

681.44

um you know we're using more lambda

683.839

functions which are you know of course

686.079

just the java that runs but of course

688.48

we're using the hooks or the interfaces

692.16

that aws provides meaning our code won't

694.959

port

696.079

can you talk a little bit about why

697.76

containerization

699.6

doesn't face that challenge

704.399

i can but that's actually a very a

706.959

longer discussion um

709.76

let's

710.56

let's table that and let me think on

712.399

that a little bit

714.079

i think that's actually a presentation

715.76

in and of itself that that's that we

717.76

have not touched on actually in previous

720.8

uh container uh presentations that we

723.519

have but that's a very good one to talk

725.04

about so let me actually give that one

727.6

um

730.399

let me

731.279

actually do a presentation on that and

732.639

give it a good

734.16

um

735.2

kind of walk through on that because

736.88

that's just something that i really

738.32

think just a quick one two minute answer

740.639

it's not going to be sufficient

743.279

yeah that's one of those uh you know we

745.2

way back we talked about the value for

746.88

value kind of idea of contributing to

748.639

the the greater good or cause and that

751.12

is a perfect question for that as soon

753.04

as you asked i was thinking the same

754.079

thing it's like oh that's like that's a

756.88

i think it'd be a very useful

758.72

presentation would actually be to look

760.639

at

761.68

uh vms and containers and maybe even and

764.079

we've we've touched on it but i don't

765.76

think we've really

767.839

had something we've really looked at

769.279

comparing a little bit container

771.839

technologies as well there's some

773.36

different things there that

775.2

um

776.16

i think that's a that is an excellent

778.48

um presentation topic maybe

781.279

may go beyond two presentations but yeah

783.36

i agree that's

784.88

that's a really good question timothy

786.56

and we definitely will bookmark it and

788.16

come back around to it one way or

789.44

another

790.32

awesome thank you

791.76

and that might actually be one at the

793.279

end if you're you know if that really

795.2

helps answer your question maybe you

797.04

could kind of do a short presentation

799.04

and kind of like lessons learned or what

800.88

you kind of like real world

803.44

here's what i'm working on or here's

805.519

what we're dealing with kind of deal

807.519

yeah awesome

809.519

i'd love that um i'll tell you a little

811.76

bit

812.48

one of the challenges i've already seen

814.72

is that you know we want to host um an

816.8

angular site

818.16

um

819.76

in uh aws well there's the straight um

823.839

you know upload your static site to s3

826.32

and host it that way

828.56

but i found the ability to

831.92

containerize our our angular app and

835.839

deploy it anywhere that

837.92

that seems just the best options that is

839.76

just a really small use case but

843.6

more to the larger point it would be

845.279

nice to have a presentation certainly

847.04

can provide some

849.12

input on that certainly

852.48

yeah no definitely and i

854.56

think like i said i think what even rob

856.8

said i think this will be a multiple

858.56

part discussion because really that then

860.959

starts getting into things like spring

862.56

boot um and some like

865.36

neutral container

867.279

standardization that you can use so that

869.279

you can port to different things like

870.56

that like aws

873.12

it's a good point yes sir

880.24

any other questions

888.8

with that thank you guys i appreciate

891.04

your time and if you'd love to discuss

892.639

any of these topic furthers you can send

895.12

questions comments and suggestions to

897.12

any of these methods

898.959

you can reach us on email at info

900.959

developer.com you can find us on the web

903.76

at developernerd.com

905.519

contact us we're also on youtube which

908.24

you can read this wonderful url or just

910.48

google us on youtube at developmenter

912.639

and youtube or you can reach us on

914.88

vimeo.com developernerd our goal is

917.92

making every developer better have a

920

wonderful day

922.86

[Music]

937.519

you