• I have 13 post I can’t delete inside wordpress admin page. They are Null, No title, no info what so ever. they don’t have a check box next to them in the post list. I have 13 post in phpmyadmin under post that have post ID 0. (which i am assuming are the null post with in admin page)

    How do I delete them from database? (no drop, or delete with in phpmyadmin database for individual post)

    This issue is little more advanced then my current knowledge.

Viewing 2 replies - 1 through 2 (of 2 total)
  • First of all: Export the current database to your own computer as a backup. If anything goes wrong, then this can help you.

    If we’re talking about just 13 posts, then you could just select them in PHPMyAdmin and delete them, even without writing any SQL statements.
    Note that there is probably also corresponding entries in table postmeta.

    Hmm. But before you delete, have a look at these posts’ content directly in PHPMyAdmin. Perhaps there is some text there that you want to save somewhere.

    Now, obviously, you can do this by SQL, too.

    Start off by writing something like:
    SELECT * FROM _____posts WHERE ‘post-id’ = 0
    You need to give the correct name of the table, it will probably have some kind of prefix.
    And I’m not 100% sure that post-id is named exactly that way (and too lazy to fire up PHPMyAdmin and look…)

    When the SELECT statement gives exactly the lines you expect, then just edit the keyword SELECT into DELETE and execute.

    Next, you’d want to do the same for postmeta.

    Thread Starter jhinkemeyer

    (@jhinkemeyer)

    if anyone runs in to this issue in future. if your delete, edit, options are missing saying tables are not unique. You just need to create a new colume label it something like “id seq”. INT and check AI (which creates sequence makeing everything unique) Make it primary

    Now your check boxes will come back and you can delete the post.

    • This reply was modified 4 years, 8 months ago by jhinkemeyer.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database has Post ID 0. website has some post can’t delete’ is closed to new replies.