Attempt to assign property post_content on null – Critical WordPress Error

By Dillon Smart · · · 0 Comments

Are you seeing an error when creating new posts or pages in WordPress?

Attempt to assign property post_content on null

A bad database migration likely causes the error.

I have experienced this error when exporting a WordPress database using the database export tool built into PHPStorm through an SSH tunnel to set up a WordPress database in my local development environment.

Learn how to set up MySQL database connections in PHPStorm.

Solved “Attempt to assign property post_content on null”

For myself, the solution was to use another tool, such as DBeaver, to take a backup dump of the remote database and restore the local database with the new MySQL dump.

Follow this tutorial to set up an SSH connection to a remote database in DBeaver.

WordPress

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a custom WordPress taxonomy for posts and pages

Updated 16th August 2022

Sometimes when building a website using WordPress, the standard taxonomies Categories and Tags just aren’t enough, and you need to create more. Let’s learn how to create our own custom WordPress taxonomy. WordPress has made creating your own taxonomy easy, and you can even add your custom taxonomies to pages too. To accomplish this we

2022 PHP Usage Statistics

Updated 16th August 2022

PHP: Hypertext Preprocessor is the most popular language used on the web. Around 77.6% of all websites run PHP in some way as of April 2022. PHP has been the driving force behind the growth of the web, but is it slowly dying? Let’s look at some PHP usage statistics. Why is PHP so popular?

WordPress wp-admin redirects to HTTPS

Updated 18th May 2021

Does your WordPress wp-admin redirect to https rather than http? Below is a simple tutorial to stop this from happening. First, check the siteurl in the wp_options table within your database. Make sure the option_value is your site address with http:// not https://. If your siteurl is set as http:// the try the following. Open