what can be done to increase site speed using coursepress pro with 7000 users?


but I use coursepress pro 7,000 users and the speed was significantly lower compared to the beginning when I was 100. What can be done?

  • Michael Bissett
    • Recruit

    Hey Liviu,

    How much memory is allocated to WordPress presently? 256M? Or is it a higher value, like 512M?

    And how is that memory limit set presently? Is it by a custom php.ini file? .htaccess? Or would it be your site's wp-config.php?

    Other questions on my mind:
    - What kind of hosting do you have? Is it shared hosting, a VPS (virtual private server), or do you have a dedicated server?
    - Is there a specific page on your site that's particularly slow? Or is the entire site slow for you presently? (I'm asking to confirm whether this is a sitewide issue, or no, as it's possible for speed issues like what you've mentioned here to be only taking place on certain pages, where users are being listed).
    - What's the theme in use presently? Is it the CoursePress theme, or a different theme? (I'd be keen to know if switching to a default theme, like Twenty Fifteen or Twenty Sixteen, has an impact on performance)

    Having this detail would be very helpful in narrowing down why you're running into this over on your site, thanks in advance for the feedback! :slight_smile:

    Kind Regards,

  • Liviu
    • WPMU DEV Initiate


    Back with the answers.

    The site is hosted on a dedicated server with high memory limit (3000M) along with other small sites. I thought it was the server and purchased another one with 4 SSD in stripe raid -> no improvement :slight_frown:.

    The site is terribly slow when loading the courses page -> https://medicality.ro/cursuri/, but very fast on the homepage.

    Here are the screenshots with Query monitor reports. Basically, on the courses page, CoursePress does a lot of extra queries updating the meta.


    Can you please look into it?

    Thank you!

  • Michael Bissett
    • Recruit

    Hey Liviu, Michael here! :slight_smile:

    Could you please send in the following via our secure contact form, so that this can be looked into further?

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    -- Since you mentioned having other sites on this server, please mention where I can find the site in question here
    - Include hosting control panel access details (login address, username & password)
    -- cPanel's usually the control panel used for this, but your provider may use something else
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.


    Thanks! :slight_smile:

    Kind Regards,

  • Liviu
    • WPMU DEV Initiate


    I have sent you all the credentials in my previous reply...

    The one running https://medicality.ro is a 8x Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 16 GB ram, HDD and the one running https://dev.medicality.ro is a 4x Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz, 12 GB ram, 4x SSD in RAID 0.

    The latter one was slower because I didn't turn on the caching on mysql - now it's on.

    I have created this thread because there are 3500 mysql requests on the /COURSES/ page. I think you should look into it. Please login on the dev area and play around.

    Thank you

  • Ivan Shulev
    • The Bug Hunter

    Hey Liviu ,

    I am sorry for not looking into this earlier!

    Indeed the issue is with our plugin. By getting the count of users, the code was actually creating WP_User objects, instead of getting just the IDs, which is more than enough for the count.

    I will report this as a bug and you can do the following in the meantime:

    1. Go to /wp-content/plugins/coursepress/includes/classes/class.course.php

    2. Add the following code after line 1030:
    'fields' => 'ID'

    Now the whole code around it looks like so:

    $args = array(
    	/* 'role' => 'student', */
    	'meta_key' => $meta_key,
    	'fields' => 'ID'

    I hope this helps and I wish you an awesome day ahead!


  • Liviu
    • WPMU DEV Initiate

    This is awesome, thank you.

    When can we expect this to be implemented into the latest version? Because this is only for the v1.2.6.7. If I update to the latest WP and Coursepress Pro it fails again. Please?

    Thank you very much!!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.