Tags to Delete From your WordPress Theme to Decrease Server Load
Tags to Delete From your WordPress Theme to Decrease Server Load
WordPress themes are generally designed to be as easy to install as possible. Just upload your theme, activate it, and you’re done. It finds your blog’s name, description, feed URL and almost everything else.
Behind the scenes (the backend) WordPress is working furiously with your theme to provide the necessary data. WordPress interrogates the theme’s PHP tags and supplies the necessary information. However, it has do this every time a page is loaded. This takes time, requires database queries to be executed and can cause high CPU usage.
As most of this information never changes, you can hard code this data into your theme and delete these tags. This means your server has less to process next time around, so reducing database calls and CPU usage.
Before You Begin
Before you begin backup your database and your site. I would suggest you only do these modifications on a local server and not a live site. See, Installing WordPress in a Local Development Environment Using WampServer (Video).
The best and easiest way to replace your themes tags is to display a page from your blog and view the page source code.
With the page source code ready, go through your theme’s source code and look for the following tags. Find each tags corresponds data in the page source code and copy/paste the data from the page source code over the theme tags.
Save the theme file after every change and check the new version of the page source code is identical to the old.
Common Theme Tags in WordPress
Found in Header.Php:
<?php language_attributes(); ?>
<?php bloginfo(‘html_type’); ?>
<?php bloginfo(‘charset’); ?>
<?php bloginfo(‘stylesheet_url’); ?>
<?php bloginfo(‘pingback_url’); ?>
<meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” />
Found Throughout the Theme:
<?php bloginfo(‘name’); ?>
<?php bloginfo(‘stylesheet_directory’); ?>
<?php bloginfo(‘description’); ?>



