You will often hear developers say, "Never edit WordPress core." But what exactly is it? WordPress core is the main WordPress software you download from WordPress.org, before you add your own themes and plugins.
Every WordPress site runs on the same core files. In this article, we will see what they include and how core updates work.
What is included in WordPress core?
Core is the engine of your website. It handles users, posts, media, comments, the dashboard and much more. Most of its code lives in these places:
- wp-admin: The files that power your dashboard.
- wp-includes: The main libraries and functions that run WordPress.
- Root files: Files like
wp-login.phpandwp-settings.phpin the main folder.
Your own themes, plugins and uploads live in the wp-content folder, and they are not part of core. See our lesson on the WordPress directory structure for the full picture.
Why should you never edit core files?
Each core update replaces the core files with fresh copies. So any change you make there disappears after the next update. Instead, add custom features with a plugin or a child theme, just like you would add accessories to a car instead of rebuilding its engine.
How do core updates work?
By default, WordPress installs minor maintenance and security releases automatically. For major releases, you see a notice in the dashboard. Here is how to update manually:
- First, take a full backup of your files and database.
- Now, go to Dashboard → Updates.
- Next, click the update button for the new WordPress version.
- Finally, wait for the success screen and check your site.
On the same screen, you can also turn on automatic updates for all new versions of WordPress. Read more in our guide to update WordPress: why, how, and when.
Never skip the backup before a major core update. If a plugin conflicts with the new version, a backup lets you restore your site quickly.
WordPress core is the shared base that every site depends on, so keep it updated and untouched. That's all about WordPress core. Got a question about core updates? Post it in the comment section below.