Tip:
Highlight text to annotate it
X
hello in this video we are going to be setting up
WordPress we're going to setup Wordpress on
your local machine under WAMP as described in the previous
video so that you can customize everything you can setup your theme
all of your files everything but your content
will basically be managed this way I believe this is good practice
you don't have to use get I suggest
it highly it's very good practice
keeps everything organized along with the ability to roll back
to undo changes to figure out where problems are
very useful that way you don't have to
but this is how I do it in this is what i'm showing you so to get started
we will be downloading a copy of word press I've already
done few of those things so let's
let's begin by going into our web server
ahead changing the password for my sequel
so we're gonna open up my sickle Council Council
currently the way we have to set up there is no
password you could continue that way I'm not going to
so all we have to do
type update by SQL
user Sat
password
equals
function password
will type in how bout just password
because I'm tackling
show you but I use in the future will have actor
then where user
got user equals
ru semi-colon
to finished statement flush privileges will just
refresh my sequel as far as what's going on
but using names things like that and
we're good so that part's done
are sequel user name is route
are sequel up password is password so
show Word Press we'll to those things so
up next step though because really use a
get Repole you could do it publicly or
you could pick get help do it privately I'll
a other alternative that I use for my private pockets
is pickpocket Soria do is create
repo here we're going to name it
way blog
let's say because its word press private
renews get we're not gonna have
anybody else working on this private if you were small company
what say you could have issue tracking I do have some alternatives for that
I'll explain that in a future video but for now
will just set it up as ok
week
give it league which it's going to be PHP
you okay so
in the kit starting area we're gonna be starting from scratch
this is these are the command lines for
get if you were to do it like a man like I've
by explained earlier that I love a program called source tree
its phenomenal this is the URL
that you'll need to pay attention to so we're gonna copy that open up source
tree
we're going to create new
I'll a.m. a nuclear power re:
new repository I'm she up by cloning
the the one that we just made so we're gonna paste the URL here
I'll now if you're
had already started a blog you or any other
type of think that you will use kit for what you can do
is just move that into a different directory on your machine
set the destination path path here
word tour C Drive
breakdown folder will too
eight new folder call my
be my blog
we're going to put it in here if you were to
21 from a halt source he would just
reading my blog to my blog tour or something create
your new my blog directory because it needs to be empty at that copy all your
files into it
after this so we're gonna clone that gonna pull
the source that exists over at
the scopic pocket repository
which is nothing so we're done with that
the cap source so we're going to go
to right folder are
my blog folder see get has begun
crap the
WordPress source
simply copy all a person
K now we go to local host we see my blog
we're going to create the configuration file
we know these two things no password
database local host if you have multiple
databases under the same name we could
prefix that like something like that
what issues word press kits will give its own database
and we'll go to back to local host
PHP admin route
and password of
that let's create a new database to you
my blog
so we'll put my blog here this is the same
as the sky here and we'll
set it up
username will too admin
I didn't realize you could choose this admitted always bad
a the default username which
obviously its targeted a lot so why don't we choose
Mike she obviously
you could probably guess what I just typed in there
for future reference choosing passwords
GRC dot com
flash passwords that HTML excellent source
for complete are choosing completely random passwords
its sexually so
were set up here's WordPress now we're going to
fell apart NetBeans project so will hit new
project gonna be PHP it's going to be with existing source
next source
Ste
my blog
project name that's fine by
actually I'm sorry well
added in the studio I realized I just told you that it was fine to put
the project details into the same directory
you can do that by all means that means a lot to buy the fault
I prefer not to I like to have my NetBeans projects
folder you could put it wherever you want weyrich
uses by default this great and then you have all of your project details
in that folder so when you go open a project
everything's right there makes a lot easier when opening things
and it keeps all of that data out love
your actual directory that you're going to be deployed so that we don't have to
think about it later
up sorry made that mistake pics in
next this is correct it's raining
our local machine this is for development purposes after the project
for
debugging and such
we now have our project setup it
those indexes your me I'll now first
port 20 we have all of our content
here all files what we're gonna do though
is we don't need the sky anymore we're going to copy this one
and paste it
here this is just a thing that I like to do
word rename this
so it when you move it from server to server let's say you
have a development server being that
at your local machine arm then you might have a be the server
if you're doing work for clients that you might have your production server
see could have won be kind peak one for Dad that one
dashed out of for this machine your
be the machine that way you can have database configurations such
their home and then your production
and that you'll just replace your config file as you deploy
to different machines this is also
the way accepting sup based upon the idea that
the people who have access to these files are trustworthy
if you're the only one or a few in the guy that sat next to you
are the only one UK to know what's going on I
if this was a larger environment these files would be totally
hit in from anybody else who is doing development work
for you arm then
finally grab a copy of the database
as you can see we are going take another look at this
here's our database we're going export
this export my blog sequel
good by Blogger sequel
word going to put that
happy there that in here
cut here we're gonna put
that here
we're gonna rename it GB database
one Dashti
this way when we it to get repository
will have a copy of the database as well edible
periodically as we make backups backups will be reflected
in the get repository so the next step is to go back to our source tree
sees that all these files happen added
or changed and we're going to at the mall
except for look at this differently
I'm sorry i havent you this is a new first use this one
up
is WP config we are going to ignore changes to this file
because it could change back for the pain and the plane such
things like that no exact file name:
okay to
were good we're gonna slept all this
at it or staging where they
going to committed
initial commit
nothing really important here as a
now on your local machine everything is told
hey this is what's going on with the get repository
thing is though it's only on your local machine so now we're gonna push it
to our master branch
hit OK everything spin uploaded
to the pickpocket okay that's it
so now double check over it pickpocket
you my blog and
this is when we created it couple minutes ago we've pushed the initial
changes
and its good to go we are we could see the source
everything's reflected here so now what we make any changes
bill the reflected as changes
home NetBeans will update
all this as green as new update second that
information spend committed
so the next step why don't we get a plugin
now a plugin it could be a plugin it could be a theme
could be any type of change for making at but we're gonna stage it on their
machine first before we
deployed anywhere we're gonna customize everything to do with everyone so we're
gonna
grab a copy %uh advance custom fields this is excellent plugin
for word press especially for advance development
creating custom team types and then attaching
information that's important to those posts
or pages however yours setting things up so
ever teacup got copy of that will call you advance custom
fields will at that to our plugin directory
track over here it is important though
general that local
plugin thing crazy if you're using it
then you're using you happen you have a need for it but
George just leave a whole buncha plugins on your machine
or actually on your production environment
ins installed or non stop just don't have those files
there if you're not using them if there is a weakness in one of them
especially if it's not active you might not be updating it and then
you're being exposed to whatever that weaknesses so
you to add a tax year what we can do
will will invoke it over here plugins
here it is now activate this
just so that we also make a change to
the to the database will pretend like we did a whole buncha work
just now and we'll go back to our
database will export
another will
crap dove folder crap
this guy
will replace this one here
with this guy in other circumstances
if you consistently make backups of your data base you might
name it something different such as
that date with area
it
is T 7
you might name it something like that so that you have one version after another
after another
this is it necessary with get repositories because
it is going to save those changes instead of
all new information I'd only the changes
so lot more efficient you you can
by all means still two databases that way somewhere else but you don't need to
do that with
get so you have our database
our file changes have already been reflected which we could see
I'll all week sort of senior
change here so what we're gonna do go back to source tree
as you can see all at these changes are in that plugin folder
you files except for this guy
which actually is content changes and you can see them here
its only going to save the actual
information that was changed or added and we're gonna
stage all of these will
committees as a useful change
installing
commit worked on
if we were to do other things maybe and so on other plugin
maybe it's all over him we could do that make another commit
doesn't to we'll have to do a whole bunch work all at once
are but we could push it all what's so we have one
commit that have pushed will push that
and now you'll notice
credit this would have happened without the get
I'm sorry we don't go there custom fields
custom field stop here we go back to the pickpocket
and see that we've pushed new
changes that include the
advance custom fields here
we have two latest file
we have those changes that were made if we needed to grab an old version
we could so that's the basics and how
I set up a a new project you can make whatever changes you need to
you could use whatever posit or you could do it locally as far as having
your own
get repository beat on your machine or
the Italian server that you set up you Joe actually have to use remote
repository to have all these benefits with something like source to your
doing it by command line but happy
doing it this way if your machine would be wiped out
you have a backup of everything remotely so I hope you enjoyed this video
you have any questions let me know thank you