Local version of a Wordpress site - SSLHTTPS enforced?

I am trying to setup a local version of a website that is live, I have downloaded the files and database and believe it

I am trying to setup a local version of a website that is live, I have downloaded the files and database and believe it is all ready and sorted, but I am having an issue whereby the site is trying to force HTTPS and so all browsers are reporting 'This site can’t provide a secure connection, localhost sent an invalid response.'.

What is the way to handle this? Am I supposed to try to install a certificate?

I am running MAMP for the apache and mysql servers.

I am trying to setup a local version of a website that is live, I have downloaded the files and database and believe it is all ready and sorted, but I am having an issue whereby the site is trying to force HTTPS and so all browsers are reporting 'This site can’t provide a secure connection, localhost sent an invalid response.'.

What is the way to handle this? Am I supposed to try to install a certificate?

I am running MAMP for the apache and mysql servers.

Share Improve this question asked Feb 14, 2018 at 17:16 JoshJosh 1511 silver badge3 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 8

WordPress keeps WP_HOME and WP_SITEURL in DB, this is set during initial installation and usually is the domain of your website, in your case it is a domain with https.

Your visiting site via local domain, but WordPress redirects to https live domain, causing redirect loop which obviously fails.

To fix this, change WP_HOME and WP_SITEURL values in DB.

Or simply add this to wp-config.php:

define('WP_HOME','http://domain.local');
define('WP_SITEURL','http://domain.local');

Also remember that your browser is caching redirects aggressively. You need to clean cache to see results, or use browser incognito mode.

you can also check if there are any plugins you have installed to support SSL. If so remove the plugin manually from the plugins folder.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745431715a4627420.html

相关推荐

  • Local version of a Wordpress site - SSLHTTPS enforced?

    I am trying to setup a local version of a website that is live, I have downloaded the files and database and believe it

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信