Speedy Wordpress
The Wordpress content management system (CMS) is a pretty fast and optimized software. However by using lots of plugins and big themes can really slow it down.
1) Your Theme
Images
- Have you checked you theme for over use of the ever populare .png? png’s are a really nice tool used on the internet but are often over used were a simple gif or even jpg could have being used, or even the case were css background-color could have being used
Comment tags
- If you template is full of comments like <!– Header –> You might as well remove them as they waste space and take time to process. Tip! you can always have a commented version saved on your pc for easy editing.
Compression For CSS
- There are some real simple ways to compress your css and js on your site. First off, make a copy of your current CSS file and add the suffix “.php” to the file name. If your CSS file was named style.css your new file would be named style.css.php
- Then open header.php and find
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
and replace with<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>.php" type="text/css" media="screen" />.
- Open up style.css.php and add at the top
<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/css"); ?>- Then add at the bottom
<?php if(extension_loaded('zlib')){ob_end_flush();}?>
Compression For JS
- Same as above change filename.js to filename.js.php then also change in your header
<script type="text/javascript" src="filename.js"></script>
to
<script type="text/javascript" src="filename.js.php"></script> - Then add to the top of filename.js.php
<?php
header("Content-type: text/javascript; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>
Make It Static
- In your wordpress template header the style sheet and ping backs are dymanicy created you can simple add the path in manualy read more
2) Plugins
- If you are not using the plugin remove it. Plugins add server load as they are normaly called on ever single page load.
- Also worth a read http://www.connectedinternet.co.uk/2007/01/25/wordpress-optimisation-control-when-plugins-are-loaded/
3) Build In Cache
- Did you know Wordpress will try and cache all kinds of database queries as files on disk? It’s so simple. Just add the following to your wp-config.php:
- // Enable the WordPress Object Cache:
define(ENABLE_CACHE, true); - I have not has time to test this feature out fully, but believe it works well after reading many blogs
- Cache plugin article coming soon!!



[...] blancos, comentarios y estilos no utilizados los he comprimido de esta forma que publicó WordPress SOS en inglés y luego AyudaWordPress en [...]