Invalid default value for 'comment_date'

Issue Summary

Not possible to import Wordpress databases without adding SET SQL_MODE=‘ALLOW_INVALID_DATES’; before commands, otherwise I get…

Invalid default value for ‘comment_date’

…and other similar errors for date columns.

Duplication of this ticket Invalid default value for datetime However I think it should be looked into so we don’t have to do this every time.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular? All

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser? Yes


Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

Export a wordpress database from production server using PHPMyAdmin and then try to import into Locals adminer

System Details

  • Which version of Local is being used? 6.3.1+5826

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional

Mac Monterey V12.0.1

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.