Page 1 of 1

Unable to access Wordpress admin facility on MAMP localhost.

Posted: Thu Oct 14, 2021 7:57 am
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.

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: ... -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!

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

Posted: Thu Oct 14, 2021 4:20 pm
by mampsupportmod
I know it's a long shot, but are you using https instead of http when browsing localhost?

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

Posted: Thu Oct 14, 2021 10:27 pm
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!

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

Posted: Fri Oct 15, 2021 2:26 am
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!

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

Posted: Fri Oct 15, 2021 6:47 pm
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:


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!