Technology Insights

WordPress theme.php – Fatal error: Call to a member function read()

In the process of creating a mirror image of a current WordPress to be used for development purposes I ran into a PHP error that I had not seen before. The current version of WordPress was working without issue but because many of the settings needed to be modified for the installation to work with a different domain pointed to it. Even after modifying the settings that I had modified in previous instances to make WordPress work with an updated domain name I was still getting an error related to the WordPress Theme. I enabled some PHP error logging, started looking for answers on the web, and then implemented some changes described below to resolve the error.