If you build a custom WordPress theme for a client’s site, I’m sure you spend some time deleting the themes (and plugins) that come pre-installed with WordPress. There’s absolutely nothing wrong with them, but if you’re planning on customizing things, you really don’t need to leave them there.
I see it as a little security measure so that the client doesn’t mess everything up by accidentally switching themes. Plus, it’s better to remove themes (and plugins) if you’re not using them. No need to waste the storage space.
A Small Problem when Updating WordPress
One problem that will keep occurring, is that those default themes will be re-installed every single time you upgrade WordPress to the latest release. It’s an annoying tick that might present a potential issue now that things upgrade automatically. I like to play it safe and thankfully there’s an easy way to make sure this doesn’t keep happening.
All it takes is a single line added to your
With that in place, the default WordPress themes (and plugins) won’t come back after you delete them.
Play It Even Safer
Once in a while, you might encounter an issue if you delete all the default themes when WordPress tries to switch back to a theme that no longer exists. This will leave you with the white screen of death, which most client’s frown upon.
With another line of code added to
wp-config.php, you can ensure that any time this happens the default theme will be one of your choosing. No more blank screens.
define( 'WP_DEFAULT_THEME', 'theme-folder-name' );
Just be sure to change
theme-folder-name to your actual theme’s folder name. If you’re using Magazine Premium you would change it to
magazine-premium. If you were using Arcade, it would be
arcade. And so on.
Read more about customizing wp-config.php in the WordPress Codex.
Featured image provided by Gratisography.
The post Permanently Delete Default WordPress Themes appeared first on bavotasan.com.