Plugins is usually a nice boon to WordPress websites, however there are occasions they outlive their usefulness.

If a plugin fulfills a serve as you don’t want anymore, stops being up to date, or seems to gradual your website online down, it can be time to take away it.

In most cases to delete a plugin you may pass to the Plugins segment of the admin, deactivate it first, after which make a selection the delete possibility. Then you definitely’re accomplished… proper?

Sadly, now not at all times.

Uninstalling a plugin will have to be a easy activity, however it isn’t at all times the case. Plugins can retailer information in a lot of puts, and sadly, now not all builders come with an uninstall script which totally gets rid of that information.

On this submit, we’ll quilt:

What plugins generally retailer information?

Plugins which ask for person enter are the perhaps to retailer information.

They come with:

  • Shape plugins
  • Caching plugins
  • search engine marketing plugins
  • Safety plugins

The place do plugins retailer information?

The wp_options database desk retail outlets data on which plugins are energetic, and what settings they’ve energetic.

Customized database tables are created via some plugins to retailer information.

Plugins would possibly alter WordPress’ wp-config.php record. In case your website online runs on Apache, the .htaccess record could have laws added to it. Those may just come with safety or caching settings, for instance.

Information and folders throughout the wp-content folder is also created via plugins too.

To spot what’s added via plugins, it is helping to grasp what’s in a typical WordPress set up.

What’s in a brand new set up of WordPress?

Database tables

A brand new set up of WordPress may have the next tables:

  1. wp_commentmeta
  2. wp_comments
  3. wp_links
  4. wp_options
  5. wp_postmeta
  6. wp_posts
  7. wp_termmeta
  8. wp_terms
  9. wp_term_relationships
  10. wp_term_taxonomy
  11. wp_usermeta
  12. wp_users
Tables in a single vanilla WordPress install
Tables in one vanilla WordPress set up

In case you arrange a multisite you’ll have the ones 12 tables plus a couple of extra:

  1. wp_blogs
  2. wp_blog_versions
  3. wp_registration_log
  4. wp_signups
  5. wp_site
  6. wp_sitemeta

Your WordPress set up would possibly have a prefix rather than wp_ in the event you selected some other one on set up, or have altered it via using a plugin. (For simplicity I’ll proceed to say wp_ as a shorthand to your database desk prefix.)

For every new website online you upload to a multisite, there shall be some other ten tables beginning with wp_2_ and so forth.

wp-content folder

The elemental WordPress folder has an index.php record and two subfolders:

  • plugins
  • issues

A mature set up will most probably produce other subfolders which would possibly come with the next:

  • languages
  • mu-plugins
  • improve
  • uploads

Every other folders provide could have been created via a plugin.

How simple is it to completely delete plugins?

I examined this out on a unmarried WordPress set up with some current plugins. I attempted putting in and deleting a lot of widespread plugins to peer how simple it was once to uninstall them utterly.

All of the plugins I examined saved data in wp_options.

Plugins that experience uninstallers in wp-admin

Gravity Paperwork

What’s saved?

Gravity Paperwork creates 9 new database tables:

  1. wp_rg_form
  2. wp_rg_form_meta
  3. wp_rg_form_view
  4. wp_rg_incomplete_submissions
  5. wp_rg_lead
  6. wp_rg_lead_detail
  7. wp_rg_lead_detail_long
  8. wp_rg_lead_meta
  9. wp_rg_lead_notes

How will have to you uninstall Gravity Paperwork?

  1. Pass to Paperwork > Settings > Uninstall.
  2. Click on the button.
  3. Make a selection OK.
  4. Pass to the plugin display to completely delete the plugin.
Gravity Forms Uninstall dialog
Gravity Paperwork Uninstall conversation

Is the whole lot deleted?

All 9 customized tables are deleted, however some information stays within the wp_options desk.

Wordfence

What’s saved?

A whopping 23 database tables are created via this widespread safety plugin.

  1. wp_wfBadLeechers
  2. wp_wfBlockedCommentLog
  3. wp_wfBlockedIPLog
  4. wp_wfBlocks7
  5. wp_wfConfig
  6. wp_wfCrawlers
  7. wp_wfFileChanges
  8. wp_wfFileMods
  9. wp_wfHits
  10. wp_wfHoover
  11. wp_wfIssues
  12. wp_wfKnownFileList
  13. wp_wfLeechers
  14. wp_wfLocs
  15. wp_wfLogins
  16. wp_wfNet404s
  17. wp_wfNotifications
  18. wp_wfPendingIssues
  19. wp_wfReverseCache
  20. wp_wfScanners
  21. wp_wfSNIPCache
  22. wp_wfStatus
  23. wp_wfVulnScanners

You’ll additionally see a wflogs folder in wp-content.

How will have to you uninstall Wordfence?

An alternative choice to Wordfence’s manual uninstall is including the Wordfence Assistant plugin to do the task.

