How To Uninstall And Delete A Wordpress Theme

Suppose you’ve recently changed the theme on your WordPress site. Then you need to uninstall the previous theme. Unfortunately, there’s a chance you’ve got a few more WordPress themes.

That was pre-installed on your website. And that you might wish to uninstall.

We’ll show you why you should uninstall a WordPress theme and how to uninstall a theme without affecting your website in this article.

Why Would You Uninstall a WordPress Theme?

Suppose you’re not utilizing a WordPress theme. Then it is advised that you remove it from your website. New WordPress themes should be deleted for a variety of reasons.

  • WordPress theme files are written in PHP. It can hide malicious code or viruses on your website.

Backdoors can sometimes be hidden in new themes by unlawful developers.

  • Keeping them on your server increases the size of your backups. And it takes longer for your WordPress security plugin to complete a scan.
  • You will also continue to get updates on those themes even though you aren’t using them.

Many users now install WordPress themes on their real websites only to test them. It is not the most fantastic method to put a WordPress theme through its pages.

To do any testing, we recommend utilizing a staging site or a local WordPress installation. This manner does not affect your live website.

It also helps you to provide your consumers with a consistent experience.

Delete vs Uninstall a Theme

In principle, removing and deleting a theme should be the same thing. In all situations, it will remove the theme’s code files from the server.

It should erase any data in both situations. However, in some instances, merely removing a theme may not delete all associated material.

It’s also crucial to understand the difference between deactivating a theme and deleting or uninstalling it.

A theme is removed if you activate another one instead. In addition, the procedure is automated, unlike plugins, where you must manually deactivate each plugin that you do not wish to run.

It is because only one theme may be active on a site at any given time.

So, instead of deactivating the existing theme, activate a new theme. Then, the new theme is activated. However, nothing from the previous theme was deleted from the system—any parameters you can save in the database.

Suppose the theme has to be reactivated. Any widgets you put to the widget areas of your theme are kept. However, it was relocated to the Widgets screen’s Inactive Widgets area.

In addition, any menus you added to the theme are retained. However, you must specify where in the new theme you want them to appear.

If you wish to delete a theme and all of its settings completely, go here. You must remove it. Continue reading to find out how!

When You Shouldn’t Delete a WordPress Theme

There may be instances when a theme is not active on your website. However, you must not remove it. These are some examples:

  • The theme is the currently active theme’s parent theme.
  • Your site is part of a Multisite network. And the theme is now functional on another site in the network.
  • After testing the current theme, you must maintain harmony for testing or reactivation.

Parent themes

A theme that is utilized as a parent theme will not be active on your website. But not without it. The child theme will be broken.

In the Themes panel, WordPress will notify you whether the active theme is a child theme: Image Showing Parent Theme

  • Child theme

Before removing an inactive theme from your website, examine the current theme: does it have a parent theme? If that’s the case, don’t remove the theme!

Multisite WordPress

Suppose your site is a member of the WordPress Multisite network. You also have just administrator access to the site. Then you won’t be able to remove themes.

It is because the network administrator is the only user who can manage themes.

Check the admin bar at the top to see if your site is part of a network. For example, suppose there is a My Sites section. Then this is a network, not a separate site:

Image Showing Multisite Dashboard

Themes cannot be installed or uninstalled. However, you will be able to activate themes. That has already been installed on the network by the network admin.

Suppose you’re the network administrator. You’ve also disabled a theme on one of your network sites.

Be cautious while removing a theme that you no longer use. Another user may have enabled that theme on their site.

It is not to say that it isn’t worth regularly cleaning up your themes (and plugins). And it is deleting those that aren’t being used on the network.

To check which themes are being utilized across your network. Then, install and network activate the Multisite Enhancements plugin.

It will add a column to the network administrator’s Themes and Plugins panels. They are informing you of which themes and plugins are active on the various sites in your network.

– Multisite Enhancements plugin Image Installed Plugins In Wordpress

Themes Under Test

You or a co-worker may have installed a theme for testing reasons at times if you wish to experiment with a fresh theme for your website.

The most effective method is to use a staging site. However, if this is not an option, you might want to install a theme to try it out.

Suppose you are working as part of a team and wish to remove a theme. Always consult with your co-workers first. And if you’ve been experimenting with a theme.

There’s a potential you’ll have to reactivate it in the future. Then don’t get rid of it.

Things to Consider Before You Uninstall a WordPress Theme

So you’ve double-checked that the theme isn’t in use. It’s not a parental theme. So it will not need to be restarted in the future. You know you want to get rid of it.

