• Hey guys,

    I am trying to speed up my wordpress blog by removing non-essential stuff. With regards to my header.php, there are 4 link elements –

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>RSS Feed" href="<?php bloginfo('rss2_url'); ?>"></link>
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/print.css" type="text/css" media="print"></link>
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"></link>
    	<link rel="shortcut icon" href="<?php echo bloginfo('stylesheet_directory') ?>/images/favicon.ico"></link>

    That’s 4 extra calls to the database and I was wondering if I could replace/delete some or all of these. Any advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • WordPress caches data in memory, so those are probably just calls to memory rather than the database.

    The first line says where to find your RSS feed.
    Second says where to find your CSS (stylesheet), don’t delete that ever.
    Third says where to send pingbacks (if someone mentions your blog).
    Forth says where to find the icon for your website.

    Thread Starter ajaytct

    (@ajaytct)

    Thanks for the reply. I read this article and thought I should clean up my header.php, but now wordpress just hits the memory cache instead of the DB?

    Okay, I just checked the code involved with loading at least the core options and essentially, any options that are marked in the database as ‘autoload’ will be loaded automatically anyway (in one query). If it’s not been autoloaded, WP checks if it’s been called before and cached, and if that’s not the case, then it’ll do a query to get it.

    I just had a quick peek at a pretty standard WP install too and almost all options are marked as autoload too, so I think that article is a bit… silly. It probably is hitting the memory cache most of the time, which might explain why WP is so RAM heavy sometimes!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove link elements in header.php?’ is closed to new replies.