I have run into a problem where I can no longer create new posts on my Wordpress site.
I think this started after a Wordpress update a while ago. I also have problems uploading images and I see ghost comments (an icon about new comments but no comments actually showing up in the list).
When clicking on "Posts > Add new" I get a white page with this warning:
"Warning: Creating default object from empty value in /public_html/wp-admin/includes/post.php on line 716"
This is line 716:
$post->post_content = (string) apply_filters( 'default_content', $post_content, $post );
After searching online I think these issues are related to my database. I'm new to dealing with databases, so I'm hoping to maybe be able to get some help here.
Things I've tried:
- Using a standard theme
- Disabling all plugins
- Updating Wordpress
- Downgrading to Wordpress 4.0
- Repairing the database tables
- Running health check I found out that the SQL is old (5.5.52-MariaDB-cll-lve). Could this be relevant?
- Checked the AUTO_INCREMENT box in phpMyAdmin for "wp_posts > structure > ID" and "wp_postmeta > structure > idmeta_id"
The auto_increment helped remove the error, but instead it caused some new problems. I activated it and could click "Posts > Add new". However, Wordpress created multiple copies of the same post, around fifteen posts instead of just one. I trashed them and tried to create a new post, but it still remembered the trashed post and tried to recreate a new post from the post in the trash.
Links I've checked and tried:
- https://wordpress.org/support/topic/creating-default-object-from-empty-value-of-line-639-wp-adminincludespostphp/
- https://wordpress.org/support/topic/shoud-wp_posts-id-and-wp_post_meta-meta_id-be-auto_increment/
I feel like this could be relevant as well, but I'm not sure how to make use of it: