WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function get_option() in /w (19 posts)

  1. SRD75
    Member
    Posted 1 year ago #

    After running the automated upgrade to 3.4, I receive the message
    Fatal error: Call to undefined function get_option() in /.../wp-admin/admin.php on line 32

    I have renamed plugins/ to plugins2/, renamed themes/ to themes2/, created themes/ and placed twentyten in there.

    Still fails with same error.

    I have downloaded a copy of 3.4, and uploaded /wp-admin and /wp-includes.

    Still fails with the same error.

    Why is WordPress so flaky with upgrades?

  2. RichardWPG
    Member
    Posted 1 year ago #

    Try:
    - switching to the Twenty Eleven theme by renaming your current theme's folder inside wp-content/themes and adding "-old" to the end of the folder name using FTP or whatever file management application your host provides.

    - resetting the plugins folder by FTP or phpMyAdmin.

    - re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress.

    - running the upgrade manually via wp-admin/upgrade.php

  3. SRD75
    Member
    Posted 1 year ago #

    I've done the first three already.

    When I try the last, I receive:

    "Fatal error: Call to undefined function timer_start() in /.../wp-admin/upgrade.php on line 20"

  4. SRD75
    Member
    Posted 1 year ago #

    I have several sites down caused by this upgrade error.

    I believe the original error may be caused by WordPress not detecting that the database upgrade has completed.

    Line 32 of /wp-admin/admin.php is:
    if ( get_option('db_upgraded') ) {

    I tried manually inserting this option set to true in the wp_options table in phpmyadmin, but the same error remains.

    Can I please receive some assistance, because this is impacting many sites installed in a WordPress network.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress.

  6. SRD75
    Member
    Posted 1 year ago #

    As I stated in the first post, I have already done this.

    I've done this a second time and the issue remains.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    You appear to be still missing some files. Try again.

  8. SRD75
    Member
    Posted 1 year ago #

    Done for the third time.
    (downloaded another copy).

    Error remains.

  9. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Are you deleting the wp-admin & wp-includes folders? Or just over-writing them?

  10. SRD75
    Member
    Posted 1 year ago #

    Deleting them.

  11. SRD75
    Member
    Posted 1 year ago #

    I found some files in the root directory which had a file size of 0 bytes.

    Re-uploading these files solved the error message in the first post.

    However, in the dashboard, I now receive the error:

    ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.

    This error is not logical, as the themes directory is not empty, and does exist.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    What's in it?

  13. SRD75
    Member
    Posted 1 year ago #

    13 themes, plus index.php

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Do you have a pre-upgrade database backup?

  15. SRD75
    Member
    Posted 1 year ago #

    Unfortunately not.

  16. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try renaming wp-content/themes to wp-content/themes-old. Then create a new folder called themes inside wp-content and move all of the individual theme folders across one-by-one - starting with twentyeleven.

  17. SRD75
    Member
    Posted 1 year ago #

    I don't know why, but the error is gone now.

    Thank you for your help and assistance.

  18. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    You're welcome. :-)

  19. missingitaly
    Member
    Posted 1 year ago #

    I have precisely the same issue except that the warning comes and goes. Sometimes, it seems to "see" the themes folder and other times it does not. I thought it was only on initial login but it has presented at other random times as well.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags