Skip to content

MashShare record

Removing MashShare cleanly from a WordPress site

By Hannah Voss, Editor · Reviewed September 2026 · 7 min read

Quick answer

Before deactivating MashShare, search your posts for its shortcode and your theme for calls to its functions, because both break or print raw text once the plugin is gone. Export stored share counts if you want to keep them, install and test the replacement, then deactivate, delete, and clean leftover options and post meta with a backup in hand.

A graphite paper box tipped open with its paper pieces moving across into a second box that is being neatly filled

Back up first

Take a full database backup and a copy of your theme before changing anything. Several of the steps below touch post content and meta, and a backup makes every step reversible.

What a site still carrying MashShare leaves behind

The plugin wrote to four places: post content (through its shortcode), the theme (through template functions people pasted in), the options table and the post meta table. It also registered two scheduled hooks and two transients. Each leaves a different trace once the plugin is gone, and the table lists them in the order they cause trouble.

LeftoverWhere it livesWhat you see without the pluginWhat to do
[mashshare] shortcodesPost contentThe shortcode printed as literal textReplace, remove, or register a stand-in shortcode
mashshare(), mashsharer() and do_shortcode('[mashshare]') callsTheme templatesFatal error for the two functions; empty output for the shortcode callRemove or wrap in function_exists()
mashsb_settings, mashsb_networks, mashsb_version and other mashsb_ optionsOptions tableNothing visible; a few kilobytes of autoloaded dataDelete after a backup
mashsb_shares, mashsb_jsonshares, mashsb_timestampPost meta, three rows per postNothing visible; thousands of rows on large sitesExport if wanted, then delete
mashsb_rate_limit, mashsb_limit_reqTransientsNothing; they expireDelete or ignore
mashsharer_transients_cron, mashsb_cron_dailyScheduled eventsEvents that fire with no handlerUnschedule
Most shared posts widgetSidebar widget areaAn empty slot or an inactive widgetRemove from the sidebar