To make use of Wordfence Assistant, deactivate and delete Wordfence as commonplace. Then in Wordfence Assistant’s choices, select the Delete All Wordfence Information and Tables possibility.

Remove all Wordfence data in the database and elsewhere
Take away all Wordfence information within the database and somewhere else

Is the whole lot deleted?

The use of Wordfence Assistant, the database and information have been purged of Wordfence content material.

Plugins that experience uninstall scripts

Smartly advanced plugins have an uninstall.php record to maintain the uninstall procedure.

As an example:

Broken Link Checker’s uninstall script gets rid of its 4 database tables.

Relevanssi’s uninstall script gets rid of 3 tables created via the plugin.

WP Rocket has an uninstall script which is meant to take away all information and information together with the advanced-cache.php record.  After I attempted it, I spotted that this record stayed put after the plugin was once long gone.

Different plugin uninstall strategies

If there’s no uninstall script, some plugins have supplied different ideas for an entire uninstall.

NextGEN Gallery

This plugin creates 3 database tables:

  • wp_ngg_album
  • wp_ngg_gallery
  • wp_ngg_pictures

It additionally creates an ngg folder inside wp-content.

It is very important manually take away the three tables and the folder, as they aren’t got rid of on uninstall. Do that recommendation for a full NextGen Gallery uninstall.

WooCommerce

WooCommerce creates 16 tables:

  1. wp_wc_download_log
  2. wp_wc_webhooks
  3. wp_woocommerce_api_keys
  4. wp_woocommerce_attribute_taxonomies
  5. wp_woocommerce_downloadable_product_permissions
  6. wp_woocommerce_log
  7. wp_woocommerce_order_itemmeta
  8. wp_woocommerce_order_items
  9. wp_woocommerce_payment_tokenmeta
  10. wp_woocommerce_payment_tokens
  11. wp_woocommerce_sessions
  12. wp_woocommerce_shipping_zones
  13. wp_woocommerce_shipping_zone_locations
  14. wp_woocommerce_shipping_zone_methods
  15. wp_woocommerce_tax_rates
  16. wp_woocommerce_tax_rate_locations

WooCommerce recommend adding a line to wp-config.php for a finished uninstall:

I attempted this two times and didn’t get a great uninstall both time. Bear in mind to double-check that the knowledge has long gone.

Plugins that go away information in the back of

Those are some plugins I discovered which don’t take away all information when uninstalled.

Akismet

Akismet retail outlets a large number of information within the wp_commentmeta desk, which stays on deletion.

Mine had just about 6,000 rows!

EWWW Symbol Optimizer

This plugin retail outlets information in regards to the trail for your pictures, their authentic dimension, dimension after compression and % aid within the desk wp_ewwwio_images. This desk stayed after I got rid of the plugin, as did an ewww folder.

WP All Export

4 tables are created via this plugin:

  • wp_pmxe_exports
  • wp_pmxe_google_cats
  • wp_pmxe_posts
  • wp_pmxe_templates

Those don’t seem to be got rid of when the plugin is deleted.

Yoast search engine marketing

Yoast search engine marketing creates 2 tables:

  • wp_yoast_seo_links
  • wp_yoast_seo_meta

It additionally retail outlets some information in:

wp_usermeta – comprises some meta_key values like wpseo_title.
wp_postmeta – comprises some meta_key values for more than a few submit ids, together with:

  1. _yoast_wpseo_linkdex
  2. _yoast_wpseo_title
  3. _yoast_wpseo_metadesc
  4. _yoast_wpseo_focuskw
  5. _yoast_wpseo_focuskw_text_input
  6. _yoast_wpseo_primary_category
  7. _yoast_wpseo_content_score

A deactivate/delete uninstall leaves all this information in the back of.

How do you blank up after messy plugins?

At the start, again up your website online (information and database) in case you are making a mistake. Tremendous vital!

WPMU Dev participants can use Snapshot Pro for backups.

You’ll be the usage of FTP and SQL queries for the blank up. In case you’re now not ok with those, have an expert on hand.

Delete pages

For any plugin that created pages, delete them in the event that they weren’t got rid of on uninstall and also you don’t want them to any extent further. Bear in mind to 301 redirect the web page permalinks.

Take away undesirable database tables

Any tables which don’t seem to be a part of the standard WordPress set up usually are tables added via plugins.
You’ll be able to use phpMyAdmin, a database manipulation software to be had on maximum internet hosting keep watch over panels.

Use the Drop approach to delete particular person tables from undesirable plugins.

phpMyAdmin showing tables with options including Drop
phpMyAdmin appearing tables with choices together with Drop
phpMyAdmin’s warning confirmation dialog for dropping a table
phpMyAdmin’s caution affirmation conversation for losing a desk

Or make a selection more than one tables and make a selection Drop from the With decided on dropdown, then verify.

Dropping multiple tables with phpMyAdmin
Shedding more than one tables with phpMyAdmin

