navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Installing and Running WordPress: MAMP

Installing and Running WordPress: MAMP

with Morten Rand-Hendriksen

 


Installing WordPress on your computer gives you a perfect testing ground for experimentation, theme development, plugin testing, and website development. This course is designed for developers and users who want to install and configure WordPress locally on a Mac with MAMP, the open-source server/database/scripting language combo that sets the stage for more serious WordPress development. Author Morten Rand-Hendriksen covers the configuration options and usage scenarios to get you started working in WordPress quickly.
Topics include:
  • What is MAMP?
  • Downloading MAMP and WordPress
  • Installing MAMP and WordPress
  • Accessing WordPress from your desktop
  • Troubleshooting your setup

show more

author
Morten Rand-Hendriksen
subject
Developer, Web, CMS, Blogs, Servers
software
WordPress 3.x
level
Beginner
duration
45m 39s
released
Feb 05, 2013

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



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


Suggested courses to watch next:

WordPress: Building Responsive Themes (2h 55m)
Morten Rand-Hendriksen


Start with a Theme: Magazine Styles in WordPress (1h 18m)
Morten Rand-Hendriksen

WordPress 3: Building Child Themes (3h 11m)
Morten Rand-Hendriksen


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,069 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked