• Resolved diegpl

    (@diegpl)


    I have a wpms installation with thousands of sites. Does this plugin work for me? Tks! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author OllieJones

    (@olliejones)

    It does work with multisite. But it doesn’t have a way to add the high-performance keys for all subsites at once. You can do them one at a time: fine for a few subsites, but thousands will be inconvenient.

    You may want to use its wp-cli option, and maybe even create your own SQL file to do the indexing based on the output from

    wp index-mysql --dryrun

    I’m very busy today; I can answer more questions for you or help you get this going.

    Plugin Author OllieJones

    (@olliejones)

    As you know your database has multiple tables for each subsite. We need to reindex, therefore, six tables for each subsite plus the user and usermeta tables.

    Following up: with wp-cli you can do something like this

    sudo -u www-data wp index-mysql enable --all --blogid=0
    sudo -u www-data wp index-mysql enable --all --blogid=1
    sudo -u www-data wp index-mysql enable --all --blogid=2

    and so forth to index all your subsites. Or if it’s easier you can use the --url= parameter to specify which subsite to index. At any rate, the plugin indexes one subsite at a time.

    Or you can say

    sudo -u www-data wp index-mysql enable --all --blogid=1 --dryrun

    That gets you the SQL data definition language (DDL) statements to run for blogid 1. Then maybe you, or somebody, can look at that and script all the DDL for all your sites. It’s pretty standardized stuff, especially if your subsites don’t have all sorts of unpredicatable plugins installed that fiddle with your database definition.

    I’m sure you’re aware this will be a bit of an operations project to implement.

    (It would be hilariously timeout-prone to provide a way to index thousands of sites from the web dashboard.)

    Don’t hesitate to write back if you need more support on this.

    And, it would be *very helpful indeed* if you could capture a monitor with the plugin and upload it. I’d love to look for query optimization opportunites with large wp_blogs, wp_site, and wp_sitemeta tables. A monitor will let me see which queries are slowest.

    Thread Starter diegpl

    (@diegpl)

    Cool, tks man! ??
    But I tried to activate and check its page in /wp-admin/tools.php?page=imfs_settings and it just loaded forever. Should I try to activate it just through database and avoid checking its settings page?

    Thread Starter diegpl

    (@diegpl)

    After tried again, I got some slow queries from this function:

    1. ImfsDb->get_results()
      wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:114
    2. ImfsDb->getTableCounts()
      wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:99
    3. ImfsDb->init()
      wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:52
    4. ImfsPage->populate()
      wp-content/plugins/index-wp-mysql-for-speed/code/admin.php:998
    5. ImfsPage->load_imfs_settings()
      wp-content/plugins/index-wp-mysql-for-speed/code/admin.php:977
    6. do_action('load_imfs_settings')
      wp-includes/plugin.php:517
    7. Imfs_AdminPageFramework_WPUtility_Hook::addAndDoAction()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php:277
    8. Imfs_AdminPageFramework_WPUtility_Hook::addAndDoActions()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php:261
    9. Imfs_AdminPageFramework_Factory_Router->_load()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/_abstract/AdminPageFramework_Factory.php:54
    10. Imfs_AdminPageFramework_Router->_doPageLoadCall()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:68
    11. Imfs_AdminPageFramework_Router->__call()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:49
    12. do_action('current_screen')
      wp-includes/plugin.php:517
    13. WP_Screen->set_current_screen()
      wp-admin/includes/class-wp-screen.php:424
    14. set_current_screen()
      wp-admin/includes/screen.php:243
    Thread Starter diegpl

    (@diegpl)

    There are these two errors showing up in Query Monitor plugin as well:

    strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated

    1. wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldTitle.php:33
    2. strip_tags()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldTitle.php:33
    3. Imfs_AdminPageFramework_Form_View___FieldTitle->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:36
    4. Imfs_AdminPageFramework_Form_View___FieldsetTableRow->_getFieldByContainer()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:29
    5. Imfs_AdminPageFramework_Form_View___FieldsetTableRow->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:40
    6. Imfs_AdminPageFramework_Form_View___FieldsetRows->_getFieldsetRow()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:34
    7. Imfs_AdminPageFramework_Form_View___FieldsetRows->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:44
    8. Imfs_AdminPageFramework_Form_View___Section->_getSectionContent()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:35
    9. Imfs_AdminPageFramework_Form_View___Section->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:113
    10. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionTableWithTabList()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:79
    11. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetTable()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:58
    12. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetsTables()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:41
    13. Imfs_AdminPageFramework_Form_View___Sectionsets->_getFormOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:27
    14. Imfs_AdminPageFramework_Form_View___Sectionsets->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/AdminPageFramework_Form.php:257
    15. Imfs_AdminPageFramework_Form_View->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:79
    16. Imfs_AdminPageFramework_View__PageRenderer->_getFormOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:68
    17. Imfs_AdminPageFramework_View__PageRenderer->_printMainPageContent()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:31
    18. Imfs_AdminPageFramework_View__PageRenderer->render()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:466
    19. Imfs_AdminPageFramework_View_Page->_renderPage()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:462
    20. Imfs_AdminPageFramework_View_Page->_replyToRenderPage()
      wp-includes/class-wp-hook.php:308
    21. do_action('tools_page_imfs_settings')
      wp-admin/admin.php:259

    explode(): Passing null to parameter #2 ($string) of type string is deprecated

    1. wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/base_utility/AdminPageFramework_Utility.php:570
    2. explode()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/base_utility/AdminPageFramework_Utility.php:570
    3. Imfs_AdminPageFramework_Utility_HTMLAttribute::getStyleAttribute()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/field_type/AdminPageFramework_FieldType_color.php:123
    4. Imfs_AdminPageFramework_FieldType_Base->getLabelContainerAttributes()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/field_type/AdminPageFramework_FieldType_default.php:10
    5. Imfs_AdminPageFramework_FieldType_default->_replyToGetField()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:145
    6. Imfs_AdminPageFramework_Form_View___Fieldset->_getEachFieldOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:134
    7. Imfs_AdminPageFramework_Form_View___Fieldset->_getFieldsOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:128
    8. Imfs_AdminPageFramework_Form_View___Fieldset->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php:25
    9. Imfs_AdminPageFramework_Form_View___Section_Base->getFieldsetOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:38
    10. Imfs_AdminPageFramework_Form_View___FieldsetTableRow->_getFieldByContainer()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:29
    11. Imfs_AdminPageFramework_Form_View___FieldsetTableRow->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:40
    12. Imfs_AdminPageFramework_Form_View___FieldsetRows->_getFieldsetRow()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:34
    13. Imfs_AdminPageFramework_Form_View___FieldsetRows->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:44
    14. Imfs_AdminPageFramework_Form_View___Section->_getSectionContent()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:35
    15. Imfs_AdminPageFramework_Form_View___Section->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:113
    16. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionTableWithTabList()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:79
    17. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetTable()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:58
    18. Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetsTables()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:41
    19. Imfs_AdminPageFramework_Form_View___Sectionsets->_getFormOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:27
    20. Imfs_AdminPageFramework_Form_View___Sectionsets->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/AdminPageFramework_Form.php:257
    21. Imfs_AdminPageFramework_Form_View->get()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:79
    22. Imfs_AdminPageFramework_View__PageRenderer->_getFormOutput()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:68
    23. Imfs_AdminPageFramework_View__PageRenderer->_printMainPageContent()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:31
    24. Imfs_AdminPageFramework_View__PageRenderer->render()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:466
    25. Imfs_AdminPageFramework_View_Page->_renderPage()
      wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:462
    26. Imfs_AdminPageFramework_View_Page->_replyToRenderPage()
      wp-includes/class-wp-hook.php:308
    27. do_action('tools_page_imfs_settings')
      wp-admin/admin.php:259
    Plugin Author OllieJones

    (@olliejones)

    Thanks for the reports. I’ve logged them here, and hope to repair this stuff soon. https://github.com/OllieJones/index-wp-mysql-for-speed/issues/61

    The errors shown by Query Monitor are actually deprecation notices. The plugin works correctly with php 8.0 even when the warnings are present.

    A subcomponent I use to show the dashboard panels needs to be updated for php 8.0.

    Slow queries: It’s true that the plugin’s dashboard pages examine various tables, and those queries can be slow with large tables.

    sudo -u www-data wp index-mysql status and

    sudo -u www-data wp index-mysql tables can give you the same information that appears on the dashboard pages, without risking timeouts.

    • This reply was modified 1 year, 9 months ago by OllieJones. Reason: mention wpcli commands
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Does this plugin work with wp multisite?’ is closed to new replies.