
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.
| Leftover | Where it lives | What you see without the plugin | What to do |
|---|---|---|---|
[mashshare] shortcodes | Post content | The shortcode printed as literal text | Replace, remove, or register a stand-in shortcode |
mashshare(), mashsharer() and do_shortcode('[mashshare]') calls | Theme templates | Fatal error for the two functions; empty output for the shortcode call | Remove or wrap in function_exists() |
mashsb_settings, mashsb_networks, mashsb_version and other mashsb_ options | Options table | Nothing visible; a few kilobytes of autoloaded data | Delete after a backup |
mashsb_shares, mashsb_jsonshares, mashsb_timestamp | Post meta, three rows per post | Nothing visible; thousands of rows on large sites | Export if wanted, then delete |
mashsb_rate_limit, mashsb_limit_req | Transients | Nothing; they expire | Delete or ignore |
mashsharer_transients_cron, mashsb_cron_daily | Scheduled events | Events that fire with no handler | Unschedule |
| Most shared posts widget | Sidebar widget area | An empty slot or an inactive widget | Remove from the sidebar |
The checklist
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.Find theme calls
Search your child theme and any custom plugin for
mashshareandmashsb. Template calls to plugin functions cause fatal errors when the plugin is removed unless they are wrapped infunction_exists()checks.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.Install the replacement
Set it up and compare on staging. See choosing a replacement share plugin.
Deactivate and delete
Deactivate the add-ons first, then the core plugin, then delete them.
Remove leftovers
Plugins often leave options (names starting with
mashsb) and post meta behind. Delete them with a database tool, after the backup.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_cronRun 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
mashsbandmashsharefinds nothing, or only guarded calls. wp option list --search='mashsb_%'returns nothing.- The post meta count query returns zero.
wp cron event listshows 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.
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
- MashShare listing in the WordPress.org plugin directory
- MashShare core plugin source in the WordPress.org plugin repository: uninstall.php, listing the options, post meta, transients and cron hooks it wrote
- WordPress developer reference: add_shortcode()
- WP-CLI command reference: wp search-replace
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.
Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.
Related reading
- 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
- 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.
- 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