Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Troubleshooting

From: Installing and Running WordPress: MAMP

Video: Troubleshooting

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.

Troubleshooting

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.

Show transcript

This video is part of

Image for Installing and Running WordPress: MAMP
Installing and Running WordPress: MAMP

15 video lessons · 12884 viewers

Morten Rand-Hendriksen
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Installing and Running WordPress: MAMP.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

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.

Sign up and receive emails about lynda.com and our online training library:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.