WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just created a custom WP CMS and am having trouble with the custom post maintaining the correct order on the front-end. In the back end the date order is correct but is not being reflected on the front-end in the same order. When I download the DB to my local machine, the order is right but once on the server, it shows up differently?

share|improve this question
Check for differences in your local environment vs your remote environment? – SickHippie May 25 '12 at 18:36
I've seen this before. It was something funky with server timezone settings and/or the timezone set on the server or within PHP. (It was in just some custom CMS I wrote and on DB upload all the times were wrong, didn't bother to fix it as all times were just out by a few hours but all the times were out by the same amount) – Barry Carlyon Jul 15 '12 at 17:28

WordPress uses the date_default_timezone_set() function to set the server timezone. This is based on the timezone offset setting under Settings->General.

Check your setting to make sure it matches your timezone at: http://yourdomain.com/wp-admin/options-general.php

If changing your timezone via the setting doesn't work, there's probably nothing you can do to change this without touching your server configuration. You need to speak to your host and have them set your server timezone to the correct offset.

If you have access to your php.ini file, search for the following setting and set your timezone:

date.timezone = “”

Hope this helps you out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.