Support » Fixing WordPress » Fatal Error during update to 3.6 (undefined function)

  • I updated several sites to 3.6 today and one of them is giving me issues. After pressing the Update button inside the Dashboard it starts to download 3.6 and then spits out the following error:

    Fatal error: Call to undefined function wp_safe_remote_get() in /usr/home/romein/domains/ on line 500

    I checked file.php and like 500 is the following:

    $response = wp_safe_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );

    I have several wordpress installs on this server and this is the only one that is giving me issues. The site which works fine as it but won’t update is

    Could anyone tell me what this error means. Is it perhaps possible that is has something to do with file permissions, since I had to tinker with them on this install in the past. If so is there an easy way to check if and what is wrong with the permissions?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator t-p


    I’m having this exact issue. I know it’s a permissions issue but don’t want to allow the world write ability. How to fix it?

    I tried setting everything as 777 but that just breaks a lot more than it fixes. Is there a list somewhere of exactly what files need what permissions? I went through the troubleshoot guide but none of related to file permissions.

    I tried that too. It’s frustrating. I’ll look into which files need which permissions. It has to be out there somewhere.

    I’m getting this error too when trying to update one of my WP blogs. All past updates have gone well with no errors, so this seems to a new problem in v3.6.

    Fatal error: Call to undefined function wp_safe_remote_get() in […]/wp-admin/includes/file.php on line 500



    Forum Moderator

    – switching to the default 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. Make sure that you delete the old copies of files & folder before uploading the new ones.

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

    Looks like the update may have died half-way through. The admin side of the site was completely unusable, nearly everything produced error messages. Couldn’t turn off plugins, change themes, etc.

    So I did a manual update. Downloaded the 3.6 tar.gz file, and overwrote all the files. Seems good as new now.

    Really weird though, I run dozens of wordpress sites and have never seen one do something like that before during an upgrade.

    I’ve now done the 3.6 update on several more sites and did not hit similar errors.

    I simply edited the file replacing wp_safe_remote_get to wp_remote_get at the line 500 and that allowed me to run the update.

    Thanks pumka, that dit it for me too.

    Hi pumka,

    Can you explain how I find that file using ftp? I am not sure how to do this. I am getting the exact same error.


    The path is wp-admin/includes/file.php relative to your WP installation folder.
    Hope that helps.

    I too been having problems with V3.6. Only thing is, after updating it, both backend an frontend of the site goes blank! I cant edit anything whatsoever. I took Pumka’s advice and renamed wp_safe_remote_get to wp_remote_get at the line 500 and the site is still blank. Thankfully my client understands that the internet isn’t perfect, but I need this resolved asap. Any more suggestions as to what to do?? Thanks. The link to the site is

    Thanks Denis / Pesikov! Altering wp-includes/ http.php with the code

    function wp_safe_remote_get( $url, $args = array() ) {
    	$args['reject_unsafe_urls'] = true;
    	$http = _wp_http_get_object();
    	return $http->get( $url, $args );

    did the trick! =)

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Fatal Error during update to 3.6 (undefined function)’ is closed to new replies.