Hi folks,
The other post is locked so I couldn’t comment, but I wanted to share the solution here.
The timestamp error is caused by using an older version of PHP (less than version 8). To fix this, you need to use an 8+ version of PHP on your WordPress website when exporting the contents.
opened 06:45PM - 04 Jun 22 UTC
closed 11:28AM - 19 Jul 22 UTC
Generating an export file for Wordpress running on PHP 7 (which is the default f… or WordPress.com accounts) results in an invalid date format because the use of `p` in [the date format code](https://github.com/TryGhost/wp-ghost-exporter/blob/3ccbda07f85248e75c0537608c431608ccf1feb2/class-ghost.php#L62) was only added in PHP 8.0. This will result in the error "Post: Date is in a wrong format and invalid. It was replaced with the current timestamp." when importing into Ghost.
The PHP version can be changed in the WordPress.com Hosting Config, but it may be a good idea to add a warning somewhere about this.
Hope this helps folks!
2 Likes
system
Closed
October 1, 2022, 7:39am
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.