Skip to:
Content
Pages
Categories
Search
Top
Bottom

Find an delete users without topic and or replies


  • dnashif
    Participant

    @dnashif

    Hi everyone,

    My site is: https://standupgirl.com
    bbPess version 2.6.9
    WP version: 6.1.1

    I have over 25000+ users on my site from 22 years ago when we had an active community. Now our site is only resource for information and people can see topics and replies but adding anything new is turned off.

    My question is how to remove all users who have not WP posted, WP commented, created a topic or a topic reply in bulk?

    Or at least where do all the forum data stored?

    Thank you for your help and guidance.

    Diana

Viewing 7 replies - 1 through 7 (of 7 total)

  • wpturk
    Participant

    @wpturk

    Hi Diana,

    you can get this info from mysql DB in case you have access: (ex. via phpmyadmin)

    SELECT user_login FROM wp_users WHERE id not in (SELECT DISTINCT post_author FROM wp_posts) AND id not in (SELECT DISTINCT user_id FROM wp_comments) ORDER BY user_registered ASC;

    You need to change wp_ if you have another prefix for your mysql tables.

    After you’ve checked the list, you can change the sql statement and DELETE.

    I hope this helps.


    dnashif
    Participant

    @dnashif

    Thank you wpturk. I do have access to phpmyadmin but you lost me on the next part. Where or how do I add the information you gave me?

    Sorry, php newbie……..

    Diana


    dnashif
    Participant

    @dnashif

    Will this also find any user who did not create a topic or a reply in bbpress?


    wpturk
    Participant

    @wpturk

    Diana, maybe this link helps you. https://wpengine.com/support/run-query-phpmyadmin/

    In bbpress, topics and replies are kept in wp_posts table, so the above SQL statement lists all users with no replies and no topics. The second part of the statement checks the wp_comments table. Since if a user has no replies & topics in the forum but has a wordpress comment, the user will not be listed, and vice versa.

    Please first also check your table prefix, the SQL statement is for: wp_

    If you still have problems, you can contact me via move2media.com


    dnashif
    Participant

    @dnashif

    Oh my, you are a life saver! Was able to delete 18,000 users. Thank you so much!

    I have one other problem that is related to the forum global search feature. I can submit another ticket if you prefer but here is the issue.

    The search results page has our logo and a long list of our menu items stacked before you can see the search results. Here is a search I did: StandUpGirl Search Results

    This site is a Divi template and I use the divi theme builder to create global header and a mega menu for the items that are showing in the purple background.

    Any ideas for me to fix this?

    Appreciate all you are doing for me.
    Thank you so much!
    Diana


    wpturk
    Participant

    @wpturk

    Diana, you are welcome.

    for your other problem it’s difficult to point the problem without seeing your theme template files. I am not a fan of page builders, so I don’t use it personally, but it looks like your search results are displayed with another theme template than the rest forum pages.


    dnashif
    Participant

    @dnashif

    I think you are right. It is showing as a default wp template.

    I wish BBpress had a shortcode to add to a page for the search results. Seems logical since they have other shortcodes that it would be a no brainer for them to create one.

    Or even function code to put in my child theme functions file. I am not a developer so nothing I can do.

    Seen other people commenting about the search results page. Don’t think BBpress cares though!

    Appreciate your looking at this for me wpturk.

    You are a super hero!

    Diana

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar