WordPress GuideAdmin → Scheduled Actions

WordPress files to delete to clean up and regain space

Is your WordPress site running out of server space—or slowing down for no clear reason? You might be surprised by how many unnecessary files are hiding inside your installation. From leftover update files to bloated cache folders, there are plenty of things you can delete safely to make your site leaner and faster.

Let’s walk through which WordPress files you can remove without breaking your site, and how to clean them up the right way.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Core WordPress files you can safely delete

WordPress core comes with a few files that aren’t essential once your site is set up. Over time, you may also accumulate old installation- or update-leftovers. Here’s what you can delete and how.

Step 1: Log in to your hosting file manager or use FTP

To delete core files, you’ll need access to your site’s root directory. You can do this one of two ways:

Step 2: Locate and remove unneeded core files

Look for these specific files in your root directory:

To delete: Right-click each file in the file manager or FTP interface and select Delete. If you’re unsure about a file, always back it up before deleting.

Step 3: Remove unused default themes

If you’re using a custom or premium theme, you don’t need all the default WordPress themes like Twenty Twenty-One, Twenty Nineteen, etc.

Keep just your active theme and possibly one default theme as a fallback.

Step 4: Remove unused plugins

Inactive plugins can still take up space and introduce security vulnerabilities.

Unused media files and revisions

Images and files you no longer use can build up quickly—especially if you experiment with layouts or frequently change images.

Step 1: Scan for orphaned media files

Orphaned files are ones that exist in your /wp-content/uploads/ folder but aren’t attached to any page or post.

Use the Media Cleaner plugin to detect these:

Tip: Always enable “Test Mode” first so you can preview what’s being deleted.

Step 2: Delete old post revisions

WordPress stores every revision of a post or page, which clutters your database over time.

Use WP-Optimize to delete them:

Alternatively, if you’re comfortable with phpMyAdmin or have database access, run this SQL query:

Cache and temporary files

Caching plugins and themes often create temporary files to help your site load faster. These files can accumulate over time and should be cleaned regularly.

Step 1: Clear plugin-generated cache

If you’re using a caching plugin, clear the cache from its settings panel:

To manually remove cached files:

Step 2: Remove temp and session files

Some plugins generate .tmp, .log, or .bak files. These may be located in:

Sort folders by size to see if anything is unusually large. Download and inspect any file if you’re unsure before deleting.

Backup files stored on the server

While backups are critical, storing too many on your server wastes disk space and creates security risks.

Step 1: Identify backup folders

Backup plugins often store files in these locations:

Use your file manager or FTP to check the sizes of these folders.

Step 2: Download and delete old backups

If you find multiple backups:

You can also configure your backup plugin to store backups in the cloud (like Google Drive or Dropbox) and automatically delete old backups.

Deleted plugin and theme remnants

Even when you delete a plugin or theme, it might leave files or database entries behind.

Step 1: Manually check for leftover folders

Step 2: Clean up your database

Use Advanced Database Cleaner to remove orphaned data:

Always back up your database before performing any cleanup.

Automate space cleanup with scheduled tasks

To keep your WordPress site tidy without doing it manually every month, set up automated maintenance tasks.

Set up WP-Cron for cleanups

If you use plugins like WP-Optimize or Media Cleaner:

For more reliability, consider disabling WP-Cron and setting up a real server cron job via cPanel or your host’s dashboard.

Create recurring cache purges

If you’re using LiteSpeed Cache:

This ensures that cache doesn’t build up and take over your storage.

Additional resources

How to use your WordPress admin login page →

How to find, use, and troubleshoot your admin page

How to add a login button to your WordPress homepage →

Learn how to add a login button to your WordPress site for easy user access and navigation.










Easy WordPress website maintenance tips →

7 simple steps to keep on regular rotation