WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Upgrade to 3.4 from 3.1.1 Fatal error (21 posts)

  1. mbecker1234
    Member
    Posted 2 years ago #

    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

  2. esmi
    Forum Moderator
    Posted 2 years ago #

  3. mbecker1234
    Member
    Posted 2 years ago #

    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.

  4. mbecker1234
    Member
    Posted 2 years ago #

    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!

  5. mbecker1234
    Member
    Posted 2 years ago #

    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"

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    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.

  7. mbecker1234
    Member
    Posted 2 years ago #

    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

  8. Lee_Elliott
    Member
    Posted 2 years ago #

    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.

  9. AlisonMooreSmith
    Member
    Posted 2 years ago #

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

  10. azrazrback
    Member
    Posted 2 years ago #

    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.

  11. tomdmeyer@gmail.com
    Member
    Posted 2 years ago #

    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.

  12. Dr_Shadow
    Member
    Posted 2 years ago #

    Esmi, your solution worked well. Thank you!

  13. esmi
    Forum Moderator
    Posted 2 years ago #

    Glad I could help :-)

  14. wendygambone
    Member
    Posted 2 years ago #

    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

  15. esmi
    Forum Moderator
    Posted 2 years ago #

    Please post your own topic.

  16. wendygambone
    Member
    Posted 2 years ago #

    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.

  17. esmi
    Forum Moderator
    Posted 2 years ago #

  18. navywebmaster
    Member
    Posted 2 years ago #

    Many thanks esmi for your advice on this matter. Replacing the wp-settings.php in root resolved this issue for me.

  19. amigliora
    Member
    Posted 1 year ago #

    Hi, I was thru the same problem Fatal_Error after the upgrade from 3.1 to 3.4.1
    I follow instructions here, and after change the wp-settings.php I've got control again from wp.
    Issues:
    1 - I can't find everything I did last night :(
    2 - When I am clicking in themes on the left bar tool, I am having another error, "Fatal error: Class 'WP_Theme' not found in /home/amxsoxx/public_html/wp-includes/theme.php on line 69"

    Did I lost all my work?
    My system is now unstable?
    How can I check that everything is ok?

    Thanks for your help

  20. SerenityLodges
    Member
    Posted 1 year ago #

    Hi,

    I tried to upgrade my colorway theme from 1.7.8 to 2.2 and got a fatal error in line 11.

    This is the message i am getting anytime i try to get into my admin-wp page.

    Fatal error: Call to undefined function wp_get_theme() in /srv/disk3/843631/www/serenitylodgesdominica.com/wp-content/themes/colorway/functions/theme-options.php on line 11

    Is there anything i can do.

    Please help.

    Thanks,

    Carina

  21. esmi
    Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic