Cannot redeclare wp_load_image() (previously declared in…

This is something a regular wordpress update would have corrected immediately. Thing is, though your site works and displays normally, you can’t get to your dashboard through wp-admin. When you try to access your dashboard through wp-admin, you get the ‘Cannot redeclare wp_load_image() (previously declared in…’ error.

If you have a cpanel, you can avail of your fantastico’s automatic wordpress update there. Or, you can use your favorite ftp application to manually replace the old files with the newest versions.

I met this error when I got into the localhost version of this blog using mowes portable. It’s been a long time ago since I last messed with it, so the wp platform was old…may be still 2.9. It opened nicely when I typed http://localhost/moralde/ but when I typed http://localhost/moralde/wp-admin, this ‘Cannot redeclare wp_load_image() (previously declared in…’ error appeared instead of the dashboard.

The suggestion I found in wordpress.org was to replace only the wp-admin and wp-includes with their newest versions. But when I did that, not only can’t I see my dashboard, I can’t see the main page itself anymore. It displayed:

Warning: require(…/wp-includes/classes.php) [function.require]: failed to open stream: No such file or directory in …\www\moralde\wp-settings.php on line 68

Fatal error: require() [function.require]: Failed opening required ‘…/wp-includes/classes.php’ (include_path=’…\mowes_portable\php5′) in …\www\moralde\wp-settings.php on line 68

Solution to ‘Cannot redeclare wp_load_image() (previously declared in…’

Looks like the right procedure is to manually replace all of the old wordpress files (not just partially) with the newest version (which you can download from wordpress.org), which is what I did naturally. Of course, I saved the wp-config.php file first before doing it because this is the file that contains the username, databasename, and database password.

Now, this time, it worked. When I typed http://localhost/moralde/wp-admin, it said:


Database Update Required

WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.
The update process may take a little while, so please be patient.

What followed was a piece of cake. Clicked the ‘Update WordPress Database’ button; then the ‘Continue’ button; and voila!… back to the regular dashboard.

There’s however that little yellow bar on the top portion of the dashboard that said:


An automated WordPress update has failed to complete – please attempt the update again now.

Clicked on the ‘please attempt the update again now’ link, and… were back in business.

Now, all these I did on a localhost server. However, should this happen on a really live site of mine, I already know what to do.

‘Cannot redeclare wp_load_image() (previously declared in…’ error problem solved.

SHARE to your FRIENDS by CLICKING HERE:

Tagged with:

Filed under: WebsiteWordpress

Like this post? Subscribe to my RSS feed and get loads more!