Skip to:
Content
Pages
Categories
Search
Top
Bottom

Does BuddyPress 2.4.0 – Pietro take advantage of php 7


  • rosyteddy
    Participant

    @rosyteddy

    Does BuddyPress 2.4.0 – Pietro take advantage of php 7?
    Any sites running latest WP Multisite+BP+php7 ?
    Thanks for your feedbacks

Viewing 13 replies - 1 through 13 (of 13 total)

  • Henry Wright
    Moderator

    @henrywright

    BuddyPress now includes PHP 7 in its tests so sites running PHP 7 should be covered:

    Ref: https://twitter.com/JJJ/status/673520650624061441

    Regarding taking advantage of PHP 7 features, the plugin won’t do that. Any feature introduced after PHP 5.2 won’t be in BuddyPress yet because 5.2 is the minimum requirement to run WordPress.


    mcpeanut
    Participant

    @mcpeanut

    yo henry it might be worth noting that the speed increases in installing php 7 alone are worth the upgrade to it, i have just installed and tested it and ive gained amazing speed increases in page loading times since installing php 7 over php 5.6, what ever magic is in php 7 is defo working great for me.


    Henry Wright
    Moderator

    @henrywright

    Agreed @mcpeanut, the speed improvements alone are worth the upgrade. PHP 7 also has some useful features that us developers would love to use. Problem is, most cheap hosts will still be on something like 5.4 so we can’t use any of the new features in our plugins.

    To get an idea what version of PHP WordPress users are on, take a look at these stats:

    https://wordpress.org/about/stats/


    mcpeanut
    Participant

    @mcpeanut

    See that is what confuses me so damn bad @henrywright, these cheap hosts really just cannot be bothered upgrading something as simple as PHP versions, I mean why stay behind the times? it really does annoy me, this is why web design stands still whilst the tech to power it for performance is readily available to those that choose to upgrade, if the majority of hosts was using the latest PHP, MYSQL etc.. then dramatic changes could happen and performance gains would start happening ten fold.

    I am stunned at how many people are still using PHP 5.4 when the major increases came into effect from PHP 5.5 and PHP 5.6 with the introduction of opcache being inbuilt, leaving apc cache in the dust due to it not being developed for future PHP support. The improvements I am seeing in real world performance with each jump since 5.4 is so damn nice.

    I reckon plugin devs should just start using these extra features forcing people to take action if they want to start using these plugins. It is the only way to move things forward, if plugin devs are to scared to make the jump then so is everyone else.


    Henry Wright
    Moderator

    @henrywright

    Some plugin developers do require more recent versions of PHP but by doing that they limit their potential number of users. The solution could be for WordPress to add an admin notice “You are using an insecure version of PHP, please bug your host to upgrade”. Then once the stats indicate a small number of are users left on 5.2, they can stop supporting it. Note though, even a 1% figure for 5.2 could amount to millions of websites (considering the huge number of WP users overall).

    Also, WordPress is doing lots already by working closely with hosts to make sure they’re all aware of the PHP version they’re offering and in cases where it is very outdated, urging the host to upgrade.

    All that said, JavaScript is now coming into the game 😉


    mcpeanut
    Participant

    @mcpeanut

    Talking about JavaScript @henrywright, without going off topic or meaning to hijack this thread I have a question for you that you may be able to help me with that’s driving me nuts, you know how we spoke ages ago about combining js scripts etc? well I have a problem on my members pages that is frustrating me, I have all my js files combined how I need them to be and working great on every single page of the website and have all js moved to the bottom instead of being at the top with the use of a plugin.

    Now the problem I have is on a users member/profile pages, on these pages 2 of my js files remain at the top which is causing me problems with another plugin I use on these pages, the plugins all work fine but makes the pages briefly flash when switching tabs, i have narrowed it down to these js files loading in the head that are causing the problem. The plugin I use to move the js to the bottom only supports pages and posts and not custom post types (so it works fine on the activity/members/groups main pages but not in the individual groups or personal members pages), now I have got the code to add the custom post types so that it can move the js to the bottom on the members profile pages but I am not sure what custom post types these pages use?

    The code I need to use is below, but what custom post type should I add for the buddypress personal members pages to be included any ideas?

    function stf_add_cpt_support( $post_types ) {
        $post_types[] = 'project';
        
        return $post_types;
    }
    add_filter( 'scripts_to_footer_post_types', 'stf_add_cpt_support' );

    sorry @rosyteddy but i only brought it up as henry mentioned JS 🙂


    Henry Wright
    Moderator

    @henrywright

    Those pages don’t actually use CPTs at all which means you might not be able to use the scripts_to_footer_post_types hook in this case. Which scripts are you trying to move to the footer? It’s easy to move them manually (without the need for a plugin). When enqueuing the script, you set the 5th param of wp_enqueue_script() to true.

    Ref: https://codex.wordpress.org/Function_Reference/wp_enqueue_script


    mcpeanut
    Participant

    @mcpeanut

    After thinking about it this is probs not the way to do it anyhows huh henry? buddypress doesn’t even register custom post types does it? you can tell i haven’t bothered for a few months on the buddypress side of things I need to give my head a shake, been awake too long lol, been so busy with server admin and css recently, a case of too much at once.

    So any ideas how I would get this plugin ‘Scripts To Footer’ to work on the buddypress members pages and groups pages?

    See the plugin I am using works flawlessly on ever other page of my website so I dont really want to stop using the plugin just because it cannot be used on single profile and single groups pages, I just need to find a way to make this plugin also move the javascript to the footer on these pages too and all will be good, its been a while since ive come back to this after a break, I really don’t want to undo everything and then hunt the files down and make them load in the footer manually.


    mcpeanut
    Participant

    @mcpeanut

    sorry henry? you lost me with ask my host to deactivate the mail server?

    I do all my own server administration bud and i fail to see what my mail server has to do with the question? you just baffled me lol 🙂

    I was trying to avoid having to do it manually because I have already sets of js combined and served as cached and then move the cached js files to the footer using the plugin, oh well im going to have to undo some things and hunt em down I suppose.


    Henry Wright
    Moderator

    @henrywright

    In the mean time you could ask your host to deactivate your mail server, until you find a fix?

    That should have been posted on another topic. sorry about that! I’ve deleted it from above 🙂


    mcpeanut
    Participant

    @mcpeanut

    🙂 no probs i was very confused for a second haha


    mcpeanut
    Participant

    @mcpeanut

    @henrywright @rosyteddy just thought I would update you on my testing of php7, ok so it goes like this, yes the php7 speed improvements are infact amazing but I have a few issues with using it right now because if you use w3 total cache or any other advanced caching plugin then you are forced to use disk enhanced for object cache due to lack of support for Apc cache xcache etc etc.

    It would be great if I could get memcached running along side it but I have tried and failed all day long lol, even though my server is showing memcached as running I just cannot get w3 total cache to recognize it, neither is it showing in my php.info, I know its early and memcached should be available soon and working correctly on php7, so for now im confused a little as to stay with php7 and sit it out for the object caching or revert back to 5.6 with memcached? what do you think henry wait it out or revert? what do you reckon to the pros and cons of this?


    Henry Wright
    Moderator

    @henrywright

    The speed improvements of 7.0 are hard to resist. Apparently it’s 2x as fast as 5.6 (I haven’t upgraded yet) but if you can’t use your caching plugin yet then personally I’d wait. I reckon you’ll get a faster website with caching in place V the speed improvements of 7.0 without caching.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Does BuddyPress 2.4.0 – Pietro take advantage of php 7’ is closed to new replies.
Skip to toolbar