3.0 Fatal error: Cannot redeclare wp_load_image() (15 posts)

  1. shivayawellness
    Posted 6 years ago #

    I manually upgraded 3.0 through Filezilla. Website works fine but I can't get to Dashboard.

    Here's the message: Fatal error: Cannot redeclare wp_load_image() (previously declared in /homepages/38/d262327624/htdocs/wp-includes/media.php:241) in /homepages/38/d262327624/htdocs/wp-admin/includes/image.php on line 150

    I tried reloading 3.0, renaming plugins.hold b/c I didn't disable them before upgrading. Still can't get to Dashboard.

    Is this a file from a 2.9 version that's missing?


  2. Andrew Nacin
    Lead Developer
    Posted 6 years ago #

    In 3.0, we moved wp_load_image() from wp-admin/includes/image.php to wp-includes/media.php. Thus, it looks like you're running 3.0's wp-includes/media.php, but 2.9's wp-admin/includes/image.php.

    I would re-upload wp-admin and wp-includes entirely.

  3. shivayawellness
    Posted 6 years ago #

    So delete wp-admin and wp-includes from 3.0 and reload? God, I'm nervous my site will go down now....

    Thanks--I'll try it!

  4. shivayawellness
    Posted 6 years ago #

    I uploaded the entire 3.0 after a failed attempt at re-uploading wp-admin & wp-includes. Still the same message & can't get into Dashboard.

    Are there old files I need to delete or are they automatically overwritten?

  5. anthonymdavis
    Posted 6 years ago #

    I get the following error after trying to upgrade to 3.0:

    Fatal error: Cannot redeclare pclziputilpathreduction() (previously declared in /hermes/bosweb/web064/b644/ipw.homelandsecuritygroup/public_html/site/hsgblog/wp-content/plugins/wordpress-automatic-upgrade/lib/pclzip.lib.php:5421) in /hermes/bosweb/web064/b644/ipw.homelandsecuritygroup/public_html/site/hsgblog/wp-admin/includes/class-pclzip.php on line 5452

  6. shivayawellness
    Posted 6 years ago #

    Nacin--looks like I'm running 3.0 wp-admin/includes/image.php (74,237 PHP File). Is that the correct one?

    Any other ideas? I'm still getting the same message when I log in--and no Dashboard.

  7. shivayawellness
    Posted 6 years ago #

    I reloaded 3.0 and tested every wp-admin/includes/image.php. I could find. Nothing works.

    Still the same message after I log in:
    Fatal error: Cannot redeclare wp_load_image() (previously declared in /homepages/38/d262327624/htdocs/wp-includes/media.php:241) in /homepages/38/d262327624/htdocs/wp-admin/includes/image.php on line 150

    I'm at a complete loss--

  8. ccperr01
    Posted 6 years ago #

    This just happened to me.

    It was my first time logging in (site was put together by someone else) and I updated the theme (oops), so lost all the customization. I had made a backup copy of all the files last week, so I just uploaded those files to replace the new ones...and now I'm getting the same message.

    Any luck yet?

  9. jackinsomniac
    Posted 6 years ago #

    I'm getting a very similar message:

    Fatal error: Cannot redeclare wp_load_image() (previously declared in /home/gdjames/public_html/WESTERNDIGITALEXTERNALHARDDRIVES.NET/wp-includes/media.php:241) in /home/gdjames/public_html/WESTERNDIGITALEXTERNALHARDDRIVES.NET/wp-admin/includes/image.php on line 168

    So, if I'm reading this thread correctly, the current solution is to manually re-install wp-admin and wp-includes? I followed a guide (on this forum, I believe) to create a .sql backup with phpMyAdmin before I auto-upgraded. Would it be better to restore my blog with WP v2.9.2 and then disable plug-ins and try to auto-upgrade again? I don't even know how to restore my site using a .sql file at this point. I'm sorry, I'm still very new at this.

  10. esmi
    Forum Moderator
    Posted 6 years ago #

    No - re-upload the wp-admin and wp-includes folders from a fresh download of WordPress 3.0

  11. jackinsomniac
    Posted 6 years ago #

    Holy jebus, that was scary. But I got it working.

    First I had to set up a FTP account for my server, download an FTP client, and sync them both up (which is a good thing, I should've done that already). Then, when I tried to replace the files, I was only able to successfully replace 67% of them. When I checked it out in the wp-admin folder on the server I realized I had to change the permissions for almost half of the files just to allow my FTP client to overwrite them. So I did, and changed all the permissions back afterwards just to make sure I didn't screw anything up. When I logged into my WordPress admin account again, the Fatal Error was gone and I just saw a wordpress page asking me to upgrade. Now it works fine.

    I don't know if it was my server or WordPress that set the 411 permissions on those files, but I'm pretty sure that's what caused the Fatal Error originally (so I'm assuming it the server). Anyway, THANK YOU to all the Mods and Devs that help out here and for everyone's work launching v3.0
    You guys are awesome.

  12. hellogoodbye2124
    Posted 6 years ago #

    I get this error Fatal error: Cannot redeclare wp_load_image() (previously declared in /home/a2021697/public_html/wp-includes/media.php:241) in /home/a2021697/public_html/wp-admin/includes/image.php on line 168

    I can't get my site running! I hope that I can fix it!

  13. jackinsomniac
    Posted 6 years ago #

    It looks like you have the same problem OP and I had.

    Do what I did, create an FTP account on your server, if one hasn't already been created automatically, download an FTP client (I heard CuteFTP was pretty good, so I got that), and sync them up so you can play with files on the server through your FTP application.

    Then, do what esmi told me, download a fresh version of WordPress v3.0, (Top right, big "DOWNLOAD" button) and use your FTP app to re-upload the wp-admin and wp-includes folders.

    You may run into the same problem I did, where your server has permissions set to 411, meaning it won't allow anyone to overwrite them. In that case, you'll have to use your server's file manager to change permissions to something that's at least 611, of all the files that were not overwritten. Then try to re-upload through FTP. Remember to change each file you modified permissions on back to 411. I'm not completely sure on this, but it's been my experience that having the wrong permissions set on the wrong files could not only screw up your site again, but allow hackers access to it.

    e-mail me with any more questions: jack.insomniac1911@gmail.com
    p.s. i love the beatles, that album being one of my favorites.

  14. James Huff
    Support Representative
    Posted 6 years ago #

    hellogoodbye2124, esmi was already trying to help you in your original thread. I hope you aren't intentionally ignoring her.


  15. Ephazi
    Posted 5 years ago #

    All you need to do is FTP to your /wp-content/ folder. Then rename your plugins folder to something like "pluginsold" or "pluginsx" THEN create a new folder called "plugins"

    POOF No more errors or White screens!

    The problem is you'll have to re-upload your plugins. (No big deal if you backed em up!)

    Upload all your plugins but only activate a few at a time.

Topic Closed

This topic has been closed to new replies.

About this Topic