The checklist

  1. Find shortcodes in content

    Search posts for [mashshare. A search and replace tool, or WP-CLI, lists every post that uses it. Leftover shortcodes print as literal text once the plugin is inactive.

  2. Find theme calls

    Search your child theme and any custom plugin for mashshare and mashsb. Template calls to plugin functions cause fatal errors when the plugin is removed unless they are wrapped in function_exists() checks.

  3. Decide on stored counts

    The plugin cached share totals in post meta with keys beginning mashsb_. Export them if a replacement can import them or you want a record; otherwise they can go.

  4. Install the replacement

    Set it up and compare on staging. See choosing a replacement share plugin.

  5. Deactivate and delete

    Deactivate the add-ons first, then the core plugin, then delete them.

  6. Remove leftovers

    Plugins often leave options (names starting with mashsb) and post meta behind. Delete them with a database tool, after the backup.

  7. Purge caches and test

    Clear page and object caches, then check a sample of posts on desktop and mobile.

# list posts that still contain the old shortcode (WP-CLI)
wp post list --post_type=any --s='[mashshare' --fields=ID,post_title

# count leftover post meta rows (check the prefix in your database first)
wp db query "SELECT COUNT(*) FROM wp_postmeta WHERE meta_key LIKE 'mashsb%'"

Replacing shortcodes

You have three choices: replace each shortcode with your new plugin's equivalent, remove them all so automatic placement takes over, or register a tiny shortcode of your own with the same name that outputs your new buttons. The last option is the fastest for large archives and keeps old content working without editing thousands of posts.

add_shortcode( 'mashshare', function () {
  // output your replacement share buttons here
  return '';
} );

The old shortcode accepted the attributes shares, buttons, align, text, url, networks, size and icons, with shares and buttons defaulting to true and align to left. Posts that used any of these keep passing them to whatever handles the name. A stand-in that reads the two attributes people actually used, alignment and a custom address, covers almost every archive; anything else can be ignored safely. Put the stand-in in a small plugin of its own rather than the theme, so it survives a theme change.

// stand-in shortcode: keeps [mashshare align="center" url="..."] working
add_shortcode( 'mashshare', function ( $atts ) {
  $a = shortcode_atts( array( 'align' => 'left', 'url' => '' ), $atts );
  $url = $a['url'] ? esc_url( $a['url'] ) : get_permalink();
  if ( function_exists( 'my_share_buttons' ) ) {
    return my_share_buttons( $url, $a['align'] );
  }
  return '';
} );

Remove MashShare data after the plugin is deleted

Deleting the plugin ran its uninstall routine only if the general settings had "Remove Data on Uninstall?" ticked, and the default was unticked. If you deleted the plugin without ticking it, the data is still there. The names below come from the plugin's own uninstall file; the WP-CLI commands remove the same items by hand. Take the backup first, then run them in this order.

# options written by the core plugin
wp option list --search='mashsb_%' --fields=option_name
wp option delete mashsb_settings mashsb_networks mashsb_version mashsb_version_upgraded_from mashsb_installDate
wp option delete widget_mashsb_mostshared_posts_widget

# post meta, three keys per post
wp db query "DELETE FROM wp_postmeta WHERE meta_key IN ('mashsb_shares','mashsb_jsonshares','mashsb_timestamp')"

# transients and scheduled hooks
wp transient delete mashsb_rate_limit
wp transient delete mashsb_limit_req
wp cron event delete mashsb_cron_daily
wp cron event delete mashsharer_transients_cron

Run the option list command again afterwards; any names that remain belong to add-ons, which used the same prefix with their own suffix, and can be deleted the same way once you have read what they hold. Without WP-CLI, a database tool such as phpMyAdmin does the same with the equivalent queries. If the cron delete command reports that no event exists, WP-Cron has already discarded the hook, which is fine. Sites with scheduled tasks that never ran on time should also read external cron jobs for WordPress, since the old plugin's async cache refresh depended on WP-Cron and a stale schedule is a common reason its counts froze long before the closure.

Check for security leftovers

Unmaintained plugins accumulate vulnerabilities. Once removed, confirm no copies remain in wp-content/plugins under renamed folders, and that no scheduled tasks from the plugin are still registered.

Check it worked

  • wp post list --s='[mashshare' returns no rows, or only the posts you chose to keep for the stand-in shortcode.
  • A search of the active theme and child theme for mashsb and mashshare finds nothing, or only guarded calls.
  • wp option list --search='mashsb_%' returns nothing.
  • The post meta count query returns zero.
  • wp cron event list shows neither of the two hooks.
  • The site loads logged out with no PHP warning at the top of the page and no new lines in debug.log; if it does not, follow the plugin troubleshooting order before changing anything else.
Removing an old share plugin01Back updb and theme02Find usageshortcodes03Replacetest on staging04Removeplugin and data05Verifycaches purged
The order matters: find usage before deactivating anything.

For the wider picture, see the MashShare record. Readers who get this far often also need MashShare add-ons: what each one did or MashShare alternatives: choosing a replacement share plugin.

Sources

Questions

What happens to [mashshare] shortcodes after removing the plugin?

They appear as plain text in posts. Replace them, remove them, or register a small shortcode with the same name.

Does deleting MashShare remove its data?

Not always. Options and post meta can remain; remove them manually after a backup.

Why did my site crash after removing the plugin?

A theme template probably calls a plugin function directly. Wrap it in function_exists() or remove it.

Which template functions did MashShare provide?

mashshare() and the older mashsharer() both printed the buttons, and the documentation also suggested echoing do_shortcode('[mashshare]'). The first two cause a fatal error once the plugin is gone; the shortcode call prints nothing.

Should I export the share counts before deleting the post meta?

Only if a replacement can import them or you want a record. The total sat in mashsb_shares and the per-network breakdown in mashsb_jsonshares; a one-line export query saves both to a file.

Share this guide

Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.

  1. MashShare alternatives: choosing a replacement share pluginMashShare was closed in 2025. How to choose a replacement share plugin: features to compare, questions to ask, and when plain links are the better answer.7 min read
  2. MashShare: the plugin's history, closure and what to do nowMashShare was a WordPress share buttons plugin sold here until it closed in 2025. What it was, what happened, and what to do if your site still runs it.
  3. Plugin troubleshooting: what to try firstTroubleshoot a WordPress plugin problem in a safe order: caches, conflicts, debug logging, recovery mode, and disabling a plugin when the admin is down.6 min read