Support » Plugin: bbp style pack » BBP Style Pack Slowing Down Website

  • Resolved zynnymeops

    (@zynnymeops)


    Hello!

    We have moved our website to a new, faster, server, but it is ironically running more slowly than ever.

    According to our hosing service, the cause of the slowness is the BBP Style Pack plugin, which is dynamically regenerating CSS. According to our host’s slow error logs (where they track when an individual request takes longer than 5 seconds to complete), all the slow errors are due to the BBP Style Pack plugin. Specifically, the issue is when it tried to run the “file_put_contents()” function after dynamically generating new stylesheet information.

    Here is the error log:
    [10-Jun-2019 00:47:12]
    script_filename = /www//index.php
    [0x00007faef501b8f0] file_put_contents() /www/wp-content/plugins/bbp-style-pack/includes/generate_css.php:30
    [0x00007faef501b840] generate_style_css() /www/wp-content/plugins/bbp-style-pack/bbp-style-pack.php:309
    [0x00007faef501b720] bsp_load_plugin() /www/wp-content/plugins/bbp-style-pack/bbp-style-pack.php:66
    [0x00007faef501b6a0] bbp_style_pack_init() /wordpress/wp-includes/class-wp-hook.php:286
    [0x00007faef501b5c0] apply_filters() /wordpress/wp-includes/class-wp-hook.php:310
    [0x00007faef501b550] do_action() /wordpress/wp-includes/plugin.php:465
    [0x00007faef501b450] do_action() /wordpress/wp-settings.php:397
    [0x00007faef501b2a0] [INCLUDE_OR_EVAL]() /www/wp-config.php:111
    [0x00007faef501b220] [INCLUDE_OR_EVAL]() /wordpress/wp-config.php:5
    [0x00007faef501b1b0] [INCLUDE_OR_EVAL]() /wordpress/wp-load.php:37
    [0x00007faef501b110] [INCLUDE_OR_EVAL]() /wordpress/wp-blog-header.php:13
    [0x00007faef501b080] [INCLUDE_OR_EVAL]() /www/index.php:17

    Do you have any advice on how to restructure the plugin configuration to not take so long to run the “file_put_contents()” command?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 13 replies - 16 through 28 (of 28 total)
  • I will in the morning.

    @jkw217 just checking in.. really appreciate your support here 🙂 🙂

    Hey all sorry I am late.

    Here is what to do as a temporary solution:

    go to your plugins folder > bbp-style-pack > find file bbp-style-pack.php > open bbp-style-pack.php

    Scroll to the end of the file and find:

    if (!empty ($bsp_css_location ['activate css location']) && !empty($bsp_css_location ['location'])) {
    		$location = $bsp_css_location ['location'] ;
    			// if it starts with '/' -  remove
    			if (0 === strpos($location, '/')) {
    			$location = substr( $location, 1, strlen($location) ) ;
    			}
    		// if it doesn't end with a '/' add one
    		if (substr( $location, strlen($location)-1, strlen($location) ) !== '/') {
    			$location = $location.'/' ;
    		}
    		$path = $path.'/'.$location ;
    		if (!file_exists ($path.'bspstyle.css')) {
    		generate_style_css() ;
    		}
    	}
    elseif (!file_exists ($path.'bspstyle.css')) { 
    	generate_style_css() ;

    Then comment the whole thing out. You can do this by adding /* to the beginning of the code and adding */ to the end of the code.

    Save the file and re-upload. Test.

    Thank you!!!!

    Hello,

    Tried this solution but then I got a wordpress error for the entire website 🙁

    Regards

    Eric

    @airic I encountered the same issue, but was able to fix it by moving the closing tag (*/) after the closing bracket, like this:

    /*if (!empty ($bsp_css_location ['activate css location']) && !empty($bsp_css_location ['location'])) {
    		$location = $bsp_css_location ['location'] ;
    			// if it starts with '/' -  remove
    			if (0 === strpos($location, '/')) {
    			$location = substr( $location, 1, strlen($location) ) ;
    			}
    		// if it doesn't end with a '/' add one
    		if (substr( $location, strlen($location)-1, strlen($location) ) !== '/') {
    			$location = $location.'/' ;
    		}
    		$path = $path.'/'.$location ;
    		if (!file_exists ($path.'bspstyle.css')) {
    		generate_style_css() ;
    		}
    	}
    elseif (!file_exists ($path.'bspstyle.css')) { 
    	generate_style_css() ;
    	}*/
    • This reply was modified 7 months, 1 week ago by zynnymeops.
    Plugin Author Robin W

    (@robin-w)

    ok, I’ve found and fixed the issues with this section (I hope!).

    Can you all update to version 4.4.11 and confirm that the issue goes away

    Thanks

    Still 4.4.10 and no update available yet…

    Plugin Author Robin W

    (@robin-w)

    technical issue with release, now done 4.2.0

    update done but still getting 21 duplicate queries…

    Plugin Author Robin W

    (@robin-w)

    @airic release 4.2.0 will not fix your issue – I need to look at this code further, but it is related to a fox I put in for categories/sub forums where freshness was not counting cotrrectly – I may need to make this optional.

    OK, I will wait then 😉
    Regards

    Plugin Author Robin W

    (@robin-w)

    fixed in 4.2.1

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘BBP Style Pack Slowing Down Website’ is closed to new replies.