Remove shortcodes from WordPress posts

Shortcodes are pretty nifty things so WordPress plugins and themes often use them to add complex interactive elements to posts or pages with a single line of code.

But when you switch a theme or deactivate a plugin that relies on them the shortcode doesn’t just go away, instead you end up with weird bits of code on your posts and pages which can be troublesome to locate and remove depending on the size of your site.

Recently, we upgraded a simple eCommerce website to a powerful WooCommerce store and were tasked with removing the old plugin shortcode [wp_eStore_buy_now_button] from countless posts that would have been a mammoth task if done manually.

Instead, we added a shortcode of our own to the theme functions file that deleted them all instantly.

 * Remove WordPress eStore shortcodes from posts
function shortcode_remover($attrs=array()) {
    return '';
add_shortcode('wp_eStore_buy_now_button', 'shortcode_remover');

You can use this code to clear up shortcodes on your site as well. Simply replace ‘wp_eStore_buy_now_button’ with the shortcode you’d like to remove.

Speed up your WordPress Site

Page speed has a direct effect on search rankings, and a faster site also improves the user experience of your website visitors. So here are some easy tips to speed up your WordPress website.

01. Optimize your images

Large images slow down your site frustrating users. Smush is a great compression tool that uses non-lossy image optimization to reduce file size without compromising on quality. It helps to improve page loading time and your Google Page Speed.

02. Optimize your HTML, CSS & JS

Optimize your HTML, CSS & JS
Fast Velocity Minify combines CSS and JavaScript files so your server deals with fewer requests. It works out of the box and requires little configuration. But after installing it, be sure to check your site in incognito mode to ensure it looks great to logged out users. It can conflict with some themes and plugins.

03. Cache your site

WP Super Cache works by serving up static HTML files of each page on your website instead of processing heavier WordPress PHP scripts, reducing database queries and the load on your server. It helps to improve the speed and performance of your website.

04. Remove slow plugins

usage dd
UsageDD adds a small box at the bottom of your page (only visible to admins) that shows the number of database queries, memory used, time to first byte (TTFB) and the time to generate a full page. It can help you find out which plugins are heavy on resources and slowing down your site.

Post-processing of the image likely failed because the server is busy

Post-processing of the image likely failed because the server is busy

We came across this error for the first time recently when a client emailed over an image he was having trouble uploading to his WordPress membership site.

A bit of research later showed this warning can be caused by quite a few issues – but an easy one to rule out right away (which we failed to notice) is whether your filename contains any punctuation marks as that’s kryptonite to some servers.

If that doesn’t fix the issue try using incognito mode or a different browser. Cache and cookies can cause WordPress any number of weird issues.