Optimize Websites For Speed And CPU Usages

After setting up blog(s) on server, create themes, write posts, get traffic, then we need to optimize the websites to be fast and efficient. There are 2 webtools to check the speed of our pages.

pingdom tools     google pagespeed

1. Move all JavaScripts to Footer instead on placing them on the <head> sections. We want to load the whole page up fast before any scripts.

scripts in footer

2. Use js minify & css minify tools to minify all css and js files used on the footer to reduce the sizes for faster page loading.

css minifying     js minifying

3. Compress and deflate files at the server level for faster page loading. Add commands in .htaccess of the blog.

# BEGIN Compress text files
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
# END Compress text files

4. To reduce CPU usage – Turn off the WP_Cron in the wp_config.php file and install super cache plugin.

disable wp_cron

5. Spams also cause CPU usage – to prevent spam to login as administrator – add the ip address and deny all others in .htaccess.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.