Hold on to your horses before you uninstall the theme. Now is the time to perform one or both of the following: test the site on your staging site with the theme removed and create a backup.

Staging sites

A staging site is a duplicate of your live site hosted on the same server.

Suppose you have access to your staging location. It is best practice to remove the theme from that site first. So you can be sure it will not create any issues.

It is the point at which you will curse yourself if it turns out that the removed theme was the active theme’s parent theme.

Then exhale a sigh of relief. When you discover you haven’t deleted it from your live site.

Backing up

Take a backup of your site before deleting anything. In the same way as you would before executing an update.

Suppose your hosting package does not provide one-click backups. Instead, you can utilize a backup plugin that you install.

How to uninstall a WordPress Theme

There are several methods for uninstalling a WordPress theme. We’ll begin with the simplest.

1. Using the WordPress Dashboard to Uninstall a WordPress Theme

The most straightforward approach to delete a theme is through the WordPress dashboard. Suppose you have access to the administration pages. Then this is the way to go.

Navigate to Appearance > Themes on your WordPress site. All your installed themes will be shown, with the current one at the top of the list.

  • Theme screen Image Showing Installed Themes

To examine the specifics of a theme, choose it from the list and click the Delete button.

  • Twenty Seventeen theme. Image Showing Twenty Seventeen Theme

There is a Delete link in the lower right-hand corner. Click on it. And WordPress will confirm that you truly wish to delete the theme.

In the popup, click the OK button. In addition, the theme will be uninstalled.

2. Using FTP/SFTP to Uninstall a WordPress Theme

Suppose you are unable to access the WordPress dashboard. However, FTP/SFTP access to the site is available. You can remove the theme from the folder.

It is something you can accomplish with your FTP client. Launch your FTP client. And then go to your site’s wp-content/themes directory.

Image Showing How To Uninstall A Theme Using Ftp/Sftp

You’ll see a list of all the installed themes. But, unfortunately, you have no means of knowing which of them is in use. As a result, this is the riskiest technique of removing a theme.

That is why it is critical to bring a backup first. However, if the theme is broken, it blocks you from gaining access to the admin panels. This might be your only choice.

Hover your cursor over the folder that contains the theme you wish to remove. And right-click it to bring up a shortcut menu.

In the shortcut menu, select Delete. Your FTP client will prompt you to confirm that you truly wish to remove the folder. Choose Yes or OK. After then, the theme will be released.

3. Using WP-CLI to Uninstall a Theme

The third fastest method is to utilize WP-CLI if you’re comfortable operating the command line to administer your website. Suppose you’ve never used WP-CLI before.

It is most likely not the ideal moment to begin. If you make a mistake, accept it. You may remove the incorrect files.

Begin by connecting to your site through the command line using WP-CLI.

To get a list of all the themes you’ve installed. Type the following :

$ wp theme list

You will then be presented with a list of all of the themes that you have installed. If you want to learn more, go here. You may get a list of inactive themes here:

$ wp theme list –status=inactive

Then you’ll get a list of all the inactive themes. So you know which ones you can safely remove.

To uninstall the hook. Enter the following:

$ wp theme delete twentyseventeen

Take note of the final argument, which is the name of the theme’s folder. Not the name of the theme as it appears on the admin panels.

You will then receive a notice informing you that the theme has been deleted:

Deleted ‘twentytwelve’ theme.

Success: Deleted 1 of 1 theme.

Suppose you’re used to utilizing WP-CLI. It is the quickest way to remove a theme. However, there are hazards involved because you lack the information about the theme that you would find on the admin panels.

It is simpler to remove the incorrect theme. So proceed with caution, test on your staging site first, and ensure you have a backup.

4. Using File Manager, uninstall a WordPress theme.

Suppose you are unsure about using an FTP client. Then, in your web hosting control panel, you may utilize the File Manager tool.

We’ll use screenshots from Bluehost’s hosting panel for this example. Of course, it all depends on your hosting provider. Your hosting dashboard may differ somewhat.

Navigate to the dashboard of your hosting account. And then, on the Advanced page, select the File Manager icon.

Image Showing How To Uninstall A Theme Using File Manager

It will open the file manager, where you may view the contents of your web server in the same way that you would with an FTP client. You must travel to the  /public_html/wp-content/themes/ folder.

Image Showing How To Uninstall A Theme By Deleting File

After that, simply right-click. And then uninstall the theme you wish to get rid of. That’s all there is to it.

After Deleting a Theme, Test Your Site

After you’ve removed your WordPress theme, it is critical to test your website. First, open it in a browser. It is making sure that the cache is cleared. Also, ensure that everything is in functioning order.

