Help with speeding up my site?

Hi WPMUDEV,

I was wondering if I could get some help and insight from a professional regarding the speed of my website.

Ever since I switched my theme to Upfront using the Issue theme, my site has just become extremely slow.

I've installed all of WPMUDEV's suite of plugins (that I know of) to help things along, but my score still remains at a deplorable 55! (According to HUMMINGBIRD...it's even worse on other page speed testing sites....).

I've followed all the recommendation guidelines as outlined in HUMMINGBIRD, including utilising SMUSH, minification, and G-zipping....

My worst score, of 47/100, falls under the "Improve Server Response Time" tab.

From here, I have installed the WP-Cache plugin, which improved it marginally.
I have also installed the Query Monitor plugin as also suggested in the recommendations.

I am not very use to this plugin yet, but it's showing there's a lot of 'slow' database Queries occurring on page load.

The problem is, I'm not really sure what to do about this...so I am hoping this is where my membership with WPMUDEV can help, by asking someone one who is much more experienced in this area than me.

Please feel free to have access to the site (already activated). I am hoping you can pick up on something that can help the site run a lot faster.

Thank you kindly in advance

  • Dimitris

    Hello there Ana,

    hope you're doing good today! :slight_smile:

    I've accessed your website and run a new Performance Report and results were a bit better this time, total score is 70!
    On top of that, I'd like to mark some notes for you:

    a) PHP memory limit in server seems to be very low, 256M
    You can see this in the System Info screen here
    http://yourdomain.com/wp-admin/admin.php?page=wpmudev-support&view=system#tab-php

    In order to increase memory limits, please have a read here
    https://premium.wpmudev.org/blog/increase-memory-limit/
    You should increase PHP memory_limit to a higher value like 2048M (via php.ini, .htaccess or your cPanel or whatever server panel you may have).
    After doing so, also edit edit wp-config.php file and insert the following line just above the /* That's all, stop editing! Happy blogging. */ comment

    define('WP_MEMORY_LIMIT', '512M');
    define('WP_MAX_MEMORY_LIMIT', '1024M');

    (you should see the later changes in System Info -> Wordpress [tab] here http://yourdomain.com/wp-admin/admin.php?page=wpmudev-support&view=system#tab-wordpress)

    b) Update of Upfront parent theme, won't make things a lot faster, but it includes many fixes as you can see in the changelog here: https://premium.wpmudev.org/projects/category/themes/

    c) HummingBird's recommendation: "Enable compression"
    The reported files there can't be further optimised. #1 about Upfront dependencies is already reported and hopefully will be included in next updates, #2 is about an SVG image that can't be handled by GZIP compression and #3 & #4 are about the combined CSS files from HummingBird Minification which are served from our CDN service. You can either deactivate the CDN service and serve the files from your server (so they could be further optimized), or just leave these as is, as they're already minified in most of their part.

    d) HummingBird's recommendation: "Improve server response time"
    This score may vary in each performance scan, as it depends on how server reacts each time. In latest report, it did responded quickly, but on the first load of homepage I can see that it needs at least 9s to respond.

    I'd rather advise you to migrate to a more powerful server, which also utilize some more caching mechanisms like Redis or Memcached, and also experiment with the advanced options of WP Super Cache plugin (https://makeaweblog.com/best-wp-super-cache-settings/), or even try a more modular and sofisticated caching plugin like W3 Total Cache (https://premium.wpmudev.org/blog/w3-total-cache-introduction/).

    Warm regards,
    Dimitris

  • Ana

    Hi Dimitri,

    A deep thank you for spending the time to look into my site for me, really grateful to be able to have the advice from a knowledgeable person on hand.

    I’ve taken the time to go through all your recommendations you've kindly outlined above:

    STEP A) Increasing PHP memory limit

    I gave this a go several times following the instructions both in the article linked and the notes written here above. After debugging each process, here are the following outcomes:

    A) php.ini method
    There was no php.ini file in my wp-admin folder so I created one following the directions in the linked article. Once I uploaded this file, I went on to test the live site just to see if it made any changes. When the site loaded, everything was broken visually, as if the theme was corrupted or something, or the CSS/Assets were not loading properly…I thought this was because I had not completed the following-up steps recommended by you and also in the article. So I proceeded to go on to alter the .htaccess and then the wp-config.php file.

    For the wp-config file, I added this line as written in the reference article:
    define('WP_MEMORY_LIMIT', '3000M');

    And for the .htaccess, the same code shown in the reference article also:

    `php_value upload_max_filesize 1000M
    php_value post_max_size 2000M
    php_value memory_limit 3000M
    php_value max_execution_time 180
    php_value max_input_time 180`

    ….now when I tested the site, I got an Internal Server Error:

    ------------------------------------------------------------------------------
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
    More information about this error may be available in the server error log.
    ------------------------------------------------------------------------------------------------------------

    From here I worked backwards, first removing the php.ini file, the Internal error still persisted.

    Then I alternated between testing the .htccess file change, and the wp-config file change.

    When only adjusting the wp-config file, the site works as the original.

    When only adjusting the .htaccess file, I get the Internal Server Error.

    So both files I get the Internal Server Error still, but when just adjusting the wp-config file and leaving the .htaccess file alone, the site works as normal

    Checking the System Info via the link you provided, does reflect a change though, showing the memory_limit to now be 3000M

    …so is this right?
    Does this complete the step A) in this post for increasing PHP memory limit?
    Or is there further amendments I need to take?

    STEP B) Updating parent theme.
    This is something I was purposely holding off for a bit due to problems I had last time when I updated the theme.

    After updating, I lost all my customisation for my home page (the ‘virtual page’ upfront generates, as I’ve seen it called in another post in the past…? ). So I had to re-do it all.

    Another issue after the theme update was my woo-commerce shop page also lost all its customisation, again leaving me to re-do it all….

    And the final problem was the woo-commmerce image gallery lightbox stopped functioning, it now just loads a picture in a page (I still haven’t addressed finding a solution for this yet!).

    I’d like to know your thoughts on this, and if you would happen to know if these issues may occur again after the update?

    STEP C) Compression
    Ah, that makes sense. I’m glad you mentioned this because all the other third-party webpage testing sites pulled these files up…and I was puzzled as to how to go abouts compressing them….so thanks for clarifying this, at least I can take this out of the equation (for now). I do indeed look forwards to the update addressing this!

    STEP D) "Improve server response time"
    Thank you for providing me that information regarding the advanced options of WP Super Cache. I followed all the steps in the article an adjusted the settings accordingly.

    I plan on reading through the other article you linked here regarding the more advanced caching plugin. Hopefully it will help improve things even more.

    I have also taken notice of your suggestion to upgrade our hosting.

    Do you think that ultimately this is going to be what we will have to resort to?

    The site is for my Uncle, that I’m just helping out with. I’ve never dealt with a site this big before, or one that’s an ecommerce…I just wonder if it’s worth him adding the extra cost as he is just starting out? Actually, I am not even sure what the extra cost would be? Do you know if it’s something substantial?

    If we do, I will certainly be aware of looking out for the more advanced chaching mechanisms you have made me aware of, such as the Redis ot Memcached, thank you for clarifying this for me.

    Score
    You must poses the magic touch for being able to get that score of 70! Because after implementing all the points you suggested above, I ran a performance test again in Hummingbird, and only received 54 again! So is this the scenario you alluded to regarding variations in how the server can react each performance scan?

    That’s it for now, I look forwards to hearing what your response is as I feel I can then move on. Sorry if I’ve given you a lot more to address….I am really grateful for all your help so far.

    Warm Regards.

  • Nastia

    Hello Ana

    I trust all is well!

    I've checked the WordPress info t and looks like the current PHP memory is set to 3000 MB so this is good :slight_smile:

    You need to increase the PHP memory only in one of the files, either if will be the wp-config.php, or .htaccess file, or php.ini files

    The Internal Server Error showed up probably after editing the .htaccess file. Some servers do not allow increasing PHP memory and max_execution_time from the .htaccess. Though the Memory is increased and the step A is complete.

    After updating, I lost all my customisation for my home page (the ‘virtual page’ upfront generates, as I’ve seen it called in another post in the past…? ). So I had to re-do it all.

    Another issue after the theme update was my woo-commerce shop page also lost all its customisation, again leaving me to re-do it all….

    I am sorry to hear that you've experienced this issue, if the changes were CSS, and they were added to themes' general CSS then it is possible that the code has been lost. We suggest to create a new preset for each element and add the CSS code inside the element. This way after an update it will not be lost.

    Though, please make sure to run a full site backup before any update. This way you can revert the changes back.

    And the final problem was the woo-commmerce image gallery lightbox stopped functioning, it now just loads a picture in a page (I still haven’t addressed finding a solution for this yet!).

    Would you please share a link to this page so we could have a closer look?

    In Upfront > Experimental, please try to turn On Optimization, save changes and see how this affect the loading speed of your site:

    You can also play with the options below, switch from none, to Aggressive to Hardcore and see how it affects the front end.

    If you are not doing any changing in Appearance at the moment, please enable Cache frozen assets this will serve the front page faster to the end users. You can also enable "Enable Upfront Compress Response". Please note, these features are experimental and each site is affected differently.

    In Minification, please try to combine CSS and JS files by clicking on Combine option

    Also please try to move the JS files position (marked with yellow color) to a footer, by clicking on Footer button. Move the files one at the time, each time checking the changes at the front end. If something will look broken, move the position back from footer to restore the appearance.

    For more information please have a look at the following articles:
    https://premium.wpmudev.org/blog/hummingbird/
    https://premium.wpmudev.org/blog/hummingbird-cloudflare-integration/
    https://premium.wpmudev.org/blog/eliminate-render-blocking-issues-hummingbird/

    As for hosting provider cloud hosting is a good option, please feel free to post a question in our Member's community where you can ask our members about their hosting provider and compare the results :slight_smile:

    Hope this helps!

    Kind regards,
    Nastia

  • Ana

    Hi Natsia,

    It’s been a while since this post, but I wanted to thank you for all those tips to help further improve website speed.

    Been through the wringer trying to test out all these options! But finally reached somewhat of a conclusion as to what works (without breaking the site), so thought I’d update you here.

    First off, I read the Cloudflare article you provided and thought this would be a good place to start. In the beginning I had problems getting the DNS name-servers to work, as cloudflare wasn’t pulling out the correct details, the site became inaccessible for a while, but gratefully my host went into my CloudFlare account for me and fixed it all up. After this I set CloudFlare up in Hummingbird and all seems to be ok.

    Next, I experimented with the Upfront Optimization settings you suggested. Thanks for this, I didn’t even know that setting was there! So after many goes of changing a setting – testing – repeat…I have found that the only setting I could really enable without weird things happening here and there on the site, is the “Enable Upfront Compress Response”.

    With the advice on the Minification in Hummingbird, I tried to combine, minify and defer where ever possible. This took the most time to experiment with and check, but got there in the end. I found that something was breaking and I didn’t know what it was…in the end, I decided to use minification through CloudFLare, then reinstall Hummingbird.

    Hummingbird picked up that the files were already being minified, and the site was not broken on the front-end. So from here, I used Hummingbird just for the combining and deferring of CSS and JavaScript wherever possible.

    Actually, I’m not too sure whether some of the actions are happening, as some of the buttons stay blue, and some Dark Grey, in which cannot be clicked upon anymore. This to me signifies that the action indeed has been activated (as you cannot click on it anymore) whereas the blue buttons remain clickable….just not too sure what the difference here is? But perhaps I’m overthinking...

    So where I'm at now is seeing some improvements in site speed, but still nowhere as functional as we’d like it. I think this has a lot to do with hosting now, so I’ll be going down that road next.

    I am also considering WP-Rocket as an alternative from WP Super Cache I’ve installed as per suggested here. Do you have any thoughts on this? And will this work ok with Hummingbird?

    The only reason it’s on my radar is because this is a WooCommerce powered store, and there are a few people suggesting Wp-Rocket for WooCommerce specifically, but I’m not sure whether to believe them or not!

    May I ask one more thing? The Query Monitor plugin always indicates the presence of “Slow Queries”. Upon inspection, the query constantly showing up is from the wp_options table….do you know what that means? Is it due to the slow server response and connecting to the database? (so the hosting issue)?

    Sorry again for the long post, and thank you all for being so helpful so far! Love this membership for the support alone! =D

  • Dimitris

    Hello there Ana,

    really appreciate your kind words here! :slight_smile:

    Actually, I’m not too sure whether some of the actions are happening, as some of the buttons stay blue, and some Dark Grey, in which cannot be clicked upon anymore. This to me signifies that the action indeed has been activated (as you cannot click on it anymore) whereas the blue buttons remain clickable….just not too sure what the difference here is? But perhaps I’m overthinking...

    Gray-out buttons in Minifications mean that this action can't be used. This is for example if your server uses HTTP/2, then all Combine buttons will be deactivated as combining assets in HTTP/2 isn't proposed.

    I am also considering WP-Rocket as an alternative from WP Super Cache I’ve installed as per suggested here. Do you have any thoughts on this? And will this work ok with Hummingbird?

    HummingBird just introduced a Page Caching module in HummingBird, apart from Browser and Gravatar cache. You may want to give this a try! :wink:
    https://premium.wpmudev.org/blog/hummingbird-gets-full-caching/

    May I ask one more thing? The Query Monitor plugin always indicates the presence of “Slow Queries”. Upon inspection, the query constantly showing up is from the wp_options table….do you know what that means? Is it due to the slow server response and connecting to the database? (so the hosting issue)?

    This could be happening due to a number of reasons as there're many plugins that use this generic database table to store options. If I'm not wrong, this is also being used from WooCommerce plugin, so querying this table, especially in case it has become really huge, can lead to slow responses. Caching is what can help you surpass this (and a powerful server of course).

    Warm regards,
    Dimitris