Unnecessary load on your website is like uninvited guests at your home, some of them are good but most of them will make your life difficult instead of helping you anyway. They will keep you busy and for that you may miss your real guests. There are thousands of bots crawling in the web daily but not all of them are made for you nor are they of any help to you.
In order to solve the unnecessary crawling/load on the server it is recommended to follow the next optimization steps for your sites.
1. Pay attention to the scripts provided in this post. Special attention should be paid to scripts that use MySQL. Maybe changes to some part of code are needed. For example:
– Disconnect Post Revisions in file wp-config.php define (‘WP_POST_REVISIONS’, false);
-Reduce the number of request. Eliminate unnecessary requests to expedite the generation of the page. For example, the following typical code can be removed if found in all the themes.
<meta http-equiv=“Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
<meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8” />
2. Update CMS to the last version available (http://wordpress.org/download/)
3. Update all used plugins for WordPress CMS, and delete unused.
4. Install next WordPress plugins:
– Optimize Db. Can be downl oaded at http://wordpress.org/extend/plugins/optimize-db/
– WP-super-cache plugin or any other plugin that enables caching for this CMS (link to wp-super-cache -http://wordpress.org/extend/plugins/wp-super-cache/) or WP3 Total Cache, it can be downloaded from http://wordpress.org/extend/plugins/w3-total-cache/
– Avoid plugins that cause high CPU load such as:
*All in One SEO
*Broken Link Checker
*Yet Another Related Posts Plugin
5. Disable wp-cron by editing your wp-config.php file and eding line:
Create the following cron task in your control panel:
0 */2 * * * wget -q -O – http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
6. Don’t use ETags unless customer are taking advantage of it. How to http://www.tipsandtricks-hq.com/how-to-add-far-future-expires-headers-to-your-wordpress-site-1533#removeEtags
7. Use external scripts. Instead of placing tons of code in your header.php file, use external scripts. This allows the browser to cache the script so it won’t have to read it for every other page
8. Keep page sizes less than 100 Kb. Do not use too many unnecessary images and video on a page. Always compress the images appropriately.
9. limiting unneeded hits through a robots.txt
As for robots.txt file please refer to the following link to know correct syntax for it: http://www.robotstxt.org/
10. for the wp-login.php; it might simply means that your wordpress dashboard is open for brute force. You can resolve it by limiting access to your wp-admin folder to specific IPs in case no one else is supposed to gain access other than the administrator. (http://www.netmagazine.com/tutorials/protect-your-wordpress-site-htaccess)
11. There is a WordPress plugin called “Login Lockdown, http://wordpress.org/extend/plugins/login-lockdown/ which will block any IP that guesses an incorrect password a certain number of times.
This post is written specially for those sites using WordPress CMS. However some of the points are also applicable to other sites. We welcome some comments in this thread, please feel free to comment and share your ideas to make the webmaster’s life easier to fight the spam’s and save bandwidth.