WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Solution for posts suddenly appearing in reverse order (15 posts)

  1. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Many people have had problems with their posts suddenly appearing in reverse order. These mostly happen with older versions of WordPress, but even the latest version can display this issue with some themes and/or plugins. Sidebar lists of posts can suddenly show the first posts made on the blog instead of the most recent.

    This problem is caused by a bug in MySQL version 5.0.51 (potentially other versions as well). Unfortunately, many hosting providers have recently decided to upgrade their database systems and chose this version. Newer versions of MySQL have fixed this bug.

    Fixes:

    For people running older versions of WordPress, upgrade to the latest version. Newer versions are not as susceptible to this issue, however certain edge cases will still exhibit the problem.

    For people running the latest version of WordPress, talk to your host and convince them to upgrade MySQL to a newer version. Again, this is a bug in the version of MySQL they are using, it is not a WordPress specific problem, and it will likely not be "fixed" by WordPress. WordPress is doing the right thing, that bug in MySQL is causing the bad ordering.

    If you need to convince them that it's a MySQL problem, tell them to come here. Or just tell them to read this webpage, which details the problem in MySQL:
    http://bugs.mysql.com/bug.php?id=32202

  2. hormart
    Member
    Posted 6 years ago #

    Otto42,

    how about using a custom query string or string parameters in query_posts()? Wouldn't this be a solution?

  3. jackiedobson
    Member
    Posted 6 years ago #

    That's what's known as a workaround as it doesn't solve the cause of the problem.

  4. mindfeck
    Member
    Posted 6 years ago #

    Would switching to a SQL 4 table solve the problem?

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    mindfeck: Possibly, but WordPress is upping the ante in that respect. The requirements for MySQL versions are going up in the new version of WordPress. So really, you want to be running MySQL 5 or 6, but you want to be running a version without this bug.

    The real solution is to pester your host about it. If they won't fix it, then switch to a new host. Also, post about hosts that won't fix their problems in this forum, so we know not to recommend them and to tell people to avoid them. Tell them that you're doing so too. Life is too short to deal with bad hosts.

  6. MichaelH
    Member
    Posted 6 years ago #

    Had heard that WordPress 2.5 would require PHP 4.3 but what version of MySQL will be required?

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Ah, my bad. I thought it was upping the MySQL version, not the PHP version. Sorry, got those confused there.

  8. missylovely
    Member
    Posted 6 years ago #

    I have tried to fix this problem for weeks now. Finally done upgrading WordPress as I was told by my host that this will fix the problem. But the problem remains the same. I checked MySQL and its v.4.0.27. So all I gotta do now is to ask my host to upgrade MySQL?

  9. missylovely
    Member
    Posted 6 years ago #

    Actually, I just contacted my host and they said MySQL is version 5, eventhough it says V 4.0.27 on vdeck....o...k....so what's next? I am still have the same problem. Someone please help !

  10. gummybear
    Member
    Posted 6 years ago #

    Can someone PLEASE post the workaround? Upgrading MySQL and Php on servers is NOT a solution. It's a huge hassle for yourself and your webhost to upgrade the infrastructure and takes a lot of time. It's like someone having trouble with their laptop, solution: buy a new laptop! Great!

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Okay, I'm going to try to make this perfectly clear:

    There is no workaround.

    Upgrading MySQL to a non-buggy version is the only solution.

    MySQL is doing the wrong thing in this case. WordPress asks the MySQL database to give the posts back to it in descending order by date/time. MySQL then fails to do this because that version of MySQL had a bug.

    Therefore, there is no fix WordPress can do. There's no workaround. MySQL is doing it wrong. WordPress cannot fix a problem in MySQL, and it cannot "work around" a problem when MySQL gives it the wrong posts entirely.

    YOUR HOST MUST UPGRADE TO A NON-BROKEN VERSION OF MySQL.

    It's as simple as that.

  12. Maciej Ku? (maciekkus)
    Member
    Posted 6 years ago #

    What about comment from Kolbe Kegel on http://bugs.mysql.com/bug.php?id=32202

    [7 Feb 23:25] Kolbe Kegel
    This can be worked around by simply removing the GROUP BY clause. Using GROUP BY on a
    unique index (a Primary Key, of course, is a unique index) is pointless as each row will
    by definition be its own group.

    Maybe changing a way wordpress queries mysql will fix a problem?

  13. howiebar
    Member
    Posted 6 years ago #

    My WordPress blog just started doing this (reverse order)yesterday (2-27-08) after seven months of no problems. My host (IPower) completed server transfer last week but said they did not change MySQL since last summer. They're V.45 which is below .51 i asked if they would update to a version above .51 in the near future and they said they had no plans.

    I upgraded to WordPress 2.3.2 yesterday, with no change.

    As a user not too technically adept when it comes to involved manipulation of files, is there ANYTHING I can do?

    My blog is at http://howiebarte.com/WordPress

    Thanks for any assistance. My email is natca1@cox.net

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Maybe changing a way wordpress queries mysql will fix a problem?

    No, because the GROUP BY clause (in the cases where it is used) is necessary to prevent duplicates of posts from showing up in the results. This is due to the joins used when you specify specific categories.

    Not every query WordPress makes uses a GROUP BY, and the reason that upgrading WordPress to the latest version fixes some of these cases is because changes were made to remove the GROUP BY in all the appropriate places. This was done because it's faster that way, so this is a sort of side benefit.

  15. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    My WordPress blog just started doing this (reverse order)yesterday (2-27-08) after seven months of no problems. My host (IPower) completed server transfer last week but said they did not change MySQL since last summer.

    Then they lied to you, didn't they?

    They're V.45 which is below .51

    No, they're not. They need to check again.

    i asked if they would update to a version above .51 in the near future and they said they had no plans.

    Host won't fix their problem? Demand a refund and then switch hosts. Next time, pick a web host that is willing to do what it takes to help their customers.

Topic Closed

This topic has been closed to new replies.

About this Topic