Best answer

Automatically delete WordPress user after a free trial

  • 16 May 2023
  • 2 replies

Userlevel 1

Hi, I’m looking for an automation to delete WordPress users. I have a membership site that uses MemberPress. I’m offering a free 7-day trial period, and I want to automatically delete user accounts if they do not continue to a paid subscription. I don’t see a direct MP → WP Zap that will do that, so I’m interested to know if there is any workaround, for example by using an intermediate app such as Google Sheets. Any advice much appreciated :) 


Best answer by Danvers 16 May 2023, 19:29

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @MJC!

There isn’t an action for the Zapier WordPress integration that would allow you to delete a user ‘out of the box’. There is a way that you can delete a user in WordPress using Zapier, but it’s a bit more of an advanced step. 

Zapier has a new feature that allows you to make custom requests to APIs for some apps. This means that if you need an action that’s not already in an app, you may be able to build it. WordPress is an app that supports custom API requests and looking at the WordPress API, it is possible to use the API to delete a user. 

If you’re familiar with API’s, here’s a link to the relevant section of WordPress’ API documentation. And here are a couple of Zapier help docs on how the action works in Zapier: 

Make Raw http requests with API actions

Create an API request in your Zaps


If you’re not and aren’t sure where to start, let us know if you’d like to give this a try yourself (and if so what your level of technical knowledge is) or if you’d like to pay someone to help you with this. 


If you do use the WordPress custom API request to delete the member in WordPress, you could build a Zap that looks like this:

  1. MemberPress  - Subscription Created
  2. Delay by Zapier - Delay Zap for 7 days
  3. MemberPress - Find Member
  4. Filter by Zapier - only continue if the member hasn’t paid
  5. WordPress - Custom API request 

I haven’t tested the MemberPress Find Member action, so do look at that to see if it includes the payment information you need. 


I hope that’s all clear, let us know if you have any questions!

Userlevel 1

Thanks Danvers, that’s very helpful. It’s good to have a roadmap, I’ll explore those links further ;)