• Resolved mbecker1234

    (@mbecker1234)


    My website is hosted on godaddy and the version of WP I have is 3.1.1. I first tried to do the automatic upgrade, but kept getting a message saying that I had a permission issue. So I decided to download 3.4 and upgrade manually using the steps found here: Updating_WordPress. I went through step 1 and 1.5. I then went to my upgrade.php and it said I needed to upgrade my database. I then got the error: “Fatal error: Class ‘WP_Theme’ not found in <mywebsite>\httpdocs\wp-includes\theme.php on line 106”. Is there something I did wrong, or a way to fix this?

    Here’s line 106 from theme.php:
    return new WP_Theme( $stylesheet, $theme_root );

    Apparently the class WP_Theme isn’t defined in theme.php, so where is it defined?

    Thanks,
    Matt

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter mbecker1234

    (@mbecker1234)

    Thanks for the link to the 3.4 trouble shooting thread. I saw that the solution posted there is this:

    “Solution: Reinstall WP. The class-wp-theme.php file is included by default. This could only really happen if they get an updated wp-includes/theme.php file but not an updated wp-settings.php file. (Do the manual upgrade if you can’t get into wp-admin)”

    I have already re-installed WP 3 times using the instructions listed and get the same error each time. It stands to reason that it will fail the next time as well. I looked in my fresh download of 3.4 and the class-wp-theme.php is indeed in the wp-includes folder and I verified that the file made it over to my site and is in the wp-includes folder. Is there any other advice that you can give? If re-installing is the only solution, then I’m out of luck.

    Thanks for the quick response, I was worried it’d take long.

    Thread Starter mbecker1234

    (@mbecker1234)

    I just tried to manually include the class-wp-theme.php file into theme.php. “include ‘class-wp-theme.php’;”

    I went back to the update page and tried to update the database again. I got a message that the database was updated successfully. After that though, I got this message: “Fatal error: Call to undefined function get_front_page_template() in <my website>\httpdocs\wp-includes\template-loader.php on line 26”.

    This guy got the same error and went back to 3.1.1 link I’d rather keep going, but I don’t want to add a bunch of code to php files. That shouldn’t be the answer.

    Help me Obi-Wan Kenobi. You’re my only hope!

    Thread Starter mbecker1234

    (@mbecker1234)

    Luckily I can still log into the site, I only receive the error when I actually want to view the site. So I went in and re-verified that all plug-ins were deactivated. I also changed the theme to the Twenty Eleven theme just in case, but I still get the error. “Fatal error: Call to undefined function get_front_page_template”

    It’s a known issue if you haven’t updated the root wp-settings.php file. Try grabbing another download, deleting wp-settings.php in root and just uploading this file.

    Thread Starter mbecker1234

    (@mbecker1234)

    That did it! All I need to do now is put the theme back on (make sure it works with 3.4 of course) and I’m good.

    Thanks for the help!
    Matt

    Thank you esmi! Having lots of issues with this last upgrade and replacing the wp-settings.php file worked, after doing a bunch of the other steps too!
    Much appreciated.

    Want to chime in with a great big THANK YOU to esmi as well. Was searching for a solution and you provided it.

    I’ve tried replacing the wp-settings.php file and I still have the same error. I’ve downloaded a fresh copy of 3.4 but no luck. Any other suggestions.

    I also had the problem again and want to thank Esmi. Though everything worked great for about a day, experiencing trouble and don’t know what I might have done to cause it.

    Currently, the front end of site is still displaying fine, though I am unable to access the dashboard or anything else on the backend with getting the following error:

    Fatal error: Cannot redeclare class WP_Theme in [….] /wp-includes/class-wp-theme.php on line 9

    I’ve tried deleting the file and uploading versions from recent downloads, but to no effect.

    Any help would be appreciated.

    Esmi, your solution worked well. Thank you!

    Glad I could help ??

    Now I get the following – Now what!?!?!?

    Warning: require(D:\Hosting\9342193\html/wp-includes/class-wp-theme.php) [function.require]: failed to open stream: No such file or directory in D:\Hosting\9342193\html\wp-settings.php on line 115

    Fatal error: require() [function.require]: Failed opening required ‘D:\Hosting\9342193\html/wp-includes/class-wp-theme.php’ (include_path=’.;C:\php\pear’) in D:\Hosting\9342193\html\wp-settings.php on line 115

    Please post your own topic.

    How do I do that? I looked all over this site for a spot to start new one. In sure I just over looked it, could you point me in the right directions please.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Upgrade to 3.4 from 3.1.1 Fatal error’ is closed to new replies.