Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Delete Old WordPress Core Files

Last updated on by
Elegant Themes
How to Delete Old WordPress Core Files

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.

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.

Listing old WordPress core files

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.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. 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.

  2. MJ says:

    Its a good article… i think i must try deleting old files. Does it have to do anything with speed of site???

  3. Keith Davis says:

    Thanks guys
    I’ll be interested to see what obsolete files the plugin highlights.
    Appreciate the heads up.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.