1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress Optimization Tips - Reduce High CPU Usage And Load Time

Discussion in 'White Hat SEO' started by seoz87, Feb 4, 2017.

  1. seoz87

    seoz87 Regular Member

    Joined:
    Oct 31, 2008
    Messages:
    343
    Likes Received:
    163
    I have a very strong experience of working with very diversified wordpress websites including but not limited to eCommerce websites, directory websites, blogs, corporate website etc.

    During all these years working with wordpress, I have faced many issues ranging from high CPU usage on shared hosting to increased page load time. I have read lots of tutorials and experimented with hundreds of wordpress websites to make my websites load blazingly fast with less cpu usage on shared hosting. I am running 10 woocomerce based websites, each with almost 5000+ products on same shared hosting without any issues. :D

    Following are some of my wordpress speed and load optimization tips. Some of them are pretty common and some of them I found while researching for very specific issues.

    NOTE - ALWAYS BACKUP FILES OR CODE BEFORE ADDING ANYTHING NEW


    1. Plugins
    Install only the ones you REALLY REALLY need. I have seen people using multiple plugins for same thing at the same time. Plugins are the major reason that causes CPU load.

    Delete all the disabled plugins.

    Avoid following plugins and use their alternatives.

    ALL IN ONE SEO plugin - very high cpu consumption - Use Platinum SEO Pack instead
    Any wordpress STATS plugin - Use google Analytics
    NextGen Gallery or Any Gallery Plugin
    Disqus Comments = Use builtin comment system (or if you must use it then Disable automated comment importing )
    Any Related Posts Plugins (use Jetpack related posts instead)
    Broken Link Checker
    Really Simple CAPTCHA
    Any Post View Counting Plugins
    MyReviewPlugin
    Sweet Captcha
    EWWW Image Optimizer
    WP DB manager - Use WP-Optimize instead

    Use Plugins
    W3 Total Cache = very powerful but can also mess your website. Use wisely or Use Wp Rocket Instead

    Wp-Optimize = very useful in optimizing and removing junk form your database.

    If you are using Pretty Link - Clear hits olden than 30 days.


    2. Update
    Update plugins, themes and wordpress whenever a new update is available. It do helps with cpu usage.

    3. Themes
    Use a theme that is light on resources. Now a days almost every second theme is using Visual Composer. Try to avoid it. Select themes which uses wordpress built in customizer or widgets as page builder.

    Delete Unused Themes

    4. Woocommerce

    Go to Woocommerce > Settings > Default Customer Location - Select No Location By Default

    Go to Woocommerce > Settings > Products > Product Ratings > Uncheck Show "verified owner" label for customer review ( disable ratings on review option for better performance)

    Every other week, go to Woocommerce > System Status > Tools > and clear WC Transients, Expired Transients and Customer Sessions


    5. WP-CONFIG Optimizaition

    a. Disable WP-Cron (use manaul cron instead)

    define('DISABLE_WP_CRON', true);

    b. define website instead of letting wordpress look for it

    define('WP_HOME', 'https://www.yourwbesite.com');
    define('WP_SITEURL', 'https://www.yourwbesite.com');


    c. Increase memory

    define('WP_MEMORY_LIMIT', '64M');

    d. Restrict Posts Revisions

    define (‘WP_POST_REVISIONS’, 3); // limit number of revisions to 3

    e. Post Revision Save Time
    define (‘AUTOSAVE_INTERVAL’, 160); // in seconds



    6. Disable Avatar in Settings > Discussion

    7. Check ERROR LOGS on weekly basis atleast. it will help you a lot about load issues


    8. Images

    a. Go to Settings > Media and make every size 0.

    b. Use image compressors like http://compressor.io/ to compress image before uploading

    9. Update to PHP 5.6

    10. Add Cloudflare.com - Its FREE

    11. HTACCESS

    Although cache plugins take care of this stuff, but still make sure that you have following enabled in your htaccess

    Gzip Compress
    Stay Alive
    Browser Caching
    Expiry Header

    12. Theme Functions.php


    Add following lines to your theme functions.php

    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
    remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'start_post_rel_link');
    remove_action('wp_head', 'index_rel_link');
    remove_action('wp_head', 'adjacent_posts_rel_link');


    it removes useless scripts & info from header of your theme including emojis, next, previous links, wordpress version, live writer etc


    Extra
    1. you *may* use P3 plugin from godaddy to check which plugins are causing the load issues

    2. You may also use a subdomain to store and load images for your wordpress website. This gives you a parallel loading benefit like CDN
     
    • Thanks Thanks x 6
  2. vinogradov

    vinogradov Regular Member

    Joined:
    Aug 29, 2010
    Messages:
    224
    Likes Received:
    56
    Interesting, anybody have issues removing stuff from functions.php?
     
  3. eayor

    eayor Registered Member

    Joined:
    Feb 12, 2012
    Messages:
    67
    Likes Received:
    13
    How come this post has no comments? it's a great article indeed
     
  4. ggzy18

    ggzy18 Registered Member

    Joined:
    Jul 8, 2013
    Messages:
    71
    Likes Received:
    9
    Great summary, Easiest one of all is just as he said. Delete any unused plugins & themes.