4 More Things You Should Remove From WordPress

Remove unnecessary things and make WordPress fasterFirst up, a big thank you to everyone who weighed in on the discussion on our last article and offered suggestions on things that can/should be removed from WordPress. There were some interesting ideas thrown about, so I thought we’d follow this up with a sequel.

So on with the show. Here are four more things that you can remove from WordPress – for a cleaner, faster and healthier website.

1. Post revisions

Delete post revisions for a faster WordPress siteWhen you’re writing a page or post, WordPress automatically saves revisions of your work, so you can access a previous version of your content if necessary.

Some people make heavy use of WordPress revisions, but a majority of bloggers and site owners have no need for them at all.

You can free up a lot of space on your WordPress database by getting rid of old revisions and controlling the number of new ones that get created. The easiest way to do this with the Revision Control plugin or something similar.

2. The theme editor submenu

Remove the theme editor submenu from WordPressThis one is particularly important if you’re a WordPress developer who creates self-managed websites for non-WP folk. The last thing you want is an unsuspecting client stumbling into the theme editor and accidentally destroying the site you’ve built for them.

The easiest way to avoid this scenario is to simply remove the theme editor from the dashboard altogether.

This is a topic we’ve covered previously at WPMU. Check out this article for instructions on how it’s done.

Featured Plugin - WordPress Q&A Site Plugin

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

3. Unnecessary code

Delete the unnecessary code from your WordPress siteDepending on what you’re using your WordPress site for, you don’t necessarily need all of the code that is included by default.

Unnecessary code can clutter your WordPress site and drag down your page loading times. So it’s a good idea to clean house once in awhile and get rid of anything you don’t actually need for your site to work properly.

You can check out a couple of interesting articles here and here for suggestions on removing unnecessary code from WordPress.

4. Comments on pages

Disable commenting on your static WordPress pagesIf you’re using WordPress as a CMS, for a small business website or something like that, it’s usually a good idea to disable comments on the static pages of your site. You don’t really want site visitors leaving comments on your ‘About Us’ or ‘Contact Us’ pages – it looks pretty weird.

Most people want to disable comments on static pages but keep them on blog posts. To do this, you’ll need to get into the page.php file of your WordPress theme. Find the following line of code, and delete it:

<?php comments_template(); ?>

This removes the comments option from the static pages of your WordPress site.

Are we missing something?

If you’ve got any more suggestions for slimming down WordPress that weren’t included in this article or the previous one, please leave a comment below and let us know.

Featured Plugin - WordPress Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Image credits: Stack of Documents, Male Comment Icon, Blue glowing source code and Delete Button from Bigstockphoto.

Comments (27)

  1. Hi Tim,…
    Very interesting article.
    I don’t know if what I’ll write is already in your past article.

    Recently,I upload plugins and themes to my WP site.
    When I check my cpanel,there are zip files of every plugins and themes those I uploaded.
    These zip files can be removed as well. No worries.
    I got this solution from a friend in WPMU Dev forum, thanks to Riyaku and David.
    Actually I didn’t find this problem before,is there anything I should know about??
    Is there anything to do with my premium membership or its just WP/WPMU new setting??

    Thanks
    Arda

  2. Great post Tim! These are definitely good things to remove. I also like to remove a few other Dashboard menu items that people rarely use:

    1. Tools – you might use this once to import/export your site data
    2. Links – I rarely used this before the implementation of WP Menus….now I never use it.

    Also like to get rid of some dashboard widgets:

    1. Recent drafts
    2. Incoming Links
    3. Recent comments
    4. Plugins
    5. Primary (WordPress RSS Feed)
    6. Secondary (Additional WordPress RSS feed)

    I personally like to remove these items because the distract from managing content and can sometimes be confusing. The following coded added to my functions.php or as a MU plugin does the trick for me.

    // disable default dashboard widgets
    function disable_default_dashboard_widgets() {

    remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘core’);
    remove_meta_box(‘dashboard_incoming_links’, ‘dashboard’, ‘core’);
    remove_meta_box(‘dashboard_plugins’, ‘dashboard’, ‘core’);

    remove_meta_box(‘dashboard_recent_drafts’, ‘dashboard’, ‘core’);
    remove_meta_box(‘dashboard_primary’, ‘dashboard’, ‘core’);
    remove_meta_box(‘dashboard_secondary’, ‘dashboard’, ‘core’);

    remove_menu_page( ‘link-manager.php’ );
    remove_menu_page( ‘tools.php’ );
    }
    add_action(‘admin_menu’, ‘disable_default_dashboard_widgets’);

  3. I indeed found that a fast WordPress gets better SEO results, I tried to tweak my WordPress blog along time ago, I cleaned it much, caused it to load in really no-time, now it represents almost each posts in a matter of seconds within Google.
    These tips above are great, This is tweak time #2.

  4. Having your WordPress version number output by the wp_generator() function could have a negative impact on your site’s security.

    Making your WordPress version number available (as it is by default) can make it easier for hacker to use a known weakness in that version. The easiest way to get rid of this is to add the following to your theme’s function.php:
    remove_action(‘wp_head’, ‘wp_generator’);

  5. …and here a working code to remove the dashboard-widgets (the code from Shawn has not work for me :():


    // remove standard dashboard-widgets
    function remove_dashboard_widgets() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
    }

    add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

    I use this part of the code above:


    // remove standard dashboard-widgets
    function remove_dashboard_widgets() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    }
    add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

    Cheers

Participate