Attempt to assign property on null
-
Today I migrated a WordPress installation from one shared webhost to a new one.
At first glance everyting seems just fine. But…
Problem:
When trying to create a new post or page, the following errors occur:Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/post.php on line 7502 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/post.php on line 7503 Warning: Attempt to read property "ID" on null in /www/wp/wp-includes/post.php on line 7507 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/post.php on line 7762 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/theme.php on line 3596 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/theme.php on line 3822 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/post.php on line 5448 Warning: Attempt to read property "ID" on null in /www/wp/wp-includes/post.php on line 5448 Warning: Attempt to read property "post_type" on null in /www/wp/wp-includes/post.php on line 4749 Fatal error: Uncaught Error: Attempt to assign property "post_content" on null in /www/wp/wp-admin/includes/post.php:795 Stack trace: #0 /www/wp/wp-admin/post-new.php(66): get_default_post_to_edit('page', true) #1 {main} thrown in /www/wp/wp-admin/includes/post.php on line 795
Migration steps:
1) Backup FTP
2) Backup SQL (PHPmyAdmin)
3) Update core + plugins + themes
4) 2nd Backup FTP
5) 2nd Backup SQL (PHPmyAdmin)
6) Upload 2nd backup to new shared host
7) Change DNS records
8) Wait and testTroubleshooting steps without success:
- Disable all plugins manually
- Switch to Twenty Twenty-Four theme
- Using “Troubleshooting Mode” via https://www.ads-software.com/plugins/health-check/
- Drop all tables in DB and importing SQL again without “Do not use
AUTO_INCREMENT
for zero values” checked
Might be?
The only real difference I can spot is that the new host is running on PHP v8.2 and the old host was running om PHP v7.4
The new host only allows PHP 8.1 + 8.2 + 8.3, and I have tried them all without luck.So now:
I could use some help please…
WordPress Version 6.4.3
- The topic ‘Attempt to assign property on null’ is closed to new replies.