• davestewart

    (@davestewart)


    Hello,
    Just checked my “wp_postmeta” table and it’s chock-full of

    _pingme
    _encloseme

    entries.

    I’m assuming that as I’ve had no comments worth keeping on my blog, that these must be metadata entries that were once connected with comments that I’ve previously marked as spam.

    Is this the case!? Or are they something else?

    If it is the case, the question is – what do I do to remove them!? Is there an option in the Admin section?

    If not, do I need to do an SQL query to delete those entries that don’t marry up with an approved comment, or such like?

    Thanks for the input.
    Cheers,
    Dave

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter davestewart

    (@davestewart)

    Hello,
    No takers for this one?
    Thanks,
    Dave

    Kafkaesqui

    (@kafkaesqui)

    Anything in the postmeta table would be attached to posts, not comments. Hence the name postmeta.

    _pingme and _encloseme entries in postmeta relate to posts where pings and emclosures have not yet been handled (typically, I believe, future-dated posts). When they have the entries should normally be (automatically) removed.

    Thread Starter davestewart

    (@davestewart)

    Aha.
    Well I had well over 300 entries, so it doesn’t look like they are being automatically handled!

    I made the spam connection as my blog gets literally no visitors, but quite a few spambots per day that make comments. Therefore 8 posts x 20 spams x 2 entries (_encme and _pingme) = 320 entries! Is this just a co-incidence?

    I’m new at this WordPress lark so I’m yet to understand exactly what you’re explaining to me. Can you explain what “pings” are “enclosures” are?

    Also, I’m not sure what you mean by “future dated posts”.
    Many thanks,
    Dave

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Pings are when your site notifies other sites about things like, you made a post, or you linked to them, or what have you.

    Enclosures are made when you put something into a post. Specifically, a video or audio link.

    These meta keys are signals to WordPress (from WordPress) that these posts need to be processed for these things. This processing is done by the wp-cron process. In certain cases, wp-cron cannot run properly. There’s a lot of possible reasons that this can happen, and most of them have been documented in great detail on these forums. Try searching for wp-cron and seeing what pops up.

    Thread Starter davestewart

    (@davestewart)

    Hi Otto,
    Thanks for spending some time on my post.

    I read up about pings and understand the idea, but perhaps not the implementation, yet. No matter, I’m sure when the time comes things will be clearer…

    Also, I now understand that cron is a task scheduler, which answers the future posts question.

    However, I still don’t understand WHY I have 337 entries in my postmeta table, so I ran the following SQL command…

    SELECT post_id, meta_key, COUNT(post_id) AS count FROM wp_postmeta GROUP BY post_id, meta_key

    …to count the types of entry for each post_id:

    post_id meta_key count
    3 _encloseme 8
    3 _pingme 8
    4 _wp_page_template 1
    5 _encloseme 28
    5 _pingme 28
    6 _encloseme 6
    6 _pingme 6
    7 intro 1
    7 _encloseme 89
    7 _pingme 89
    8 _wp_attached_file 1
    8 _wp_attachment_metadata 1
    9 _wp_attached_file 1
    9 _wp_attachment_metadata 1
    10 _wp_attached_file 1
    10 _wp_attachment_metadata 1
    11 _wp_attached_file 1
    11 _wp_attachment_metadata 1
    12 _encloseme 15
    12 _pingme 15
    13 _encloseme 7
    13 _pingme 7
    15 intro 1
    15 _encloseme 12
    15 _pingme 12
    16 intro 1
    17 intro 1

    I mean… WHY have I got EIGHT-NINE entries for post 7!! The only person who has really read this post is me (it took a LOT of editing!)

    Are you saying that wp-cron SHOULD be running (and deleting them)? If not (or is broken) should I just go in and delete them myself?

    I really only use WordPress as a CMS, you see.

    Thanks again in advance for your help.
    Cheers,
    Dave

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    You add a new set of those to a post every time you edit it. This is because the scheduled job needs to go over it again. And yes, when it processes those jobs, those get removed automatically.

    And yes, wp-cron.php should be running automatically. The fact that it does not indicates some kind of problem with your server.

    You can manually run wp-cron.php to clear these out. First, edit wp-cron.php and remove or comment out these lines:

    if ( $_GET['check'] != wp_hash('187425') )
    	exit;

    Those are there to prevent it from being run manually. Next, just access it from a web browser:
    https://example.com/blog/wp-cron.php

    It will run and not return anything. If it takes a while, you may want to hit it again after it comes back. When it returns almost instantly, it’s processed everything that it needs to process.

    After you have manually run it, add those two lines back above. They’re there for a reason, leaving them out is not entirely safe.

    Thread Starter davestewart

    (@davestewart)

    >And yes, wp-cron.php should be running automatically. The fact that it does not indicates some kind of problem with your server.

    Thanks Otto for your reply.
    I’ve spoken to tech support and asked if they have some kind of block on automatic processes. They said:

    “We do not have a block on the automatic process the cron job is something you have to setup”

    Anyway – I ran the script as you suggested and it’s worked – GREAT! It took ages though.

    I still need to figure out WHY it’s not running automatically. Does anyone have any ideas?

    Thanks,
    Dave

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘“wp_postmeta” orphaned entries from spammers’ is closed to new replies.