If you mistakenly removed a theme that is a child of the current music. You’ll notice that part, if not all, of the CSS is missing, resulting in an unstyled look to your site.

If you unintentionally removed the current theme. Instead, WordPress will have found another theme to use.

If you mistakenly erased a theme. You will have to reinstall it. You may accomplish this by going to the Themes screen.

Suppose you downloaded the theme from the theme directory. Alternatively, you may re-upload the theme from backup.

Uninstalling Theme-Related Content

After you’ve removed the theme, you may discover that you still have material on your site related to the theme you released.

It might include:

  • Widgets
  • Menus
  • Dummy Content:- posts, pages, or posts of a custom post type, if the theme registered one.
  • Images

To clean up your site and make it run as smoothly as possible. You should either remove or reassign this material. As a result, it works with your new theme.

Widgets

Widgets only function when they are placed in widget regions. For example, suppose a theme has devices that you disabled. They may be found in the Widgets screen’s Inactive Widgets section.

Image Showing Inactive Widgets

  • Inactive widgets

Drag them to your new theme’s widget places. Alternatively, if you no longer require them, remove them.

You may remove them one by one. Alternatively, you may clear all inactive widgets by clicking the Clear inactive widgets button.

Menus

Every theme has at least one area for you to insert a menu, usually in or just below the header. Some feature additional menu locations in areas such as the bottom or sidebar.

When you enable a new theme, the menu you established for your previous theme will remain accessible to you. However, you will need to tell WordPress where you want each menu to appear. Image Showing Wordpress Menu

If you previously used several menu positions in your theme. Furthermore, your new theme lacks additional navigation options.

Using the Custom Menu widget, you may add any menu to a widget in your sidebar or bottom.

Dummy Content

If you used fake material to test your theme and uploaded or imported it. That should be taken down from your website.

After uninstalling the theme, you can erase any articles or pages you created. Then, in the WordPress admin, go to the Posts and Pages tabs. You may also leave them in place for the new theme.

Suppose your previous theme had a custom post type. Then you must remove any custom post type postings.

Unless the same custom post type is registered in your new theme, you may also use a plugin to accomplish this.

Before removing the previous theme, you must delete any custom post-type posts because you won’t see them once the code for registering it has been removed.

Images

The picture parameters vary depending on the theme. For example, some websites make more use of featured pictures than others. In addition, some have additional media sizes to match the theme’s layout.

You may also have uploaded photos for use in a slider or carousel supplied with the theme.

It’s a good idea to clear up your pictures after removing your theme. It divides into two parts:

  • First, images must resize to match the new theme settings.
  • New pictures removed.

Install the Regenerate Thumbnails plugin to resize pictures. Image Showing Imagew Regenerate Plugin

  • Regenerate the Thumbnails plugin.

When it has been installed and enabled. Navigate to Tools > Thumbnails > Regenerate Thumbnails.

On the screen that says “regenerate thumbnails.” Click the Regenerate Thumbnails for All X Attachments button to start the process, where X is the number of photos on your website.

The plugin will automatically renew your images. You are creating new ones in any custom sizes that your theme has registered.

It will also prompt you to remove any photos in sizes that are no longer in use. It is the option you should choose.

Suppose you submitted photos for the previous theme’s slider or another feature. The Regenerate Photos plugin frequently deletes images in sizes. The new theme eliminates the necessity for them.

In the WordPress admin, navigate to Media Library. Also, before permanently removing any photos that you no longer require, identify them.

You may also do this before deactivating the previous theme. From the admin panel for any slider or carousel included with the theme. The exact method will depend on how the theme settings are set up.

What Should You Do If You Mistakenly Uninstall a WordPress Theme?

If you unintentionally removed a WordPress theme. Then there are several options for restoring it.

To begin, restore the theme from the backup. It is made more accessible by the availability of several WordPress backup plugins. In addition, it enables you to convert your website to a previous state quickly.

However, if you did not create a backup, you will be out of luck. The theme can then be restored by downloading and installing a new copy of the same theme.

The disadvantage of the second technique is that you will lose any theme changes you have made.

Conclusion

It is not as simple as going to the Themes screen and selecting Delete to remove a WordPress theme.

It is critical to remove any theme safely and comprehensively. Different procedures include creating a backup and testing on a staging site first.

And dealing with any old theme content can help your site function properly with your new theme. But, again, you’ll be able to do it correctly if you follow the steps above.

 

Load More Related Articles
Load More By Susana Taylor
Load More In WordPress Themes

Leave a Reply

Your email address will not be published. Required fields are marked *