Title: Problem order post
Last modified: August 19, 2016

---

# Problem order post

 *  [max299](https://wordpress.org/support/users/max299/)
 * (@max299)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/problem-order-post/)
 * Hello I use wordpress 2.5.1 with a theme.
    My problem is: I view as first older
   post and latest post go to behind.
 * I read that is a mysql 5.0.51 bug, but my provider can’t upgrade their database.
 * Can I change wordpress code to solve this problem, I don’t know what procede.
 * sorry for my english
    thanks

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

 *  [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/problem-order-post/#post-753700)
 * `<?php query_posts('order=DESC') ?>` will show the posts with the most recent
   posts at the top.
 * `<?php query_posts('order=ASC') ?>` will show the posts with the oldest post 
   at the top.
 * Place the code before The Loop i.e. before `<?php if (have_posts()) : ?>`
 * Is that what you’re looking for?
 *  Thread Starter [max299](https://wordpress.org/support/users/max299/)
 * (@max299)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/problem-order-post/#post-753707)
 * sorry 🙁
    in which file I change this value?
 *  Thread Starter [max299](https://wordpress.org/support/users/max299/)
 * (@max299)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/problem-order-post/#post-753710)
 * I try to change this value but I read that this is a mysql 5.0.50 bug
 *  [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [18 years ago](https://wordpress.org/support/topic/problem-order-post/#post-753945)
 * If you’re talking about index page, then index.php
 * If the problem is with a category page, then category.php
 * Sorry I can’t help any more, but a link to the site or using the pastebin might
   make it clearer
 *  [ivovic](https://wordpress.org/support/users/ivovic/)
 * (@ivovic)
 * [18 years ago](https://wordpress.org/support/topic/problem-order-post/#post-753946)
 * yeah, there is a bug with certain versions of mysql which results in reversed
   behaviour when setting the sort order.

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

The topic ‘Problem order post’ is closed to new replies.

## Tags

 * [mysql5](https://wordpress.org/support/topic-tag/mysql5/)
 * [old post](https://wordpress.org/support/topic-tag/old-post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [ivovic](https://wordpress.org/support/users/ivovic/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/problem-order-post/#post-753946)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
