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?
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 :-)
JunoMagic
Member
Posted 1 year ago #
How do you reinstall all WP core files? And which are the core files? I'm having the same problem.
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.
JunoMagic
Member
Posted 1 year ago #
Oh, thanks. Worked! Whew.
drewthebarber
Member
Posted 1 year ago #
Will this take out all the posts i had previously made, themes, etc?
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.
WideSmiler
Member
Posted 1 year ago #
Thank you! I also swapped out the WP files in the wp-admin and wp-includes folder. That's all it took!
egdesign
Member
Posted 1 year 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