Keep your blog running at peek condition!

Version: 13.1
Revision: 33 Build 11

Keep your blog running at peek condition!

wordpress-turboIntroduction:
On the 26th November, 2009, I was reading and researching, just to write a good tutorial that could help many webmasters and publisher maintain their websites and keep it at peek condition! So, why not read this article and keep an eye on your server’s performances, uptime and optimize it to keep your readers and guest happy? It could be helpful in the future!

1.] Test your stability and speed!

When you are accessing your website, you can check your host’s speed and reliability. This can be done if you benchmark your original performance with a little tweak and optimizations, just get your website running a little faster.

Pingdom Services.
————————
If you want to check your website’s server – load, latency and response time, you can use this service and get a report!

Link: http://tools.pingdom.com

YSlow Plugins.
———————–
This plug-ins is for Firefox browser and it integrates itself into Firebug. It will also benchmark your website and show the final results.

Link: http://developer.yahoo.com/yslow/

Show number of queries and response time.
———————–
If you are using WordPress to write articles or as a hobby, you can use this little script to show the number of queries and response time.

Notes: a lot of your readers will ignore these little snippets. So, you will need to add this into your ‘footer.php’ file.

<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>  seconds.

If you want to hide the above codes from the search engines and the public, you can use this source as an alternative. However, you can only see this, when you are logged in as an administrator / publisher.

<?php if (is_user_logged_in()) { ?>
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
<?php } ?>

Tips: regarding what numbers are good, it’s the number of “SQL queries”, especially, if you are on shared server. In other words, the fewer queries you have, the faster your site will respond.

Web hosting provider.
———————–
For new user / webmaster, you will need to think carefully about your hosting provider and your web-hosting plans. However, building your blogs or websites on a free server / shared server, you will eventually be in big trouble and your readers will not be pleased or happy. So, think carefully and decide which provider are the best for your readers and your guests.

Here is my previous post on web-hosting. You will be surprise if you are hosting on a shared server.

Previous post: Click Here!

Here is a simplified version if you don’t understand.
———————–
Shared Hosting & Free Hosting: on average you’ll be sharing a single server with 100 webmasters and publisher.

VPS hosting: you may be sharing a single server with 20 – 30 webmasters and publisher.

Dedicated hosting: you’ll have a whole server to yourself. This means, you are not sharing your bandwidth and spaces with anyone!

Advice: never ever host your website on a server that forces ads (excluding your adverts). This will reduce your server responses and time. It will also affect your search engines!
So, be careful and don’t go cheap!

2.] Final results and optimization.

When you are done with the first part, you can collect all of your information and improve it. Here is some more to optimize your website…

a.] Increase your max ‘Apache Connections’.
But, don’t go overboard with your resources or else, you will run out of RAM!

File: httpd.conf

max_connections = 60
max_connections= 100

b.] Optimize your ‘MySQL Query Cache’.
Since WordPress communicates quite heavily with your SQL database, you’ll need to ensure that your “my.cnf” configuration suits your hardware setup.

File: my.cnf

[mysqld]
query_cache_type = 1
query_cache_limit = 2M
query_cache_size = 20M

Notes: if you have this in your server, your sql will get cached and it doesn’t have to load the table for a second time.

Simple…

c.] Keep your image simple!
If you have a large image-header and it takes a long time to load, you can easily convert it to a ‘JPEG’ file format. This will also reduce your response time and server load.

Notes: if you have image banners, you will need to keep them as ‘GIF’ formats. But, don’t go crazy with ‘PNG’ format!

d.] Clean up your codes!
When you have a new template / website, you will need to clean up your line breaks, white-spaces and your tags. Also, it’s alright if you have a few white spaces. But, don’t get too ‘Cinderella’ with it and shave it off to save those extra bytes!

e.] Keep your WordPress up to date with releases!
Staying up to date with the latest version of WordPress is critical. Once in a while, there are usually a lot of performance enhancements. The developers at WP don’t release updates just for fun and laughs. They are doing this just to make WordPress better.

f.] Keep your plug-ins in good condition!
Keeping up to date with the latest plug-ins is important. WP plug-ins developers released new versions because they’ve modified the codes in some way, just to make it better. So keep your eyes on the updates!!

g.] Disable or delete unused plug-ins.
If you are not using your plug-ins, you can disable it and delete it. This will free up your server spaces, memory and bandwidth. It will also improve your website’s response time. In other words, the more plug-ins you have, the longer it is for the website to load. So, keep an eye on your plug-ins!

h.] Using external scripts.
If you have tons of script in your headers, you will need to transfer them into another file and link them. In other words, you are linking an external file that will only load once! So, you don’t have to load that page again and it will load much faster!

When you are doing this, all of your stylesheets and javascript files are cached and they will be ignored by the browser. However, if there is an update, it will fetch the new file and replace it with the new version.

i.] Remove and disable post revisions.
When you are using WordPress, there will always be a new auto-saved revision. So, I would recommend everyone to disable it. If you don’t, this can clog up the database and the size will increase. This can be alarming if you keep your old revisions for a month!

- Add this line to “wp-config.php”.

define('WP_POST_REVISIONS', false);

- Run the following query in PHPmyadmin to delete all current revisions.

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'

j.] Reduce queries and keep the flow!
When you are using WordPress to post articles, it is best to reduce the number of queries.
This will also reduce your server load and reduce your bandwidth.

k.] More memory!
By default, your blog will need more memory, if you are showing photos and images.
So, you will need to copy this code and save the file as: “php.ini”.

memory_limit = 64M
register_globals= On

Copyrighted By Lair360

Comments are closed.