Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Delete Old WordPress Core Files

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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

Subscribe to WPBeginner

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.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

8 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

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


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

  4. MJ says

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

  5. Keith Davis says

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

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.