Unable to access Wordpress admin facility on MAMP localhost.

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
jlanpheer
Posts: 9
Joined: Tue May 25, 2021 2:32 am

Unable to access Wordpress admin facility on MAMP localhost.

Post by jlanpheer »

I hope someone can help me with this, i cannot figure it out. I've got a MAMP installation (version 6.3) using Apache running on my Mac, i've got a client's Wordpress website installed on it and it works just fine. However, when i try to access the localhost's Wordpress admin facility, i get the following message:
"This site can't provide a secure connection.
localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR"

I am not at all familiar with "SSL" but was under the impression that localhost could not use SSL directly. I am unsure how to proceed. There are no errors in any wordpress debug logs or in the Apache logs to help me narrow this down. I've done extensive googling of this and a couple of suggestions have popped up (and :

1. Add the following line to the wp-config.php file:
define(‘FORCE_SSL_ADMIN’, false);

I tried this and it does not work.

2. This post details a two-step process where data is inserted into the “wp_options” table and then create an SSL certificate. The problem with this solution is that my database does not have a “wp_options” table in it, neither in my test version of the site on my localhost nor in my client’s production site. The “wp_options” table simply doesn’t seem to exist. Does anybody know what schema you would find it in? I’m not sure if that’s a problem or not. The second step says to "install a certificate on localhost". I have no idea how to do that and haven't tried, due to not being able to find the "wp_options" table. If anyone can point me to a how-to on that, i would appreciate that.

Here’s the link to that post:
https://wordpress.stackexchange.com/que ... -localhost

Hopefully, someone here has run across this issue and can refer me to some documentation that i can follow to get there. I can't install plugins in my site without it.
thank you!
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

Re: Unable to access Wordpress admin facility on MAMP localhost.

Post by mampsupportmod »

I know it's a long shot, but are you using https instead of http when browsing localhost?
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
jlanpheer
Posts: 9
Joined: Tue May 25, 2021 2:32 am

Re: Unable to access Wordpress admin facility on MAMP localhost.

Post by jlanpheer »

It's not a longshot, yes, my client's website uses https in many places, i can't get around that. However, i've tried it both ways (i "think" you are referring to using the URL formed in this way?: http://localhost:8888/wp-admin) and both give me the same message. All this time, i've simply bookmarked "localhost:8888" and used that. Does that default to one or the other? Also, i think it's important to note that i CAN reach the localhost site normally when simply specifying "localhost:8888", its just when i add the "wp-admin" to the end that it breaks.

And i've been working on this project for a couple of months now and i've been using https (perhaps continuously) this whole time until something in my environment just changed and i'm trying to track it down. Until this happened, i was not really aware of the difference, so i'm figuring this out for the very first time.

Any suggestions are appreciated!
jlanpheer
Posts: 9
Joined: Tue May 25, 2021 2:32 am

Re: Unable to access Wordpress admin facility on MAMP localhost.

Post by jlanpheer »

Today, i tried creating a site certificate for my localhost to enable it to use ssl following the steps of this excellent author:


(rather than watching the video, there's a link below with all the steps, which i followed to the letter).

However, that did not work either. I was able to generate a certificate for my site no problem and made the recommended changes to both httpd.conf and httpd-ssl.conf, but now Apache won't even start with the following error:

"Error: Apache couldn't be started. Please check your MAMP installation and configuration."

The problem is that i can't find anything written to a log anywhere that will help me pin it down. The apache_error.log contains nothing. Nor does the mysql_error.log. Are there any other logs available to check? Does anyone know if there's any steps that are missing from the instructions given above? Steve is usually right on, but the video IS a few years old, maybe MAMP has made some changes since then?

Other than that, i'm baffled with how to proceed. I can't figure out why simply accessing localhost:8888 would be any different from localhost:8888/wp-admin.
If anyone has any ideas, i'm all ears! Thank you very much!
jlanpheer
Posts: 9
Joined: Tue May 25, 2021 2:32 am

Re: Unable to access Wordpress admin facility on MAMP localhost.

Post by jlanpheer »

Further update on this:

I WAS able to step around my current problem by adding the following two lines of code to my localhost's wp-config.php file:

define('WP_HOME','http://localhost:8888');
define('WP_SITEURL','http://localhost:8888');

So, my immediate roadblock has been cleared. However, i expect to encounter this again in the future and would like to know:

1) Is it POSSIBLE to configure a localhost MAMP Apache server to use a custom SSL certificate?
As indicated in an earlier reply, i successfully created a custom SSL certificate but when made changes to the Apache config files as suggested in the video above, MAMP would not start and did not give an error message in any log that i could find that would give me an idea of what went wrong or how to fix it. I DO think it's "possible", but would love definitive steps on how to achieve it that work.

2) If so, what are the steps that i would take to get MAMP to recognize the certificate that i've created and work with https?

thanks much!
Post Reply