Results 1 to 10 of 10

Thread: Database Issue? How to Fix?

  1. #1
    DebNCgal's Avatar
    DebNCgal is offline Hello World
    Join Date
    Feb 2009
    Location
    Lewisville, NC (USA)
    Posts
    9

    Default Database Issue? How to Fix?

    Hello, I've been using WordPress for only about a year. I've run across a few issues that I don't know how to solve. I'm hoping they won't be hard to fix.

    ISSUE #1:
    What do you do if a name you want to use for a page LINK brings up an old defunct page with info you don't want to use? For instance, I eventually had to tack a "2" onto one particular page link in order to be able to set up the page as desired, for example:

    Code:
    http://domain.com/topic2
    If I remove the "2" from the example "Topic" page link above, it brings up an old defunct page. Even if I insert entirely new content into that old page, once I save it, the old page info is displayed once again. Is there an easy way to get rid of the old page info and be able to use the above link without the "2" in it? (I actually have TWO pages where this is happening.)

    ISSUE #2:
    What do you do if, when clicking on a particular category link brings up posts from another category? (However, when I click on the link for the other category, those results are correct.)

    I wonder if the fixes for these two issues involve delving into the database — which I've not done before. If that's the case, I hope it's not too daunting! If it makes a difference, my web host (BlueHost) uses cPanel.

    Any help will be much appreciated. Thanks.

    Deb
    Deb Phillips
    The Photo Gal

  2. #2
    itsananderson's Avatar
    itsananderson is offline Big Tipper
    Join Date
    Jan 2009
    Location
    Terre Haute, IN
    Posts
    354

    Default

    I think the best way to fix your first issue is to delete the "old defunct page". If you do that it should bring up your new WordPress page.

    I'm afraid I'm not sure about the second one. Do you have posts in multiple categories maybe?

  3. #3
    DebNCgal's Avatar
    DebNCgal is offline Hello World
    Join Date
    Feb 2009
    Location
    Lewisville, NC (USA)
    Posts
    9

    Default

    Regarding Issue #1, I'm afraid that old defunct page is not listed so, unfortunately, it can't be outright deleted.

    Regarding Issue #2, I only assign one category to each post.

    Thanks for giving this a stab! I wish the answers to these issues were more obvious!
    Deb Phillips
    The Photo Gal

  4. #4
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    I;d hunt it down in the database and delete it there. If it's not there, then it's a browser issue.

  5. #5
    itsananderson's Avatar
    itsananderson is offline Big Tipper
    Join Date
    Jan 2009
    Location
    Terre Haute, IN
    Posts
    354

    Default

    ahh, I thought you were talking about something else with the first problem. If its not showing up in your list of pages but you still can't use that name, you could use a DB query to remove that post.

    in cPanel, go to phpMyAdmin. Find the "SQL" tab.

    In the text area, put this code (you'll need to modify it a little, to delete the posts you want).

    Code:
    DELETE FROM wp_posts WHERE guid = 'topic'
    Now if you chose a different prefix than "wp_" when you installed, you might need to replace "wp_posts" with "prefix_posts" where "prefix_" is whatever prefix you used.

    also, replace the 'topic' with the slug of whatever page you want to completely delete.

    As wpbot would say it "I have completely espounged 'topic' from my memory".

    Hopefully that will fix it :D


    I'm still not sure about the second one. sorry.

  6. #6
    DebNCgal's Avatar
    DebNCgal is offline Hello World
    Join Date
    Feb 2009
    Location
    Lewisville, NC (USA)
    Posts
    9

    Default

    itsanderson, As far as Issue #1, your answer is so specific, I can follow it! But for clarification, let me ask: Will the code you provided work for a static "page" and not only a post, since I see the code includes the term "wp_posts"?

    As far as Issue #2, maybe someone will come a long to offer some input on it.

    andrea_r, the issues persist regardless of browser, even after clearing the cache and restarting. I'm basically very green, when it comes to getting around the database...so at least for now, I have to be given some details on how to proceed!

    Thank you both.
    Deb Phillips
    The Photo Gal

  7. #7
    itsananderson's Avatar
    itsananderson is offline Big Tipper
    Join Date
    Jan 2009
    Location
    Terre Haute, IN
    Posts
    354

    Default

    Quote Originally Posted by DebNCgal View Post
    itsanderson, As far as Issue #1, your answer is so specific, I can follow it! But for clarification, let me ask: Will the code you provided work for a static "page" and not only a post, since I see the code includes the term "wp_posts"?
    Sorry, I should have mentioned that. WordPress stores both Pages and Posts in the same table (namely wp_posts). When you think about it this makes sense. They really have a lot in common.

  8. #8
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    Wil has the right stuff there, nice clear instructions. :D

  9. #9
    DebNCgal's Avatar
    DebNCgal is offline Hello World
    Join Date
    Feb 2009
    Location
    Lewisville, NC (USA)
    Posts
    9

    Default

    Thanks for the additional clarification, itsananderson (I see I misspelled your username earlier). Most appreciated. I'll give this a try...and report back. Thank you!
    Deb Phillips
    The Photo Gal

  10. #10
    DebNCgal's Avatar
    DebNCgal is offline Hello World
    Join Date
    Feb 2009
    Location
    Lewisville, NC (USA)
    Posts
    9

    Default

    I just tried running separate queries to remove two old defunct pages. The query results for both were:

    Deleted rows: 0 (query took 0.0498 sec)

    The pages still exist. Would it matter that these pages are in child pages? If so, where the code referred to "topic" should it be:

    "parent_page/topic" ... or something else?

    Thanks.
    Deb Phillips
    The Photo Gal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •