As an open source software, WordPress is regularly maintained and looked after by a global community. It releases new versions and security releases on a very regular basis. With each new WordPress version, some funtions become obselete and some files become unnecessary. However, an update does not automatically delete those old core files. These files can be targeted by hackers to hide backdoor code. In this article, we will show you how to delete old WordPress core files.
Video Tutorial
If you don’t like the video or need more instructions, then continue reading.
First, you need to install and activate Old Core Files plugin. After activating the plugin, go to plugin settings page located under Tools » Old Core Files. The plugin will list all old core files that are no longer needed with latest WordPress version.
Currently this plugin does not have a delete button. However, plugin authors intend to include a delete button in future versions of the plugin. However, now that you have the list of files that are just sitting on your server doing nothing and are executable, you can delete them manually using FTP.
While you are deleting unwanted core files, you may also want to delete all inactive themes and plugins that are just sitting there on your server. Don’t forget to back them up just in case, if you want to add it back. Lastly, we highly recommend that you harden your WordPress install by disabling PHP execution in certain WordPress directories. If you want to stay on an even safer side, then start using Sucuri (Here are 5 reasons why we use Sucuri).
We hope that this article helps you improve security of your WordPress website. We would like to ask, how often do you delete unwanted core files, inactive themes, and inactive plugins from your server? Let us know by commenting below.
Judith says
Hi. Since this post is from 2014 and the plugin was last updated 2 years ago and there is a note that states “This plugin hasn’t been tested with the latest 3 major releases of WordPress.” would you still recommend this plugin? Is there a similar updated plugin?
WPBeginner Support says
We will take a look at this article and update it should it not be working or should we find a better alternative.
Admin
MJ says
I used this plugin and it shows two options ‘Existing’ and ‘All’. My existing shows 0 files and the message is “Seems like there are no old files in your installation. Dont forget to delete old WordPress files after each upgrade.” whereas under the ‘All’ option it shows few hundred files and display the message “We have found some old files in this WordPress installation. Please review the files below.”
Now i don’t know, which one to go after? should i delete files under “All” option? they are 491.
Editorial Staff says
No. Just look at the existing ones (not all).
Admin
MJ says
Its a good article… i think i must try deleting old files. Does it have to do anything with speed of site???
Editorial Staff says
No it doesn’t affect performance.
Admin
Keith Davis says
Thanks guys
I’ll be interested to see what obsolete files the plugin highlights.
Appreciate the heads up.