How to replace WordPress core files?

In this article, I will discuss how to replace WordPress core files. However, before we can discuss this, there are two questions we need to answer: 1> What are WordPress core files? 2> When and why should we replace them?

What are WordPress Core files?

Core files are what constitute WordPress. these are the files that enable all the features of WordPress. These files are what you get when you install or download WordPress from These include the folders : wp-admin and wp-includes, and all the files in the root, except wp-config.php. Although the wp-content folder and the wp-config.php file are system generated, their contents are based on user inputs. So they fall under the category of user generated content.

When and why should we replace WordPress Core files?

There are two main scenarios when we replace WordPress Core files:
  1. When it is not possible to automatically update WordPress.
  2. When the core files have become corrupted due to hacking/malware attack or some other reasons.
Now that we have covered what the core files are, and when to replace them, let’s address the primary topic of this post:

How to replace the WordPress Core files?

To update the core files, please follow these steps:
  1. Download WordPress from and extract it on your PC.
  2. Using either file manager or FTP, open your site’s file system.
  3. In the site’s root, delete these folders: wp-admin and wp-includes. Leave wp-content as it is.
  4. Delete all the files in the root, except wp-config.php
  5. From the download extracted on your PC, upload wp-admin, wp-includes and wp-config.php to the root of your site.
Now you have a fresh WordPress core!

Leave a Reply