# Local wp http redirects to https

**URL:** <https://community.localwp.com/t/local-wp-http-redirects-to-https/50928>\
**Category:** Support\
**Created:** [July 17, 2025, 1:32pm UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928 "2025-07-17T13:32:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/srd/32/8704_2.png) [@SRD](https://community.localwp.com/u/SRD)\
**Post date:** [July 17, 2025, 1:32pm UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928/1 "2025-07-17T13:32:47Z")

</div>

### What issue or error are you experiencing?

Learning to use GatsbyJS with WP, I run `npx gatsby develop` and receive an error:

> ERROR #gatsby-source-wordpress\_111002 PLUGIN
> 
> gatsby-source-wordpress Error: self-signed certificate

If I edit the site and home URL in db manager to use http instead of https, the site will still redirect to https.

Trying:

```auto
define( 'WP_HOME', 'http://gutenberg.local' );
define( 'WP_SITEURL', 'http://gutenberg.local' );
define( 'FORCE_SSL', false );
define( 'FORCE_SSL_ADMIN', false );

```

makes no difference.

How do I load a local WP site on http without it redirecting to https, please?

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [July 18, 2025, 8:31pm UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928/2 "2025-07-18T20:31:36Z")

</div>

When you updated the URL with the DB manager, it’s possible that it didn’t get all of the references to `https`.

One thing to note about urls within a WP database is that there isn’t anything that’s relative – ie, you can’t define a base url and have all the various pages be relative to it.

When I’m updating urls in the DB, I usually will use `wpcli` in the site shell. Click “Open site shell” and in the resulting terminal, you can search for instances of the old url with https and replace it with the regular http version. Note that I don’t have a slash at the end as that will usually pick up more hits within the db:

```auto
wp search-replace '<old-url>' '<new-url>'
wp search-replace 'https://example.local' 'http://example.local'

```

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/d/5/d51fa2048b9ebe8fe449a0e6eb865e1b559e8ea5.jpeg)

---

<div class="post-metadata">

**Author:** ![SRD](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/srd/32/8704_2.png) [@SRD](https://community.localwp.com/u/SRD)\
**Post date:** [July 25, 2025, 11:18am UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928/3 "2025-07-25T11:18:09Z")

</div>

> [@ben.turner](#):
>
> Click “Open site shell”

Hi Ben,

How do I open site shell?

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [July 25, 2025, 1:59pm UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928/4 "2025-07-25T13:59:31Z")

</div>

Hey @SRD! If you look at Ben’s screenshot above, underneath his site name `Alex Test`, you’ll see the options for `Site Folder` and `Site Shell`. These should be the same on your application as well!

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [October 23, 2025, 2:00pm UTC](https://community.localwp.com/t/local-wp-http-redirects-to-https/50928/5 "2025-10-23T14:00:18Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
