Title: Can WordPress database timedate be null?
Last modified: November 4, 2023

---

# Can WordPress database timedate be null?

 *  Resolved [ckaiser3](https://wordpress.org/support/users/ckaiser3/)
 * (@ckaiser3)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/)
 * I’m upgrading the MySQL on my server to 8.0 from 5.7.4 and testing is giving 
   me this warning :
 * column has zero default value: 0000-00-00 00:00:00
 * Can I set the timedate default to NULL or current_timestamp or will that affect
   the database? Thanks. I’m a complete noob at this, but trying to find help from
   somewhere.
 * Craig

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/#post-17174924)
 * Yes, timedate default is 0000–00-00. See [https://codex.wordpress.org/Database_Description](https://codex.wordpress.org/Database_Description)
 * I do not recommend changing the database setup.
    -  This reply was modified 2 years, 7 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [ckaiser3](https://wordpress.org/support/users/ckaiser3/)
 * (@ckaiser3)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/#post-17174969)
 * Thanks. The reason I asked is that the upgrade checker utility for upgrading 
   to MySQL 8.0 flagged that as a warning because MySQL 8.0 is by default, in strict
   mode and if the timedate column in the tables are left at 0000–00-00, it may 
   cause problems with the database when upgraded and I can’t take chances with 
   that. The MySQL documentation suggests as one solution, to set that to a value
   of either NULL , or a numerical value. There is an option to set it for current_timestamp,
   and I wondered if setting that value to either NULL, or current_timestamp would
   cause issues with the database. So you are saying that I can change that value
   to NULL, or current_timestamp and it will be ok? Either of those values removes
   the warning in the upgrade checker utility report.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/#post-17174973)
 * I’m saying to ignore what MySQL i s saying and leave the database as it is. It’s
   what WP is expecting and works just fine with MariaDB 10.
 *  Thread Starter [ckaiser3](https://wordpress.org/support/users/ckaiser3/)
 * (@ckaiser3)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/#post-17174992)
 * Ah, ok, thanks. That’s what I was most worried about. You’ve been very helpful.
   Thanks. I use WooCommerce also, so now I have to find out if it will impact that
   at all.
   Actually, I just realized that WooCommerce creates tables in the WP databases
   so it should not be a problem, I don’t think.Craig
    -  This reply was modified 2 years, 7 months ago by [ckaiser3](https://wordpress.org/support/users/ckaiser3/).

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

The topic ‘Can WordPress database timedate be null?’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 2 participants
 * Last reply from: [ckaiser3](https://wordpress.org/support/users/ckaiser3/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/can-wordpress-database-timedate-be-null/#post-17174992)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
