That error happens because MySQL 5.7+ (and MariaDB 10.2+) with sql_mode including NO_ZERO_DATE or STRICT_TRANS_TABLES no longer allows default datetime values like '0000-00-00 00:00:00'.
SET GLOBAL sql_mode = '';
SET SESSION sql_mode = '';
Discover and enjoy a wide range of IT solutions designed to make your digital experience smoother, faster, and more efficient. From software tips to troubleshooting guides, find everything you need in a place. Stay updated, stay secure, and enhance your tech skills with reliable, user-friendly information and resources.
That error happens because MySQL 5.7+ (and MariaDB 10.2+) with sql_mode including NO_ZERO_DATE or STRICT_TRANS_TABLES no longer allows default datetime values like '0000-00-00 00:00:00'.
SET GLOBAL sql_mode = '';
SET SESSION sql_mode = '';
UPDATE wp_options SET option_value = REPLACE(option_value, 'old-domain.com', 'new-domain.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'old-domain.com', 'new-domain.com'');
UPDATE wp_posts SET guid = REPLACE(guid, 'old-domain.com', 'new-domain.com'');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'old-domain.com', 'new-domain.com'');
-----Check if your uploads URL setting is wrong-----
SELECT * FROM wp_options WHERE option_name = 'upload_url_path';
UPDATE wp_options SET option_value = 'https://old-domain.com/wp-content/uploads' WHERE option_name = 'upload_url_path';
wp-config.php
define('WP_HOME', 'https://new-domain.com');
define('WP_SITEURL', 'https://new-domain.com');