WordPress.org

Support

Support » How-To and Troubleshooting » Fatal error: Call to undefined function get_home_path()

Fatal error: Call to undefined function get_home_path()

  • Hey,
    I tried to update my WordPress to the newest version today and probably didn’t think that through. Something obviously didn’t go the way it was supposed to. Anyway, whenever I’m trying to get to the Dashboard now, the system returns
    Fatal error: Call to undefined function get_home_path() in wordpress/wp-admin/includes/misc.php on line 128

    Line 128 in misc.php is the following:
    $home_path = get_home_path();

    Any way to repair the damage, or do I have to roll back to my saved copy of all the files and hope for the best?

Viewing 15 replies - 1 through 15 (of 23 total)
  • Had the same issue.
    If one of your updated plugins was ┬╗BackUpWordPress┬ź, you should remove/deactivate it. Seems that with recent version something is broken.

    Chris, I’m the author of BackUpWordPress, was issue you we’re seeing? I’m not aware of anything being broken in the latest version (2.1).

    BackUpWordPress doesn’t call get_home_path(), that function is a built in WordPress function.

    lttb I’d recommend renaming your wp-content folder to force all your plugins and theme to deactivate and then see if you can access your site then. If so activate your plugins one at a time until the error appears.

    Joe Hoyle

    @joehoyle

    Human Made

    Tom: Didn’t we also see this happen today with a site with backupwordpress / wpremote plugin on?

    I only get the same weird Fatal errors in my error.log of nginx after the update of the plugin, and it was only this single plugin, nothing else changed.

    When I grep for the method in your plugin I see a function with same name defined by HM_Backup.
    I guess it is somehow related.

    I definitely can’t activate the plugin without having a blank blog / errors in the log.

    Seemed to be caused by the update to the backup plugin.
    I can’t access my website at all – here’s my error code:
    Call to undefined function get_home_path() in /home/ecowater/public_html/peggingparadise.com/blog/wp-admin/includes/misc.php on line 128

    Ah wait a minute,

    Backupwordpress does include misc.php to get access to the got_mod_rewrite function, maybe it’s including it in places where get_home_path isn’t defined.

    I’ll do some more digging.

    If your site is fatal error’ing, connecting via FTP and renaming the plugin should bring it back.

    Found the other plugin which dislikes version 2.1 of BackUpWordPress: it’s called OpenSearch.
    Interestingly you changed something (in the global scope?) that the OpenSearch plugin fails now, and it has something to do with rewrites.

    Maybe this stack trace helps a little bit:

    PHP Stack trace:
    PHP   1. {main}() /sites/<MYBLOG>/www/blog/index.php:0
    PHP   2. require() /sites/<MYBLOG>/www/blog/index.php:17
    PHP   3. require_once() /sites/<MYBLOG>/www/blog/wp-blog-header.php:12
    PHP   4. require_once() /sites/<MYBLOG>/www/blog/wp-load.php:29
    PHP   5. require_once() /sites/<MYBLOG>/www/blog/wp-config.php:27
    PHP   6. do_action() /sites/<MYBLOG>/www/blog/wp-settings.php:302
    PHP   7. call_user_func_array() /sites/<MYBLOG>/www/blog/wp-includes/plugin.php:403
    PHP   8. opensearch_flush_rewrite_rules() /sites/<MYBLOG>/www/blog/wp-includes/plugin.php:0
    PHP   9. WP_Rewrite->flush_rules() /sites/<MYBLOG>/www/blog/wp-content/plugins/opensearch/opensearch.php:46
    PHP  10. save_mod_rewrite_rules() /sites/<MYBLOG>/www/blog/wp-includes/rewrite.php:1944" while reading response header from upstream, client: <IP>, server: <MYBLOG>, request: "GET /comments/feed/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm/socket1.sock:", host: "<MYBLOG>"

    Thanks, that does help.

    I think it must be caused by me including misc.php to early (before file.php which is where get_home_path() is defined).

    I’ll release a fix for this tomorrow (it’s midnight here :-).

    No problem, it’s 01:20 here at my place.
    And the OpenSearch plugin is also not so important for me (actually it was broken in my blog anyway :D).

    My site stopped working after installing the latest version of the plugin too. Deactivated it and its working again now.

    Disabling the plugin did help.
    Thanks a lot guys!

    Chris – thanks removed >>BackUpWordPress<< plugin and site returned to normal.

    Tom Willmot – I was notified of new update to >>BackUpWordPress<< so applied and site went down manually delete through FTP site as could not get access any other way and site came back up.

    “If your site is fatal error’ing, connecting via FTP and renaming the plugin should bring it back.”

    Thanks Tom – did exactly this.

    deleting it worked for me too. thank you for the great help.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Fatal error: Call to undefined function get_home_path()’ is closed to new replies.