I still remember one late night, half-asleep at my desk, staring at a white screen where my WordPress site should have been.
A client said, “I only edited one file in wp-admin, now everything is blank.”
Of course.
In the end, nothing was wrong with the database, the theme, or the plugins.
The problem was the core WordPress files were messed up, and the quick fix was simple: reset the core files without touching their content.
This guide is for you if:
– Your site shows weird PHP errors after editing or replacing core files
– You uploaded something wrong into wp-admin or wp-includes
– You want to fix the core install but keep your posts, pages, media, themes, and plugins
We’ll walk through the structure of core WordPress, then 3 practical ways to reset it safely.
Understanding What “Core WordPress” Actually Is
Before touching anything, you need to be clear what “core” means.
In WordPress, the core is the main source code that handles all basic functions of the CMS: content management, users, security, plugin and theme loading, and more.
When you download WordPress from the official site, you get those core files.
These core files are what we’re resetting.
We’re not touching your unique content (posts, pages) or uploads.
In a standard WordPress install, the important core-related parts are:
wp-admin/– all files for the WordPress admin panel.
This is where the dashboard logic lives.wp-includes/– the heavy-lifting PHP and JavaScript files that power WordPress functions.index.php– the main entry point that loads WordPress.- A bunch of PHP files in the root (
wp-settings.php,wp-load.php, etc.) that wire everything together.
Then there is one special directory:
wp-content/– this is your stuff.
Themes, plugins, uploads, custom code – all live here.
When you “reset core WordPress manually”, what you’re really doing is:
– Replacing only the core code files (like wp-admin, wp-includes, and root PHP files)
– Leaving wp-content and the database exactly as they are
That’s how your content survives while the engine under the hood gets a fresh install.
Safety First: What To Back Up Before You Touch Anything
Even if you’re just fixing core files, you can still break things with one wrong delete.
So before any reset method, do these safety steps:
- Backup your files
- Download at least the whole
wp-contentfolder to your computer. - If you have space/time, grab a copy of the entire site directory too.
- Backup your database
- Use your hosting’s control panel (phpMyAdmin or similar) to export the WordPress database.
- That database holds all posts, pages, users, and settings.
- Confirm you’re in the right folder
- Double-check you’re working inside the correct domain’s WordPress folder on your hosting.
- Deleting in the wrong directory is a classic 2 AM disaster.
A 5-minute backup can save you hours of panic later.
Method 1 – Reset Core by Manually Replacing Files
This is the manual, straightforward method.
You remove the damaged core files and upload fresh ones from a clean WordPress download.
Step 1: Download a fresh copy of WordPress
– Go to the official WordPress site.
– Download the latest WordPress ZIP file to your computer.
– Extract the ZIP; you’ll see folders like wp-admin, wp-content, wp-includes, plus a bunch of PHP files.
Step 2: Connect to your hosting
– Use your hosting file manager (in your control panel) or an FTP client.
– Open the folder where WordPress is installed (usually the root of your site or a subfolder like /public_html/).
Step 3: Identify what you must NOT delete
– Do not delete the wp-content directory.
– Do not delete your wp-config.php file (this connects WordPress to your database).
Those two things hold your custom content and settings.
Step 4: Delete the core WordPress source code files
The key idea from the source is: you must delete the WordPress source code that forms the core.
So:
– Delete the wp-admin directory on the server.
– Delete the wp-includes directory.
– In the root, delete all core PHP files except wp-config.php.
This includes files like index.php, wp-settings.php, wp-load.php, etc.
Leave:
– wp-content/ (untouched)
– wp-config.php (untouched)
Step 5: Upload fresh core files
From the WordPress ZIP you extracted on your computer:
– Upload the entire wp-admin folder to your server.
– Upload the entire wp-includes folder.
– Upload all root PHP files from the extracted folder except wp-config.php.
(You already have your working wp-config.php on the server.)
Step 6: Test the site
– Visit your site frontend.
– Try logging into /wp-admin.
If everything went well, your site should be back with the same content, themes, and plugins, just running on a fresh set of core files.
This method is clean and transparent, but a bit manual.
Method 2 – Reset Core Using Hosting File Manager Only
Sometimes you don’t want to touch FTP or an external tool.
If your hosting panel has a decent file manager, you can do almost the same reset directly in the browser.
The logic is the same as Method 1: remove broken core, upload a fresh one.
The difference is how you move the files.
Step 1: Download WordPress to your local machine
– Same as before – grab a fresh WordPress ZIP from the official site and keep it ready.
Step 2: Use the hosting file manager
– Log in to your hosting control panel.
– Open File Manager.
– Navigate to your site’s WordPress directory.
Step 3: Backup key items in-place
If you’re nervous, you can make a quick on-server backup:
– Rename wp-content to something like wp-content-backup (temporarily).
– Download wp-config.php to your computer.
This avoids accidental deletion if you click too fast.
Step 4: Delete the core source directories and files
Inside File Manager:
– Delete wp-admin.
– Delete wp-includes.
– Delete all PHP files in the root except wp-config.php.
If you renamed wp-content earlier, rename it back to wp-content now.
Step 5: Upload and extract the new WordPress ZIP
– Upload the WordPress ZIP file via File Manager into your site directory.
– Use the Extract feature in File Manager.
– Move the extracted wp-admin, wp-includes, and root PHP files into the main WordPress directory.
– Do not overwrite your existing wp-config.php.
Step 6: Clean up
– Delete the leftover ZIP file and any temporary folders created during extraction if they’re not needed.
– Double-check the final structure: wp-admin, wp-content, wp-includes, and core PHP files in the root.
Step 7: Test the site again
– Open your site in a browser.
– Log in to /wp-admin to confirm the dashboard works.
This method is handy if your hosting is slow with FTP or blocked by a firewall.
Everything stays inside the hosting panel.
Method 3 – Reset Core by Fresh Install in a Separate Folder (Safer, Slower)
If you’re extra cautious, you can do a sort of “parallel” fresh install.
You set up a new core WordPress in a separate folder on the same hosting, then move only what you need.
This is more work, but safer if you don’t trust the current install at all.
Step 1: Create a new folder on your hosting
– In your hosting file manager, create a folder like /wp-fresh-core under your site root.
Step 2: Upload a fresh WordPress there
– Upload the WordPress ZIP into /wp-fresh-core.
– Extract it so you have a clean set of wp-admin, wp-includes, wp-content, and root files inside that folder.
Step 3: Copy only the core files back to your main site
From /wp-fresh-core:
– Copy wp-admin to your main WordPress folder (replacing the old wp-admin).
– Copy wp-includes the same way.
– Copy the root PHP files (index.php, wp-settings.php, etc.) to your main folder, but again, do not replace your existing wp-config.php.
You’re using the fresh install as a clean “core source”.
Step 4: Leave your main wp-content untouched
– Do not copy the wp-content from the fresh install into your real site.
– Keep your existing wp-content as it holds your themes, plugins, and uploads.
Step 5: Test, then remove the temporary folder
– Test your main site and /wp-admin.
– If everything works, delete /wp-fresh-core to avoid clutter.
This method adds an extra folder and some copying, but mentally it feels safer because your original install isn’t touched until you start copying fresh files.
Common Mistakes When Resetting WordPress Core
I’ve broken my fair share of installs over the years.
Here are the gotchas to avoid:
- Deleting
wp-contentby accident - This is the big one.
- Always double-check what you’re selecting before pressing delete.
-
Overwriting
wp-config.php - If you replace it with the default one from the ZIP, WordPress won’t know where your database is.
- Your site will act like a fresh install.
- Wrong folder level
- Make sure you’re inside the correct domain’s folder when deleting.
- On shared hosting, it’s easy to be one level too high or too low.
- Not backing up before deleting
- Even a quick
wp-contentdownload can save you. - Hosts sometimes have auto backups, but never rely on them blindly.
- Expecting core reset to fix plugin/theme bugs
- Resetting core helps if core files are corrupted or modified.
- If a plugin or theme is broken, you still need to fix or disable those separately.
When Should You Actually Reset Core?
Resetting the core isn’t something you do every day.
It makes sense when:
- Someone edited files in
wp-adminorwp-includesdirectly. - A failed update left you with missing or half-uploaded core files.
- You suspect malware or strange modifications inside core (after scanning and confirming).
But you probably don’t need a core reset if:
– Only a plugin or theme is misbehaving.
– Your issue is clearly database-related (missing posts, wrong URLs, etc.).
Think of this as “reinstalling the engine” while keeping the car body, seats, and paint.
Use it when the engine is really the problem.
If this saved you time, bookmark CrushEdge for more fixes.
No Comments