Who access to wp-admin in localhost

Hi my name is Rocío and i am new in Frontity. My project consist to refactor and migrate blogger to wordpress. The question is how can I access to wp-admin in localhost.

Thanks

Hello Rocio!

And welcome to Frontity :slight_smile:

If you want to run a WordPress installation in your local environment, you can use a tool like https://localwp.com/.

Are you planning to build the frontend of your new site using Frontity?

Hello @Pablo ,

I’ve download local by fly wheel and get this error:

FetchError: request to https://wp.frontity.test/wp-json/wp/v2/posts?_embed=true&page=1 failed, reason: self signed certificate

When I change it to http it works but I was hoping to use https

On a different forum I saw:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = ‘0’,

Not sure if that will help or should I just use http

Thanks,
Maurice

Hello Maurice,

I’m afraid I don’t really understand the problem you are facing. What are you using local by flywheel for?

Can you explain what steps did you follow so we can reproduce your error?

Just to make things clear, you don’t need to run WordPress locally to develop with Frontity. Please check our quick start guide.

Hello @Pablo - thanks for the response.

Like Rocio, I want to develop locally then push to the live environment.

Normally I use: localwp as you suggested above.

Then in the frontity.settings.js file I make the adjustment:

{
      name: "@frontity/wp-source",
      state: {
        source: {
           api: "https://wp.frontity.test/wp-json",
        },
      },
  },

and run

npx frontity dev

Then I get the error

FetchError: request to DOMAIN/wp/v2/posts?_embed=true&page=1 failed, reason: self signed certificate.

Note as I’m a new user the forum didn’t allow me to put in more than 2 links :slight_smile:

I can fix it by:

 {
       name: "@frontity/wp-source",
       state: {
         source: {
            api: "http://wp.frontity.test/wp-json",
         },
       },
   },

Ideally I’d like to use the https connection locally instead of http.

Does this make sense?

Cheers,
Maurice

Hello again Maurice,

I think now I understood the problem you are facing, thanks a lot for your detailed explanation.

I’ve been taking a look at the flywheel site and I could find this under the features section:

TLS/HTTPS
  • Self-signed certificates are automatically created for new sites
  • One-click to trust self-signed certificates to suppress browser notices

It looks like the self-signed certificates created by local don’t work well with Node. I’m not an expert, so I’ll ask the team and see if there’s anything we should do to avoid this.

Can you elaborate this a bit more? We would like to understand your use case. In any case, glad to see that you can make it work by switching to http

@Pablo thank you for the response.

I just started with Frontity and am loving it. So far http works just fine. In the past I’ve had problems with Facebook and google maps using http instead of https - but that is not something I’m doing for a bit.

I’m currently just exploring Frontity and so far am enjoying it a lot. Thank you for your guys hard work and I’m sure I’ll have some additional questions later on :slight_smile:

Thanks a lot for your kind words Maurice. Can’t wait to see what you build :blush:

Hi Pablo,
yes i am trying to make my new website with Frontity (i have more experince with react and redux). The problem comes from being used to working with Vagrant and its virtual environment.

Thanks for respond so far.

I see Rocio. Have you been able to set the development environment using local?

Yes, Pablo. Any problem to connect the dev environment.

Thanks

1 Like

Great Rocio!

Keep us posted with your progress! We would love to see what you are building :slight_smile:

To fix this, you can start the node server with an environment variable, for example:

NODE_TLS_REJECT_UNAUTHORIZED=0 npx frontity dev

replace npx frontity dev with whatever command you’re using to start the node server.