IntroductionWelcome| 00:04 | Hi, I'm Morten Rand-Hendriksen, and
welcome to Installing and Running WordPress MAMP.
| | 00:10 | In this course, I'll show you how to install
WordPress on your Mac so you can experiment
| | 00:16 | with and develop content for WordPress without having
to rely on an external web host or an Internet connection.
| | 00:24 | I'll start by showing you where to get
MAMP and how to install it on your computer.
| | 00:28 | We'll look at how to configure a
MAMP and WordPress to work together.
| | 00:33 | And finally, I'll show you how to uninstall
MAMP without losing your content in the process.
| | 00:40 | Having WordPress installed locally on your
computer will make it a lot easier to experiment
| | 00:45 | with and develop content for WordPress.
| | 00:48 | So let's get cracking with
Installing and Running WordPress MAMP.
| | 00:53 |
| | Collapse this transcript |
| Who is this course for?| 00:01 | WordPress is a web publishing application
designed to publish content onto the web.
| | 00:06 | So why would you want to install a web
publishing application on your computer so you can access
| | 00:11 | it but no one else can?
Well, the answer lies in that question.
| | 00:16 | Having WordPress installed on your computer has a huge benefit
both for bloggers, for beginners, and for developers.
| | 00:25 | As a beginner, you need to understand how WordPress works
and familiarize yourself with WordPress and all the ins and outs.
| | 00:32 | By having WordPress installed on your computer,
you can experiment it without having to install
| | 00:36 | it on an external host, and you can also get
to know the application in a safe environment.
| | 00:43 | Once you know how it works and you are comfortable
with it, then you publish it to a host and then you can go live.
| | 00:49 | As a developer, if you want to develop a child
theme or a regular theme or a plug-in or some
| | 00:55 | other content for WordPress, you
should always do it in a local environment.
| | 01:00 | Because if you didn't have a local environment,
you would have to make a change to your file
| | 01:04 | and then push that file onto the web and then
onto a web server and then check it and then
| | 01:11 | push another change onto
the web server and check it.
| | 01:14 | But if you have a local environment to
work in, you simply make a change to the file,
| | 01:19 | reload your browser, and you
see that change immediately.
| | 01:22 | For myself, I have WordPress installed on my
computers so that no matter where I am I can
| | 01:28 | always work on WordPress projects without
having to rely on an Internet connection.
| | 01:32 | Because let's face it, even though the
Internet is pretty much everywhere, you don't always
| | 01:37 | have a connection to the
Internet on your computer.
| | 01:40 | But if you want to work with WordPress, you
really either need that or you need to have
| | 01:44 | WordPress installed on a computer locally.
| | 01:47 | Down to brass tacks, WordPress installed on a
computer is the number one tool in your WordPress toolkit.
| | 01:54 | And whether you're a beginner or an
advanced user, this is something you should have.
| | 01:59 | We've created this core series to give
you four different options that you can use to
| | 02:03 | install WordPress either Macs or on PCs,
and we go through how to set it up, how to use
| | 02:09 | it, and how to uninstall it.
| | 02:12 | That way you'll have all the tools necessary to be able
to run WordPress locally on your computer and develop great things.
| | 02:20 |
| | Collapse this transcript |
| Overview of options: BitNami, WAMP, MAMP, and WebMatrix| 00:00 | This course is one of the series of four
courses that map out four different tools you can use
| | 00:06 | to install WordPress on your local computer.
| | 00:09 | Depending on your platform, your level of
expertise, and what you want to achieve,
| | 00:14 | either one of these four tools
may be the correct one for you.
| | 00:18 | So before we get started, let me break down
the different options so you can pick the
| | 00:22 | right tool and the right course
for your needs right off to top.
| | 00:27 | If you're a Mac user, I recommend using MAMP.
| | 00:31 | MAMP is an application that installs a web
server on your Mac and then you can link that
| | 00:37 | web server to WordPress so that you can run
WordPress as you would on a web server on the web.
| | 00:44 | MAMP requires a bit of configuration to work,
and it can be a bit tricky, but once it's
| | 00:48 | up and running it's very easy to work with.
The second option for Mac users is BitNami.
| | 00:55 | BitNami is a one-click installation that
installs both a MAMP server just like what had option
| | 01:01 | one and WordPress and links it altogether.
| | 01:05 | So you just installed BitNami and then
you have WordPress running on your Mac.
| | 01:10 | The problem is BitNami can be a bit buggy
on Mac, and it can be a bit hard to stop and
| | 01:15 | start then things tend to happen with it.
| | 01:18 | That's why I don't
recommend it as the first option.
| | 01:21 | But if you're looking for a simple one-click
install, and you don't want to worry about
| | 01:25 | configurations, BitNami is the way to go.
| | 01:28 | For Windows users, my primary
recommendation is to use BitNami.
| | 01:32 | It's the same application as the one available
for Mac users, but it works a lot better on Windows.
| | 01:39 | In fact, I use BitNami for all my development work
because it's so easy to work with, and it works really well.
| | 01:46 | I've tried all the other
options, but I stick with BitNami.
| | 01:50 | If you want an option, you can
install WAMP on your Windows computer.
| | 01:54 | Now WAMP is exactly the same as MAMP, except
the W at the top stands for Windows, whereas
| | 02:01 | in MAMP the first M stands for Mac.
| | 02:04 | So it's a web server that you install and
then you can configure it to talk to WordPress
| | 02:09 | and make it all work together.
The last option for Windows users is WebMatrix.
| | 02:15 | Now WebMatrix isn't exactly
the same as the BitNami and WAMP.
| | 02:20 | In addition to being a server environment
where you can run WordPress and other open-source
| | 02:25 | applications, WebMatrix is also a web development
tool that you can use to develop web applications.
| | 02:33 | So in addition to having WordPress run under
WebMatrix, you can also use WebMatrix to build
| | 02:39 | WordPress or build themes for
WordPress or build plug-ins for WordPress.
| | 02:43 | However, WebMatrix is very different from
BitNami and WAMP in that it installs a large
| | 02:50 | list of applications onto your computer
and changes the overall configuration of your
| | 02:55 | computer in the process, in effect making your
computer into a proper Windows-based web server.
| | 03:02 | Before you embark on this course, it's important
that you pick the correct tool for your purposes.
| | 03:08 | You can either watch all the four courses
and then based on those decide which tool you
| | 03:14 | want to use, or you can pick the tool you think will
work best for you and then just watch that course.
| | 03:21 | We've created one course for each tool so
that it's easy to compare them and also so
| | 03:26 | that it's easy to both install,
troubleshoot, and uninstall each of the solutions.
| | 03:32 | In this course we will be
looking at the MAMP for Mac users.
| | 03:36 | If you're a Mac user and you plan to use
BitNami, or if you're a Windows user and you
| | 03:42 | want use the BitNami, WAMP, or WebMatrix instead,
go to the lynda.com online training library
| | 03:49 | and select the course that
corresponds with your choice.
| | 03:52 | And don't worry about making the wrong choice.
| | 03:55 | Each of the courses in the series also shows you how
to uninstall each of the options if you don't like it.
| | 04:01 |
| | Collapse this transcript |
|
|
1. Introduction to MAMPWhat is MAMP?| 00:00 | Before we get started, it might be a good
idea to clarify what MAMP is and how it works.
| | 00:06 | MAMP is an acronym that
stands for Mac, Apache, MySQL, PHP.
| | 00:14 | Mac is well, Mac, the
operating system you run on a Mac.
| | 00:19 | Apache is a web server application you will find running
on a large portion of the web servers around the world.
| | 00:26 | MySQL is a database system used by
WordPress and most Apache web servers, and PHP is
| | 00:34 | a server-side scripting language or
programming language used by WordPress.
| | 00:39 | In plain English, this means by installing
MAMP you install the necessary applications
| | 00:45 | and programming components
to run WordPress on your Mac.
| | 00:49 | Once MAMP is installed, you can install WordPress
on your Mac, and it'll run just like it would
| | 00:55 | on a web server on the web.
| | 00:57 | The major differences between running WordPress
on a web server on the web and running WordPress
| | 01:03 | on MAMP on your Mac are pretty obvious,
because MAMP is installed on your computer, you don't
| | 01:09 | need Internet access to use your WordPress site.
| | 01:12 | That also means the site is only accessible
from your computer--that is unless you've decided
| | 01:17 | to make your computer a public web host--
something I don't recommend you do.
| | 01:22 | The true benefit of having WordPress running
on MAMP on your Mac is that you can work with
| | 01:27 | the files directly, and you don't have to keep
uploading and downloading them to and from your web server.
| | 01:34 | They're all there ready for you
to work with and experiment on.
| | 01:39 |
| | Collapse this transcript |
| Downloading MAMP| 00:00 | The first step in installing MAMP on your
computer is getting the application itself.
| | 00:06 | MAMP comes in two varieties,
MAMP and MAMP PRO. MAMP is free.
| | 00:12 | MAMP PRO has a license fee.
When you download MAMP you get both options.
| | 00:17 | You can choose whether you want to upgrade
to MAMP Pro when you download it or later on.
| | 00:23 | If you're setting up MAMP for
personal use, stick with the free option.
| | 00:27 | If you're going to use MAMP in a business or professional
capacity, I encourage you to pay the license fee.
| | 00:33 | You get more features, and you also
support open-source development in the process.
| | 00:39 | In this course we're going
to use the free version only.
| | 00:43 | MAMP is available on the
web as a simple download.
| | 00:46 | You get it from mamp.info, and here
you can see what that site looks like.
| | 00:52 | From here, you can either just download MAMP,
and like I said when you download it you get
| | 00:56 | both the free and the premium option, or you
can go and click the Buy now button, and this
| | 01:04 | takes you directly to the page where
you can buy the license for MAMP PRO.
| | 01:09 | I am going to download the package here.
So I'll click Download now.
| | 01:16 | Once the zip file is fully downloaded, you can
open it on your computer and then unpack it.
| | 01:26 | Now we have the package file for MAMP, and
we're ready to install it on your computer.
| | 01:31 | Like I said earlier in the course, MAMP is
the environment in which WordPress will live.
| | 01:36 | So now that you have MAMP downloaded, you also need
to get WordPress on to your computer before we can continue.
| | 01:46 |
| | Collapse this transcript |
| Downloading WordPress| 00:00 | WordPress is a free open-source
application in a constant state of upgrading.
| | 00:06 | As a result, any time you want to install WordPress--
whether that be under MAMP or on a web server somewhere--
| | 00:13 | you should always go to wordpress.org
and download a new fresh copy.
| | 00:18 | That way you know you're working with the
latest version of the application and that
| | 00:23 | that version is cleaned and untouched.
| | 00:26 | To get a fresh version of WordPress, you go
to wordpress.org, which is where WordPress
| | 00:31 | lives, and you can click on this
big blue Download WordPress button.
| | 00:35 | Now depending on when you're watching this
course, there may be a new version out in which
| | 00:39 | case you'll see the new version number here,
and that's the reason why I say you should
| | 00:43 | always go to this website
and get the latest version.
| | 00:46 | When you click on a button, you go directly
to the Download WordPress page and from here
| | 00:52 | you can download WordPress.
Now WordPress is not platform-dependent,
| | 00:57 | meaning it doesn't matter if you're on a Mac or PC
or if you're using Windows or Linux or something else.
| | 01:04 | WordPress is just WordPress.
| | 01:06 | So no matter what kind of application you're
using, just click on Download WordPress, and
| | 01:11 | you get the latest version.
Now here's a little tip.
| | 01:15 | If for some reason you need to
download an older version of WordPress,
| | 01:18 | let's say you're testing
something for backwards compatibility,
| | 01:22 | you can also do not directly
from this Download WordPress page.
| | 01:26 | To get to older versions of WordPress, you go down here
on the side, and you see where it says release archive,
| | 01:33 | if you open that option, you can see here you
have every single available version of WordPress
| | 01:39 | all the way from version 0.71, which was
the original first version of WordPress.
| | 01:45 | From here, you can install all the different
versions of WordPress that have ever been
| | 01:50 | released, and you can install them all on
your computer or on a web server and see how
| | 01:55 | they work and how they interact with your themes
and your plug-ins or whatever else you want to test.
| | 02:03 | Now we have WordPress 3.5 downloaded onto my
computer, and I can go on to install it into my computer.
| | 02:10 | When starting a new WordPress site, there is one
thing you must remember, and I can't stress this enough.
| | 02:16 | Always, always, always download a
fresh version from wordpress.org.
| | 02:22 | It's a good habit, and it
ensures that you'll always be current.
| | 02:27 |
| | Collapse this transcript |
|
|
2. Installing MAMPInstalling WordPress| 00:00 | The set up and installation of WordPress under
MAMP is a bit of a chicken and egg situation.
| | 00:06 | You can install MAMP first and
then WordPress or vice-versa.
| | 00:10 | Regardless, you have to do a bit of
jumping back and forth to make it all work.
| | 00:16 | In this course I'll install WordPress first
and then MAMP, but as you'll see when we get
| | 00:21 | going, this sequence is entirely up to you.
| | 00:25 | You may find that installing MAMP first
and then WordPress works better for you.
| | 00:30 | To be honest, it makes very little difference.
| | 00:32 | I have already downloaded
WordPress onto my computer.
| | 00:36 | It sits here under a zip folder, and now I
need to install WordPress into a folder so
| | 00:41 | that MAMP can work with it and so
that I can access WordPress files.
| | 00:47 | The first thing I'll do is unpack WordPress
into my Downloads folder. Now it sits here.
| | 00:54 | The next thing I need to do is
create a location for WordPress.
| | 00:58 | So I'm going to open a New Finder Window, and
I'll go to My Documents and create a New Folder.
| | 01:07 | I'll call it Sites, and under here I'm
simply going to place that WordPress folder.
| | 01:15 | Once I've moved the folder, we can
take a look at WordPress the application.
| | 01:20 | As you can see, WordPress consists of three
main folders called wp-admin, wp-content,
| | 01:26 | and wp-includes and then a
series of PHP, TXT, and HTML files.
| | 01:33 | This is the application WordPress, but the
application WordPress doesn't work unless
| | 01:38 | it's installed and active on a web
server, and that's where MAMP comes in.
| | 01:44 | Now that you have WordPress unpacked and
installed on your computer, it's time to install
| | 01:49 | and configure MAMP to work with it.
| | 01:54 |
| | Collapse this transcript |
| Installing MAMP| 00:00 | Now that WordPress is unpacked and ready to
go on your computer, it's time to install MAMP.
| | 00:06 | Earlier in this course I downloaded MAMP
from the mamp.info website as a zip file, and I
| | 00:12 | also unpacked the zip file.
So I got my MAMP package file.
| | 00:17 | To install MAMP, now I just have
to activate that package file.
| | 00:21 | So I'll double-click on it, and here I get
taken into the MAMP installer that'll walk
| | 00:26 | me through the process of
installing MAMP on my computer.
| | 00:30 | Here I'll click through the different options.
| | 00:34 | I'll read the license agreement,
and I read really fast.
| | 00:41 | I'll Agree to the license agreement.
| | 00:43 | I can decide if I want to install the software to
be available for all users or just for some users.
| | 00:52 | I'll make sure that I have enough space in
my computer, and this is also where I would
| | 00:56 | change the install location if I didn't
want to install MAMP in the standard location.
| | 01:01 | I'll just click on Install here, and then
depending on your security settings, you may have to enter
| | 01:07 | an admin password to be allowed
to install MAMP onto your computer.
| | 01:14 | So I'll put in my password.
| | 01:15 | Click Install Software, and now
MAMP is being installed on my computer.
| | 01:32 | If the installation was successful I get this
message, MAMP and MAMP PRO have been installed
| | 01:38 | successfully, and I can click Close.
| | 01:41 | Now if I go to my Applications and I type
in MAMP, you'll see we have MAMP right here.
| | 01:48 | You will also see that we
have MAMP PRO underneath.
| | 01:52 | This is because, like I said, when you
download MAMP you get both MAMP and MAMP PRO.
| | 01:58 | So if you want to use MAMP PRO and you have
a license, you'll then run MAMP PRO from here.
| | 02:03 | Otherwise, you just go to MAMP, find the MAMP
icon, double-click on it, and if this is the
| | 02:11 | first time you open MAMP,
you'll get this warning message.
| | 02:14 | It basically says that MAMP PRO has also
been installed on your computer, and it asks you
| | 02:19 | if you want to use MAMP or MAMP PRO.
| | 02:23 | So if you have a license for MAMP PRO,
you should click Launch MAMP PRO.
| | 02:27 | Otherwise just click Launch MAMP.
| | 02:29 | You also may want to uncheck this check for MAMP PRO when
starting MAMP so you don't have to do this every time.
| | 02:36 | I'll Launch MAMP and here
you see the application.
| | 02:40 | As you can see, installing MAMP is very easy.
| | 02:44 | Once it's on your Mac and working properly
we can configure the application to talk to
| | 02:49 | WordPress and work the way we want it to.
| | 02:54 |
| | Collapse this transcript |
| Configuring MAMP| 00:00 | Configuring MAMP to allow WordPress to
run on your computer requires several steps.
| | 00:05 | The first step is to ensure MAMP and the
MAMP server itself works properly and that it
| | 00:11 | knows where WordPress lives.
The first step of course is to start MAMP.
| | 00:17 | So I'll go to my Applications, type in MAMP, find MAMP
and start it, and from here I'm going to go to Preferences.
| | 00:28 | In the Preferences window I can
change how MAMP works and behaves.
| | 00:32 | I can change to PHP version here if I wanted to.
| | 00:35 | I'm just going to leave it
at the most recent version.
| | 00:39 | I can also change the ports.
| | 00:41 | Now unless you know what you're doing
you should really leave these alone.
| | 00:44 | You should leave the Apache Port at 8888 and the MySQL
Port at 8889, but if you know what you're doing,
| | 00:52 | you can change these if you wanted to.
| | 00:55 | You can also change what happens when you
start and stop MAMP, and the servers, as you
| | 01:01 | can see, you can automatically
start the servers when starting MAMP.
| | 01:05 | You can stop the servers when quitting MAMP.
| | 01:07 | And you can also enable the check
form MAMP PRO option at the very top.
| | 01:12 | So when you open MAMP, it automatically
asks if you have MAMP PRO.
| | 01:17 | Finally, you can change
this startup page for MAMP.
| | 01:22 | So by default, it opens to the MAMP settings
in your browser, which you'll see in a second,
| | 01:27 | but you can change this to open
directly into WordPress if you wanted to.
| | 01:31 | I am going to leave these settings as they
are and then I'm going to go to Apache, and
| | 01:37 | this is where we're going to make a change.
| | 01:39 | Apache is the web server inside
MAMP, and it's under the Apache tab.
| | 01:45 | We tell the web server where our application
lives, in this case, where WordPress lives.
| | 01:51 | So here I'm going to point Apache to the WordPress
folder in which we placed WordPress earlier.
| | 01:58 | If you remember that folder is found
under Documents/Sites/WordPress.
| | 02:05 | So here I'm going to click Select and then
navigate their Documents/Sites/WordPress.
| | 02:14 | Now our Apache server--meaning our web
server--points directly to WordPress.
| | 02:20 | So when I click OK, MAMP is
configured to talk to WordPress.
| | 02:25 | Now that doesn't mean it's all going to work quite
yet, but at least MAMP is doing its part.
| | 02:31 |
| | Collapse this transcript |
| Configuring WordPress and MAMP to work together| 00:00 | For WordPress to be able to work under MAMP
on your computer, it needs a database to place
| | 00:06 | settings and content information into.
| | 00:09 | That means we need to create a database for
WordPress and then tell WordPress how to access it.
| | 00:15 | Creating that database
will be done through MAMP.
| | 00:18 | But before we do that, let me just show
you why we need a database to begin with.
| | 00:23 | If I open MAMP and I start the servers,
I'll be taken to the MAMP configuration page.
| | 00:32 | But I also started the servers so that
we can access WordPress from our browser.
| | 00:37 | So I go and open a separate tab,
and I'll go directly to WordPress.
| | 00:41 | Now because we've configured MAMP's Apache
server to point directly to the WordPress
| | 00:48 | folder, we can access
WordPress by going to localhost:8888.
| | 00:55 | If we do that, we get this warning page that
says There doesn't appear to be a wp-config.php file
| | 01:02 | for WordPress, which means we can't start.
| | 01:05 | The problem is even if we try to create a
configuration file right now, you'll see that
| | 01:10 | we need a database to do so.
| | 01:12 | So before we get to this point,
we need to create the database.
| | 01:17 | I'll go to the MAMP
configuration page in my browser.
| | 01:21 | Then I'll go to this tab called phpMyAdmin.
| | 01:25 | This is where I can create new
databases and manage my databases.
| | 01:30 | From here I'll click on the Databases
tab and then it says, Create Database.
| | 01:36 | So here I can create a new database.
| | 01:38 | I'll call the database mywp, my
WordPress, and I'll click Create.
| | 01:45 | Now we can see down here we have a new database.
Of course, if I go to the database, it's empty.
| | 01:52 | But that's fine because WordPress
will populate this database for us.
| | 01:57 | Now that I have a database for WordPress, I
can configure WordPress to talk to that database.
| | 02:03 | So I will go back to WordPress here.
| | 02:05 | If you remember, I opened it by going to localhost:8888,
and now I can create a configuration file.
| | 02:14 | So I'll click on the button.
| | 02:16 | Now WordPress will tell me what it
needs to be able to set itself up.
| | 02:20 | I need the Database name which is
what we've already installed. It's mywp.
| | 02:24 | We also need a username and password, and the default
username and password inside MAMP are root and root.
| | 02:34 | We also need a database host.
The host in this case will be localhost.
| | 02:39 | I have all these information.
So I'm going to click the Let's go! button.
| | 02:44 | And from here I need to
insert all that information.
| | 02:47 | So I'll put in my Database Name, mywp,
my User Name, which like I said is root.
| | 02:55 | The Password is the same, root.
| | 02:58 | Then the Database Host is the localhost
and the Table Prefix, the default is wp_,
| | 03:05 | and we can just leave it like that.
I'll click Submit.
| | 03:10 | And WordPress now creates a new configuration
file for me containing all that information.
| | 03:16 | Because everything worked, I get to
this page that says All right sparky.
| | 03:20 | You've made it through
this part of the installation.
| | 03:22 | I'll click Run the install, and now I get to the
landing page for a new installation of WordPress.
| | 03:31 | To finalize the process, all I
need to do is give my Site a Title.
| | 03:35 | So I'll call it MyMAMPwp.
I set a Username for myself.
| | 03:42 | So I will set a username morten.
I have to have a password.
| | 03:46 | So I will set a password.
| | 03:49 | I also have to set an email from myself.
So I will say, now, because this is
| | 03:55 | a WordPress installation running on
my computer, there really is no point
| | 04:00 | allowing search engines to index the site,
because search engines can't access my computer.
| | 04:06 | So I will uncheck this Allow
search engines to index this site box.
| | 04:11 | Then I'll click Install WordPress.
| | 04:16 | Now WordPress is fully installed, and I can
either click Log In to log in, or I can simply
| | 04:23 | go back to localhost:8888 and here you see, a fresh
installation of WordPress running locally on my computer.
| | 04:33 |
| | Collapse this transcript |
| Running WordPress under MAMP| 00:00 | If you've followed all the steps so far, you should now
have a fully functional WordPress site running on your Mac.
| | 00:07 | To make it work all you have to do is to
boot up MAMP and start the servers and then go
| | 00:12 | to your browser to visit the site.
| | 00:15 | So I am going to start MAMP, click start
servers, and then I can either change the URL here,
| | 00:24 | or I can type in
localhost:8888 to get to WordPress.
| | 00:31 | Here you see WordPress running and
everything seems to be working fine.
| | 00:36 | This is the default installation of
WordPress running the Twenty Twelve theme.
| | 00:41 | What you're seeing is the front end of WordPress.
| | 00:43 | If you want to go to the back end of WordPress
you go to your address bar, type in /WP-admin.
| | 00:54 | This takes you to the login window for
WordPress and from here you put in that username and
| | 01:00 | password you set up when you
started configuring WordPress.
| | 01:07 | Check Remember Me so you don't have to do
this every time you access this WordPress
| | 01:11 | installation that runs on your
own computer and click login.
| | 01:17 | Now you go to WordPress on the backend, and this
is where you would do all your work on WordPress.
| | 01:24 | If this is the first time you've ever seen WordPress on
the backend this might seem a little overwhelming.
| | 01:31 | If it is the first time you've seen
Wordpress on the backend, I encourage you to go check
| | 01:35 | out my other course called WordPress Essential Training
that's right here in the lynda.com online training library.
| | 01:43 | From here WordPress works exactly
as it would on an external web host.
| | 01:48 | The only difference is
WordPress is stored on your computer.
| | 01:52 | You can go in and create a new post.
| | 02:01 | You can put in text.
You can publish a post.
| | 02:08 | You can view the posts. Here it is.
You can see the post in the index.
| | 02:15 | Here is the new post.
| | 02:17 | Here is an old post and WordPress work's
exactly as it would if it was on an external server.
| | 02:24 | The difference is that
WordPress runs under MAMP.
| | 02:28 | So what happens if I turn MAMP off?
| | 02:31 | I'll go to MAMP here and
then I'll click Stop Servers.
| | 02:35 | You see the green lights turned to red.
That means the servers are now off.
| | 02:40 | Then I go back to my browser and try to reload my page.
When I do that, you see I get nothing.
| | 02:48 | That's because WordPress installed locally on my
computer only works as long as MAMP is running.
| | 02:55 | So if I turn MAMP off or if I turn the
servers off, Wordpress no longer works.
| | 03:00 | That's because WordPress is
linked permanently to MAMP.
| | 03:05 | To get it up and running again, I
simply have to click Start Servers.
| | 03:09 | The servers turn from red to green, and
now when I reload the page WordPress is back.
| | 03:16 | As you can see, once you have MAMP and WordPress
configured, working with and maintaining your
| | 03:21 | local WordPress site becomes very easy.
| | 03:24 | Just remember to always start MAMP and the
servers if you want to work with the site.
| | 03:29 | Otherwise, all you get is an error message.
| | 03:34 |
| | Collapse this transcript |
| Accessing WordPress from your desktop| 00:00 | Just like when you host your WordPress installation
on a web host, you can access the files of WordPress
| | 00:06 | itself when it's hosted on MAMP on your desktop.
| | 00:10 | That's actually part of the reason why you
want to install WordPress on your desktop
| | 00:15 | choosing MAMP, because then you can work with
the files in WordPress on your computer, and
| | 00:20 | you don't have to access a web host
whenever you want to make a change.
| | 00:24 | So let's take a look at how that works.
| | 00:28 | First, let's look again at WordPress
as it is installed on our computer.
| | 00:33 | You will remember I
installed it under documents,
| | 00:36 | I created a folder called Sites, and
under that folder I placed WordPress.
| | 00:41 | As you can see, I never really made
any changes to the installation itself.
| | 00:46 | This is WordPress as it was downloaded.
| | 00:49 | The only difference is that when I installed
WordPress and made WordPress talk to the database,
| | 00:54 | WordPress created a new file called wp-config.
| | 00:58 | Originally, when you installed it, all you
would have was this wp-config-sample file.
| | 01:05 | So what WordPress did was it took this file
and then added the configuration options into
| | 01:11 | it and made the wp-config file.
| | 01:14 | So this is the file the
controls WordPress talking to MAMP.
| | 01:19 | The files that you will be working with when
you're working with WordPress are generally
| | 01:23 | found under wp-content folder.
| | 01:26 | Here you have your plug-in and your themes.
So let's first see how this works.
| | 01:33 | If I go in to WordPress on my dashboard, I
can go to the WordPress toolbar, go down to
| | 01:40 | Themes, and I see that here
I have two themes installed.
| | 01:44 | I have the Twenty Twelve themes, and
I also have the Twenty Eleven theme.
| | 01:49 | If you look at the folder for themes you see we
have twentyeleven and twentytwelve installed.
| | 01:56 | If I now go and install a new theme--
| | 01:58 | so I will quick Install Themes and then
search for twenty ten, I find the Twenty Ten theme,
| | 02:07 | and I click install now.
| | 02:11 | The theme is now downloaded from the
Internet and placed into WordPress.
| | 02:16 | If I go back to my themes folder, you see now we have three
folders here, twentyeleven, twentytwelve, and also twentyten.
| | 02:26 | This gives you both an idea of what happens
when WordPress installs a theme and also a
| | 02:31 | plug-in, and it also shows you that if you
want to install a new theme or new plug-in,
| | 02:37 | you can either do it from the WordPress
admin panel by using the installer function that
| | 02:42 | I just showed you, or you can download or
create your own folders with the correct files
| | 02:49 | in them and dump them straight into the
themes folder or straight into the plug-in folder
| | 02:55 | inside your WordPress installation on your computer,
and it'll automatically become active on WordPress itself.
| | 03:03 | This is why you want to
install WordPress on a computer.
| | 03:07 | Now you can work with the files directly on
your computer and whenever you make a change
| | 03:11 | to that file on your computer, that change automatically
shows itself in your WordPress installation as well.
| | 03:18 | As you can see, the great thing about
having a local installation of WordPress is that
| | 03:23 | you have full access to
WordPress at the click of a button.
| | 03:26 | That means you can build your child themes,
your themes, your plug-ins, and do whatever
| | 03:32 | experiments you want in a safe environment that
doesn't require web access. Pretty cool, eh?
| | 03:38 |
| | Collapse this transcript |
|
|
3. WordPress and MAMPTroubleshooting| 00:00 | As with a WordPress installation on an external
web host, chances are you'll run into issues
| | 00:06 | with your local version of
WordPress running on MAMP.
| | 00:09 | When that happens, it's good to know how to
troubleshoot the situation and find the solution.
| | 00:15 | Though problems with WordPress running on
any server are rare, there are certain types
| | 00:20 | of problems that keep coming up.
| | 00:22 | By that I mean when things happen they
tend to be caused by the same situations.
| | 00:27 | So I'll cover some of those here so
you know what to do if things don't work.
| | 00:32 | The most common problem you'll find with
WordPress installations under MAMP is that the WordPress
| | 00:38 | installation doesn't work at all.
| | 00:40 | The reason for that most
commonly is that your servers are off.
| | 00:47 | What happens is people may start MAMP, but
then forget to start their server and they
| | 00:52 | just jump directly to their browser and try to
load the WordPress site and they get this page.
| | 00:58 | Nothing is working.
You yell at your computer for 2 minutes.
| | 01:00 | Then you realize you forgot to
push the Start Servers button.
| | 01:04 | You start the servers, you go back to
your browser, and everything works fine.
| | 01:09 | So that's an easy thing.
| | 01:11 | You can also avoid this problem
by changing your settings in MAMP.
| | 01:16 | So if you go to Preferences and go to Start/Stop,
you can check the Start Servers when starting MAMP box.
| | 01:23 | That way when you start MAMP, it
automatically starts WordPress too.
| | 01:28 | If you want to take things one step further,
you can also make it so that when you open
| | 01:32 | MAMP, and you start the servers, it
automatically takes you directly to WordPress.
| | 01:38 | You see that this Open start page at startup
box is checked already and right now by default
| | 01:45 | it takes you to the MAMP configuration page.
| | 01:48 | If you want instead for MAMP to take you
directly to your WordPress site, all you have to do
| | 01:53 | is simply remove this URL, and
you're going to the root of your site.
| | 01:59 | So that'll take you directly to WordPress.
| | 02:02 | All this will help you to
avoid some of these problems.
| | 02:05 | However, there is another problem that may
occur that requires a bit more attention.
| | 02:11 | In some cases, even when your server is
running, you still can't access WordPress.
| | 02:17 | In many cases, you'll get some sort of weird
message that says something like, can't access
| | 02:21 | database or database connection not
completed, or something like that.
| | 02:26 | If that happens, it's because your configuration
file inside WordPress has somehow gotten messed up.
| | 02:32 | Fortunately, this is relatively easy to fix.
| | 02:36 | If this happens, you can go to your Documents/Sites/wordpress
and find your wp-config file here.
| | 02:44 | Then all you have to do is
open it in a text editor.
| | 02:48 | When you scroll down here, you'll find the
entries that make WordPress talk to MAMP.
| | 02:57 | You can see it here.
| | 02:58 | It says define database name and here you have
the database name and then the database user.
| | 03:04 | That's the username and then
the password and the localhost.
| | 03:08 | If I go in here and I break something,
I'll take out my password and save it,
| | 03:15 | you'll see that when we go to the browser
and try to reload it, we get this message,
| | 03:20 | Error establishing a database connection.
| | 03:22 | That simply means WordPress
can't talk to the database at all.
| | 03:26 | If I go back to my text editor and
put the password back in and save it,
| | 03:32 | when I reload my page, WordPress is back.
| | 03:35 | This is very common, and there are
many reasons why this might happen.
| | 03:39 | But now you see how to fix it.
| | 03:42 | The final type of problem is one
WordPress breaks for some other reason.
| | 03:46 | It may not load properly or maybe some crazy
thing going on where things look really weird,
| | 03:51 | or you can't access the back end or
the front end or something like that.
| | 03:56 | If WordPress is really broken, but you don't
get that message about not being able to talk
| | 04:01 | to the database, you may have to
reinstall WordPress altogether.
| | 04:06 | Reinstalling WordPress is a relatively
simple process that involves downloading a fresh
| | 04:12 | version of WordPress, deleting all the files
in this folder except for the wp-config file,
| | 04:19 | and the wp-content folder, and then replacing
all the old files with fresh files directly
| | 04:25 | from the downloaded version of WordPress.
| | 04:28 | This will give you completely new
application that just contains your old configurations
| | 04:33 | and whatever themes and
plug-ins you've installed.
| | 04:37 | If you need more information about how to
reinstall and also fix WordPress, you should
| | 04:42 | go check out the WordPress Essential Training course
right here in the lynda.com online training library.
| | 04:49 | Most problems with MAMP are caused by incorrect
configurations or that the servers are turned off.
| | 04:54 | Only rarely do you have to
uninstall and reinstall the application.
| | 04:59 | When that happens, you should follow
the procedure explained in the next movie.
| | 05:04 |
| | Collapse this transcript |
| Uninstalling and reinstalling MAMP| 00:00 | There are many reasons why
you may want to uninstall MAMP.
| | 00:04 | It could be because it's not working or because
you're not using it or any myriad of other reasons.
| | 00:10 | If you plan on uninstalling MAMP but you
want to keep the option open to use WordPress
| | 00:16 | under MAMP again sometime in the future without
having to reconfigure and repopulate the site,
| | 00:22 | following the following procedure will
help you do that without a lot of extra work.
| | 00:28 | If you remember from when we installed MAMP
and made a work with WordPress, we've installed
| | 00:33 | MAMP as an application and then we
placed WordPress in a folder on our computer.
| | 00:39 | That means when we uninstall MAMP,
WordPress still stays on the computer.
| | 00:44 | However, all the information you put into
WordPress--say you created posts or pages--
| | 00:49 | are stored in the database
that's contained within MAMP.
| | 00:53 | So before you uninstall MAMP, you need
to export the content from that database,
| | 00:57 | so you don't have to make it all over again.
| | 01:01 | Exporting the database is
done from the MAMP web interface.
| | 01:05 | You can access the MAMP web
interface by going to start page in MAMP.
| | 01:10 | And if you don't already go directly
to the web interface, simply go /MAMP, all caps.
| | 01:15 | And this takes you to the MAMP web interface.
| | 01:21 | From here we're going to go to phpMyAdmin
and then we're going to select our database.
| | 01:26 | So you go to left-hand side
here and find your database.
| | 01:30 | Mine is called mywp.
Then you select Export from the tabs.
| | 01:36 | Here, I'm going to use the Custom export method.
| | 01:41 | I'll scroll down and make sure
that the output is saved as a file.
| | 01:45 | That way I can store it on
my computer and use it later.
| | 01:48 | I'm going to scroll further down and check
this box here that says Add DROP TABLE and
| | 01:55 | then I'll scroll all the way to
the bottom and click the Go button.
| | 02:00 | This creates a SQL file.
| | 02:02 | You can see it here, and I
can open it in my Finder.
| | 02:07 | This SQL file is a complete
dump of the entire database.
| | 02:11 | So later if I want to create a new database,
I can simply import that entire file into
| | 02:17 | the database and all my
original content will reappear.
| | 02:21 | Now I want to save this file somewhere so
that I can easily bring it back if I need to.
| | 02:26 | To do that, I'm going to go to
where I placed WordPress itself.
| | 02:30 | It's under Documents/Sites/WordPress, and then
I'm going to place it inside the wp-content folder.
| | 02:36 | I placed it into the wp-content folder,
because if I were ever to upgrade WordPress or if
| | 02:42 | I was to install a new version of WordPress,
the wp-config file and the wp-content folder
| | 02:48 | are the only two elements I
wouldn't delete and then reinstall.
| | 02:53 | The wp-content folder contains all of my custom
themes and plug-ins and also any uploaded files,
| | 02:59 | and in this case, I'm also going
to add my database backup to it.
| | 03:03 | So I will create a new folder, call it Dbbackup.
Then I will simply drag the SQL file.
| | 03:13 | So we exported database file into this folder.
| | 03:17 | Now I know that I can uninstall
MAMP without losing any of my content.
| | 03:22 | So I will go to MAMP and turn it off.
| | 03:29 | Now because I'm on a Mac to
uninstall MAMP all I have to do is find it.
| | 03:37 | Here it is MAMP and MAMP PRO.
| | 03:40 | Then I'll go to the Options
menu and move it to Trash.
| | 03:46 | Now MAMP is uninstalled, and if I try to
access it from my browser, you'll see I get nowhere.
| | 03:53 | Let's say I now cleared my trash bin,
so I couldn't resurrect MAMP from memory.
| | 03:59 | Now MAMP is uninstalled from my computer,
and I can still access my WordPress files,
| | 04:04 | but I can't run WordPress.
| | 04:06 | So what if I wanted to reinstall MAMP and
make everything work the way it did before?
| | 04:12 | To do that, I first have
to reinstall MAMP itself.
| | 04:15 | So I will go back to my Finder, go to my
Downloads, or I could download MAMP again from the web.
| | 04:23 | I'll run the package file. Run the install.
I'll open MAMP. Change my Preferences.
| | 04:43 | So I will point the Apache route
to where our WordPress is located.
| | 04:47 | It's right here under Documents and Sites.
| | 04:54 | I will make sure my other
settings are where I want them to be.
| | 04:58 | Click OK and click Open start page.
| | 05:03 | But now we get this error message, Error establishing a
database connection, because we installed MAMP from scratch.
| | 05:09 | So we need to create a database for MAMP to use.
| | 05:13 | But because we've already made a backup of our
existing database, we can use that one instead.
| | 05:19 | So I'll go to the MAMP web interface, /MAMP.
Go to phpMyAdmin. Go to Databases.
| | 05:30 | Create a database with the
same name that you used before.
| | 05:34 | In this case it was mywp.
| | 05:38 | Then I can go to that
database over here on the left.
| | 05:45 | Select Import, choose the file, and that follows under
Documents/Sites/wordpress/wp-content/wp/Dbbackup.
| | 05:59 | I'll click Open and click Go.
| | 06:06 | Now our database is imported, and if everything
worked right, I should now see my WordPress
| | 06:14 | site up and running again.
| | 06:16 | Here you see that post I've created earlier, and
you see that all my configurations are now in place.
| | 06:22 | By following the correct procedure and
exporting your database before uninstalling MAMP,
| | 06:27 | you ensure that if you ever want to reinstall
MAMP and keep using your original content
| | 06:32 | later, you can do so without
losing anything in the future.
| | 06:36 | Now you know how to install, set up,
and use WordPress on your Mac using MAMP.
| | 06:42 | All that's left to say is go forth and code.
| | 06:47 |
| | Collapse this transcript |
|
|
ConclusionNext steps| 00:00 | Now that you have WordPress running on your
computer using MAMP, it's time to move into
| | 00:05 | more advanced content with WordPress.
| | 00:08 | If you haven't really used Wordpress
before, I encourage you to take the
| | 00:12 | WordPress Essential Training course right here
in the lynda.com online training library.
| | 00:17 | But that's not all we have to offer.
| | 00:19 | If you go to lynda.com and then you put a forward
slash at it, and type in mor10--because that's my name--
| | 00:28 | you will find a list of all of my courses on
WordPress that are in the lynda.com library.
| | 00:35 | We have everything from a central training
to how to build child themes to how to use
| | 00:39 | different themes and way
beyond that to very advanced topics.
| | 00:44 | I'm not the only author in the lynda.com
library to talk about WordPress.
| | 00:49 | There are lots of extra courses on everything
from security to multi-sites to other topics
| | 00:54 | that you can really invest some time and learn
how to use WordPress to make professional websites.
| | 01:00 | To get more information about WordPress
itself, you should go check out WordPress.org.
| | 01:06 | This is the website that has all the information
about WordPress application, and here you will
| | 01:11 | find a lot of cool stuff
like themes and plug-ins.
| | 01:16 | You can also find lots of information in the
forums, and most importantly if you are a developer,
| | 01:21 | you find the WordPress Codex.
| | 01:24 | This is where you find information about how
WordPress works and what you can do with it.
| | 01:29 | Every piece of code that's in WordPress is
documented in the WordPress Codex, and this
| | 01:33 | is a website I pretty much live on,
because anytime I need to do something advanced
| | 01:38 | I can always find information about
how to do it in the WordPress Codex.
| | 01:43 | Now all that's left to say is good luck, build
something awesome, and come back and learn more.
| | 01:48 |
| | Collapse this transcript |
|
|