We were recently handed a few blogs/sites to support, that have started way back when wordpress was on v2.1.3 or even 2.0.4
After upgrading the sites to the latest versions (3.4.2 and 3.5) we found that there are files in the root directory as well as the /admin and /includes that are “leftovers” from the older versions or have been relocated in these recent versions. Here is an example of what I am talking about:
updated installation – new installation http://db.tt/GpLJr5P9
Some files state: “This file is deprecated and only exists for backwards compatibility”
So… What do you think? Should one just delete these files and go for a beer!!! Should they be left there?
Any concrete/tested answers on the subject?
PS: I am aware of the this post but not quite happy with the answers provided there. Especially when combining this present question with this one about dbdelta. So I am kind of reopening the issue (if I may do so) hoping for a more definite answer.
Delete everything but
wp-content
andwp-config.php
, copy the fresh installation into the directory. On upgrading WordPress will use the database to see what should be done, not the files.Not all files are deleted automatically, because some of them might still be used by outdated plugins or external scripts (the old feed files are good examples for this case).
Files under /admin and /includes are safe to delete as they should not be used from outside of core (I’m assuming you don’t have some old plugins running on those sites).
Root files are different but I say, back it up and go for it. There is a reason why they where deprecated, probably because the functionality was consolidated into one file or because they provided functionality that no one used. Whatever was the reason, by leaving them open to the world you risk that due to core changes they become security hole, and since no one is auditing for example wp-rss2.php anymore, you might never know about it until it is too late.