◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Admin → 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:
- Via cPanel or hosting file manager: Go to your hosting dashboard and open the File Manager. Navigate to the public_html or root folder.
- Via FTP/SFTP: Use an FTP client like FileZilla. Connect using your FTP credentials, and locate your WordPress installation folder.
Step 2: Locate and remove unneeded core files
Look for these specific files in your root directory:
- readme.html – This file comes with every WordPress install and serves no functional purpose. It can also reveal your WordPress version to hackers.
- license.txt – Contains the GPL license for WordPress. You don’t need it for your site to work.
- wp-config-sample.php – A sample configuration file. Once your site is installed, this is no longer needed.
- install.php – Used during manual installation, but unnecessary after setup.
- Old .zip or .tar.gz files – These might be leftover from updates or manual uploads
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.
- Go to Appearance > Themes in your WordPress dashboard.
- Identify themes you aren’t using.
- Click on each one and choose Delete in the bottom right corner.
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.
- Go to Plugins > Installed Plugins.
- Deactivate any plugin you no longer use.
- Once deactivated, click Delete underneath the plugin name.
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:
- Install and activate Media Cleaner.
- Go to Media > Cleaner in your dashboard.
- Click Scan. The plugin will show a list of files it thinks are unused.
- Manually review the list. If it looks good, click Delete or Trash.
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:
- Install and activate WP-Optimize.
- Go to WP-Optimize > Database.
- Check the box for Clean all post revisions.
- Click Run Optimization.
Alternatively, if you’re comfortable with phpMyAdmin or have database access, run this SQL query:
DELETE FROM wp_posts WHERE post_type = "revision";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:
- WP Super Cache: Go to Settings > WP Super Cache > Delete Cache.
- W3 Total Cache: Go to Performance > Dashboard > Empty All Caches.
- LiteSpeed Cache: Go to LiteSpeed Cache > Toolbox > Purge All.
To manually remove cached files:
- Connect to your site via FTP or file manager.
- Navigate to /wp-content/cache/.
- Right-click and delete the contents (but not the folder itself).
Step 2: Remove temp and session files
Some plugins generate .tmp, .log, or .bak files. These may be located in:
- /wp-content/uploads/
- /tmp/ (if your host gives you access)
- Plugin folders under /wp-content/plugins/
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:
- /wp-content/backups/
- /wp-content/updraft/ (for UpdraftPlus)
- /wp-content/ai1wm-backups/ (for All-in-One WP Migration)
- Custom folders named after plugins
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:
- Download any that you want to keep locally.
- Right-click and delete older versions via file manager or FTP.
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
- Open /wp-content/plugins/ and /wp-content/themes/.
- If you see folders for plugins or themes you’ve deleted, right-click and delete them.
Step 2: Clean up your database
Use Advanced Database Cleaner to remove orphaned data:
- Install and activate the plugin.
- Go to WP DB Cleaner > Tables and look for any orphaned or unused entries.
- Select and delete them cautiously.
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:
- Go to each plugin’s settings panel.
- Look for scheduling or automation options.
- Set weekly or monthly cleanups for revisions, database tables, and media.
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:
- Go to LiteSpeed Cache > Settings > Purge.
- Enable Scheduled Purge Time and choose how often it should run.
- Save changes.
This ensures that cache doesn’t build up and take over your storage.
Getting started with cleaning up WordPress files
Cleaning up unnecessary WordPress files helps free space and keep your site efficient and secure. Start with core file leftovers and media clutter, then move on to automated tools to keep things tidy.
Make a full backup before deleting anything. Then work through your file system, uploads folder, and database with the tools we’ve covered.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy. Liquid Web’s WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Don’t want to deal with server management and maintenance either? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options—including VPS and dedicated servers—or chat with a WordPress expert right now to get answers and advice.
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