Can paid memberships be tested on a local installation

Hello! I’ve been hunting around to see if there is a recommended way for creating paid members in a local installation for testing purposes and theme development. The documentation for Ghost is really solid but I’m not having any luck finding this so far.

Is there a way to change the permissions for a user to paid-members only using Ghost-CLI or some other method?

Thanks in advance for the help Ghost community.

2 Likes

Is there any issue with upgrading the member using a complementary subscription? Also, you can connect with Stripe in “test mode”, where there’s a hardcoded list of valid cards and no money is actually spent

Thanks so much for the quick response. :grin:

Perhaps connecting Stripe in test mode is what I need. It doesn’t look like I can set up Stripe though without adding an SSL to my local installation though? Or at least not without doing something on the backend.

If anyone has set up Ghost + Stripe in test mode before, I’d appreciate any tips y’all are willing to share.

Doesn’t look like SSL can be set up on a local install without an nginx config. Fun times.

1 Like

This is a little older but might be helpful? Stripe checkout not working in local development installation - #4 by GBJsolution

1 Like

Oooo. That could indeed by handy. I’m currently trying the approach mentioned here:

Still haven’t figured this out. Just going to note that this article looks promising and has a good example for a Node server (which is what I guess Ghost is running on?). Gonna go dig around the ghost directories some now.

Hi @vossisboss.

I was just recently discussing that with Ghost(Pro) because I need to upgrade my site with Stripe and Membership and I couldn’t find a simple way to do it on my local development.
They’ve said that one can create multiple free accounts on Ghost(Pro) in succession and they won’t be frowning. The only thing to remember is not to let the free version expire. If you close the free account yourself you can open a new one immediately, but if you let it expire there is a waiting period you need to respect before creating a new one.

Mind you, I still didn’t test this free account trickery, but hopefully, will soon.

Yeah, this is the same answer I got and it seems to be the simplest way to go about it. Hopefully the process for exporting and uploading data from one site to another will be relatively simple.

Thanks for all the help everyone!

Hi @vossisboss – Thank you for starting this thread! I’m a bit confused with this accepted answer though. I have the same question you do: I wish to set up subscription tiers on my local Windows WSL2 install of Ghost but am seeing the SSL required message on the Membership page.

This is purely for dev purposes so I can customize my theme to show different parts of my site accordingly depending on who’s logged in on what tier.

So, two questions:

  1. How does creating more free Ghost(Pro) accounts help you with this? I don’t think I’m following? :thinking: For example, on my PROD ghost site, I have set up a staff-only tier:

Now on my local Ghost install, I want to customize my theme to only show certain pages to this staff-only tier. How are you emulating a paid tier member on your local install? I did see you found some "install SSL on your local machine" docs but is there any way to emulate tiers without doing that on your local machine?

  1. Do you know the context that gets you member info for a logged-in member? ie. I see contexts that are available here. But I don’t see a logged-in user context?

Thank you in advance! :pray:

So I didn’t emulate a paid membership tier in my local instance. There is currently no recommended method for creating a local instance with SSL that actually works with Ghost. All the methods I found seemed to involve mucking around with more server settings than I wanted to deal with and I couldn’t find a good working example to start from. My project wasn’t public yet anyway so I just tested and troubleshooted the theme live on my Ghost Pro production instance.

The reason behind the whole signing up for another free trial account idea is that if you create another free trial account with Ghost Pro, you can upload a copy of your data and your theme onto that new instance for testing rather than going through all the faff needed to set up SSL and Stripe testing on your local instance. Of course, it’s up to you to remember to cancel it before they charge you.

This is not ideal, and it seems like Ghost knows this is a gap in their developer experience for creating user experiences for paid subscribers. One other tool that their support folks suggested for testing with SSL locally was Caddy Server. I haven’t tried it yet and I don’t know how useful it is for Windows, but it might be worth a look to see if that would help you get past the SSL restriction.

If you come up with something that works, do come back and share it!

1 Like

@vossisboss Ah, okay-- understood. Thank you for replying! Yes, the current local dev setup with tiers does seem a bit suboptimal. Thank you for explaining the "multiple Ghost(Pro) trials" approach though; I get it now.

I’m still fairly new to Ghost but I’ll keep poking around to see what I can figure out. I’ll definitely update this thread again if I discover something new! Thanks again for helping!