Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
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.
As with a WordPress installation on an external web host, chances are you'll run into issues with your local version of WordPress running on MAMP. When that happens, it's good to know how to troubleshoot the situation and find the solution. Though problems with WordPress running on any server are rare, there are certain types of problems that keep coming up. By that I mean when things happen they tend to be caused by the same situations. So I'll cover some of those here so you know what to do if things don't work.
The most common problem you'll find with WordPress installations under MAMP is that the WordPress installation doesn't work at all. The reason for that most commonly is that your servers are off. What happens is people may start MAMP, but then forget to start their server and they just jump directly to their browser and try to load the WordPress site and they get this page. Nothing is working. You yell at your computer for 2 minutes. Then you realize you forgot to push the Start Servers button.
You start the servers, you go back to your browser, and everything works fine. So that's an easy thing. You can also avoid this problem by changing your settings in MAMP. So if you go to Preferences and go to Start/Stop, you can check the Start Servers when starting MAMP box. That way when you start MAMP, it automatically starts WordPress too. If you want to take things one step further, you can also make it so that when you open MAMP, and you start the servers, it automatically takes you directly to WordPress.
You see that this Open start page at startup box is checked already and right now by default it takes you to the MAMP configuration page. If you want instead for MAMP to take you directly to your WordPress site, all you have to do is simply remove this URL, and you're going to the root of your site. So that'll take you directly to WordPress. All this will help you to avoid some of these problems. However, there is another problem that may occur that requires a bit more attention.
In some cases, even when your server is running, you still can't access WordPress. In many cases, you'll get some sort of weird message that says something like, can't access database or database connection not completed, or something like that. If that happens, it's because your configuration file inside WordPress has somehow gotten messed up. Fortunately, this is relatively easy to fix. If this happens, you can go to your Documents/Sites/wordpress and find your wp-config file here.
Then all you have to do is open it in a text editor. When you scroll down here, you'll find the entries that make WordPress talk to MAMP. You can see it here. It says define database name and here you have the database name and then the database user. That's the username and then the password and the localhost. If I go in here and I break something, I'll take out my password and save it, you'll see that when we go to the browser and try to reload it, we get this message, Error establishing a database connection.
That simply means WordPress can't talk to the database at all. If I go back to my text editor and put the password back in and save it, when I reload my page, WordPress is back. This is very common, and there are many reasons why this might happen. But now you see how to fix it. The final type of problem is one WordPress breaks for some other reason. It may not load properly or maybe some crazy thing going on where things look really weird, or you can't access the back end or the front end or something like that.
If WordPress is really broken, but you don't get that message about not being able to talk to the database, you may have to reinstall WordPress altogether. Reinstalling WordPress is a relatively simple process that involves downloading a fresh version of WordPress, deleting all the files in this folder except for the wp-config file, and the wp-content folder, and then replacing all the old files with fresh files directly from the downloaded version of WordPress.
This will give you completely new application that just contains your old configurations and whatever themes and plug-ins you've installed. If you need more information about how to reinstall and also fix WordPress, you should go check out the WordPress Essential Training course right here in the lynda.com online training library. Most problems with MAMP are caused by incorrect configurations or that the servers are turned off. Only rarely do you have to uninstall and reinstall the application.
When that happens, you should follow the procedure explained in the next movie.
There are currently no FAQs about Installing and Running WordPress: MAMP.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.