Another choice is to make use of the Complex Database Cleaner plugin to investigate cross-check your tables inside WordPress.

There’s a button to hit upon orphaned tables, although you wish to have to improve to the Professional model to make use of it.

Any plugin-related tables that you simply’re certain you don’t want you’ll delete. Take a look at them and select Delete from the Bulk Movements dropdown.

Advanced Database Cleaner shows all your WordPress data tables
Complex Database Cleaner presentations your entire WordPress information tables

Delete redundant folders from wp-content

FTP into your website online and examine the contents of information and folders you don’t recognise. In case you’re certain you received’t want them, delete them.

As an example:

  • EWWW Symbol optimizer provides an ewww folder.
  • NextGEN Gallery provides two folders – gallery and ngg.
  • WP Rocket provides advanced-cache.php and a cache folder.
The EWWW folder within wp-content
The EWWW folder inside wp-content

Take a look at wp-config.php and .htaccess information

Those are crucial information, so reproduction them first sooner than enhancing them!

In case you spot any traces in wp-config.php added via plugins you’ve deleted, take away them.

In .htaccess search for a # adopted via the plugin identify and take away any traces in between.

Part of the code created by iThemes Security in .htaccess
A part of the code created via iThemes Safety in .htaccess

Bear in mind to add the up to date record(s) if you find yourself accomplished.

Cleansing up transients and cron jobs

Transients are information saved quickly via WordPress. Assessments for WordPress updates and notices at the admin dashboard are saved in transients. Transients are (most commonly) set to run out after a collection time frame, and are recreated over the years.

Some plugins create transients. The Transients Manager plugin will permit you to establish which plugins have accomplished so, and you’ll delete any you not need to stay.

Transients Manager shows transients and expiry date
Transients Supervisor presentations transients and expiry date

Deleting all transients received’t take away all of them – the WordPress ones stay.

Cron jobs are scheduled duties that may be run on a internet server. WordPress runs its personal cron jobs via WP-Cron.

WP Crontrol plugin will display you what cron jobs are working and when.

Some cron jobs revealed by WP Crontrol
Some cron jobs published via WP Crontrol

You’ll be able to alter or delete the cron jobs, however some core cron jobs can’t be deleted.

Sadly you’re on the mercy of the plugin developer in the case of naming cron jobs. If the identify of a role is unclear, don’t delete it, as it will impact the efficiency of a plugin you rely on.

Cleansing up your database tables

Now it’s time to run some database queries for a last blank up.

Akismet

Did you utilize Akismet? This can be a tidying up activity you’ll run despite the fact that you proceed to make use of the plugin, since Akismet generates a large number of desk rows.

At the wp_commentmeta desk, run the SQL question:

Querying wp_commentmeta to find Akismet data
Querying wp_commentmeta to search out Akismet information

(Bear in mind to switch wp_ on this question if in case you have a special desk prefix.)

Then assuming the question discovered some rows, run the question

Deleting Akismet data from wp_commentmeta
Deleting Akismet information from wp_commentmeta

You will have to now have a far lighter wp_commentmeta desk.

Yoast search engine marketing

Yoast information turns out to lurk in every single place!

Do that SQL question at the wp_postmeta desk:

Yoast data in wp_postmeta
Yoast information in wp_postmeta
558 rows of Yoast data were removed from wp_postmeta
558 rows of Yoast information have been got rid of from wp_postmeta

For wp_usermeta check out:

wp_options desk

Maximum plugins go away some entries within the wp_options desk. If you wish to pass the entire hog in cleansing you’ll take away the rows connected for your deleted plugins.

Use identical queries to the former ones to search out related rows, and if any are discovered, delete them:

Change the pluginname with the identify or abbreviation of the plugin you’re searching for (stay the % indicators). Maximum are easy however a couple of would possibly want some trained guesswork. Examples are:

  • EWWW Symbol Optimizer: ewwwio
  • NextGEN Gallery: ngg
  • WooCommerce: wc

When you’re at it, you’ll do a little extra home tasks via following those 10 database optimization tips and those WordPress clean up tips.

Summing up

Deleting plugins isn’t at all times as easy as it seems that. Numerous data may also be saved via plugins each within the filesystem and the database, and plugin builders range at the thoroughness in their uninstall routines.

Maximum people think an uninstall manner deleting all information, and that’s now not steadily the case.

In case you’re a plugin developer, chances are you’ll now not be capable to endure the concept that anyone would possibly by no means use your plugin once more! However maximum customers will thanks for together with an uninstall script. Please observe the Uninstall Methods segment within the plugin building manual.

As a person, make a selection your plugins sparsely. In finding out from builders the way you uninstall them. Take a look at out new plugins on a staging website online reasonably than your are living website online to stay your website online clutter-free. And take into accout as a basic rule, the larger the plugin, the extra information it retail outlets.

WordPress Developers

[ continue ]