How to – REALLY clean up posts? (remove crufty meta
-
I have two blogs that have been running on WordPress since 2007. One has about 3000 posts, the other about half. I just recently moved hosts and consolidated these two blogs along with three others into a WordPress MU install.
In the process of troubleshooting my other issue posted over here I ended up exporting “everything.” Doing so I noticed that my exported .xml file was over double the size (25.1MB vs 10.4MB, and 348k lines vs 141k line) it was when I exported from the original host, yet I only added three posts since then.
While investigating this anomaly, I noticed that there is a lot of crufty Meta Data in these XML files. I’ll admit to being somewhat plugin happy back in the day, but my blog has also been around long enough that authors have dropped support for some plugins causing me to find a new one to replace that functionality.
The biggest culprit seems to be a related posts plugin called blogglue, that has an huge amount of javascript in the meta section each post!
<script type="text/javascript" defer="defer"> BlogGlue = window.BlogGlue || window.Arkayne || {}; BlogGlue.baseurl = 'https://www.blogglue.com'; BlogGlue.go = function(e, a, cid, gid) { var id = a.getAttribute('id'); var orig = a.getAttribute('href'); var target = a.getAttribute('target'); var redir = [BlogGlue.baseurl, 'link', cid, gid, ''].join('/'); redir += '?ts=' + Math.random(); redir += '&url=' + escape(a.href); a.setAttribute('href', redir); setTimeout('BlogGlue.restore("' + id + '", "' + orig + '")', 0); return true; }; BlogGlue.restore = function(id, orig) { var a = document.getElementById(id); if (a) a.setAttribute('href', orig); }; </script> <div class="blogglue_plugin" style="display:block;margin:5px 0px 20px 0px;"> <h3 class="blogglue-header blogglue-inner"> More from Rick Hamell </h3> <ul class="blogglue-links blogglue-inner"> <li id="blogglue-inner-1"><a href="https://PNWPhotoBlog.com/2010/10/04/painted-hills-oregon-2/?utm_source=BlogGlue_network&utm_medium=BlogGlue_Plugin" id="blogglue-2845683" target="_parent" onclick="return BlogGlue.go(event, this, 2847250, 2845683);" title="Painted Hills, Oregon">Painted Hills, Oregon</a></li> <li id="blogglue-inner-2"><a href="https://PNWPhotoBlog.com/2008/09/27/oregon-sunstone-macros/?utm_source=BlogGlue_network&utm_medium=BlogGlue_Plugin" id="blogglue-2847735" target="_parent" onclick="return BlogGlue.go(event, this, 2847250, 2847735);" title="Oregon Sunstone Macros">Oregon Sunstone Macros</a></li> <li id="blogglue-inner-3"><a href="https://PNWPhotoBlog.com/2010/11/14/fort-dalles/?utm_source=BlogGlue_network&utm_medium=BlogGlue_Plugin" id="blogglue-2845649" target="_parent" onclick="return BlogGlue.go(event, this, 2847250, 2845649);" title="Fort Dalles">Fort Dalles</a></li> </ul> <h3 class="blogglue-header blogglue-cross"> Rick Hamell recommends </h3> <ul class="blogglue-links blogglue-cross"> <li id="blogglue-cross-1"> <a href="https://www.yourpersonaldevelopmenttips.com/self-help/self-mutilation-why-they-do-it.html?utm_source=BlogGlue_Network&utm_medium=BlogGlue_Plugin" id="blogglue-2683336" target="_blank" onclick="return BlogGlue.go(event, this, 2847250, 2683336);" title="Self-Mutilation: Why They Do It"> Self-Mutilation: Why They Do It </a> <span style="font-size:80% !important;"> (richarddacker)</span> </li> <li id="blogglue-cross-2"> <a href="https://www.yourpersonaldevelopmenttips.com/self-improvement/be-the-change-do-it-dont-just-say-it/?utm_source=BlogGlue_Network&utm_medium=BlogGlue_Plugin" id="blogglue-3260061" target="_blank" onclick="return BlogGlue.go(event, this, 2847250, 3260061);" title="Be The Change! Do It Don’t Just Say It"> Be The Change! Do It Don’t Just Say It </a> <span style="font-size:80% !important;"> (richarddacker)</span> </li> </ul> <div class="blogglue-footer" style="margin:10px 0px;display:block !important"> <a href="https://www.blogglue.com/12357-9af21e2e0faaf1411714ccff376cb311/?utm_source=BlogGlue%20Plugin&utm_medium=Recommend&utm_campaign=Plugin&coupon=HAMELLR&blogglue_page=2847250" target="_blank" style="text-decoration:none !important;"> <img src="https://www.gravatar.com/avatar.php?default=%2F%2Fs3.amazonaws.com%2Farkayne-media%2Fimg%2Fprofile%2Fdefault_sm.png&size=24&gravatar_id=3db0f3e1180dbb4676512e0cda50e98a" width="24" height="24" border="0" alt="Blog Margeting Related Posts Plugin For hamellr" style="display:inline;margin: 0 5px 0 10px; border:1px solid #AAA; width: 24px !important; height: 24px; !important;"/><span style="position:relative;top:-8px;font-family:'Trebuchet MS'; font-size: 0.8em;">Ask <strong>hamellr</strong> To Recommend Your Posts</span> </a> <img class="blogglue-hit" style="border:none;left:-9999px;position:absolute;" src="https://www.blogglue.com/widget/hit/2847250.GIF" border="0" alt="Blog Marketing Related Posts Plugin Counter" /> </div> </div>
They’re not the only culprit, just the worse. Is there any way to easily and quickly delete sections of this post meta data? Or even delete it all? Or is there a way to export posts with Tags and Categories intact, but nothing else?
- The topic ‘How to – REALLY clean up posts? (remove crufty meta’ is closed to new replies.