WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Upgrade from WP 3.1.4 to WP 3.2 - Admin error: Cannot redeclare get_temp_dir() (9 posts)

  1. Mark
    Member
    Posted 3 years ago #

    I've upgraded a couple sites from WP 3.1.4 to 3.2 without problems. However, one site generates this error:

    "Fatal Error: Cannot redeclare get_temp_dir() (previously declared in /home/public_html/wp-includes/functions.php:2160) in /home/public_html/wp-admin/includes/file.php on line 189

    If I comment out the function in functions.php I can then access the admin panel and finish the upgrade. Then when I uncomment the function the site crashes again when accessing the admin panel.

    Anyone have a clue why is this happening?

  2. Mark
    Member
    Posted 3 years ago #

    So here's the solution:

    Reinstall all WP core files.

    So here's the reason it happens:

    Automatic upgrade automatically fails when it can't automatically do everything it needs to automatically do. In some cases we wind up with half a copy of WP 3.1.4 files and half a copy of WP 3.2 files. Not good.

    Anyway. Problem discovered and solved :-)

  3. JunoMagic
    Member
    Posted 3 years ago #

    How do you reinstall all WP core files? And which are the core files? I'm having the same problem.

  4. Mark
    Member
    Posted 3 years ago #

    The WP core files are all the files that come in the zip download:

    http://wordpress.org/latest.zip

    Unzip that to your local system, then FTP all the files and dirs up to your live site.

  5. JunoMagic
    Member
    Posted 3 years ago #

    Oh, thanks. Worked! Whew.

  6. drewthebarber
    Member
    Posted 3 years ago #

    Will this take out all the posts i had previously made, themes, etc?

  7. sunny41
    Member
    Posted 2 years ago #

    I managed to keep the plugins, themes and content. Just deleted WP-Admin and uploaded the fresh version and the same for the functions.php. The rest was left as is.

    For me this happened on BlueHost and I have a feeling it has to do with their auto script even though I manually installed this particular site.

  8. WideSmiler
    Member
    Posted 2 years ago #

    Thank you! I also swapped out the WP files in the wp-admin and wp-includes folder. That's all it took!

  9. egdesign
    Member
    Posted 2 years ago #

    thanks for the tip, yes I also did the same as above, but only uploaded the new WP-Admin, which replaced the old works great now.

    thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags