Does this plugin work with wp multisite?
-
I have a wpms installation with thousands of sites. Does this plugin work for me? Tks! ??
-
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.
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.
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?After tried again, I got some slow queries from this function:
ImfsDb->get_results()
wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:114ImfsDb->getTableCounts()
wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:99ImfsDb->init()
wp-content/plugins/index-wp-mysql-for-speed/code/imsfdb.php:52ImfsPage->populate()
wp-content/plugins/index-wp-mysql-for-speed/code/admin.php:998ImfsPage->load_imfs_settings()
wp-content/plugins/index-wp-mysql-for-speed/code/admin.php:977do_action('load_imfs_settings')
wp-includes/plugin.php:517Imfs_AdminPageFramework_WPUtility_Hook::addAndDoAction()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php:277Imfs_AdminPageFramework_WPUtility_Hook::addAndDoActions()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php:261Imfs_AdminPageFramework_Factory_Router->_load()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/_abstract/AdminPageFramework_Factory.php:54Imfs_AdminPageFramework_Router->_doPageLoadCall()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:68Imfs_AdminPageFramework_Router->__call()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:49do_action('current_screen')
wp-includes/plugin.php:517WP_Screen->set_current_screen()
wp-admin/includes/class-wp-screen.php:424set_current_screen()
wp-admin/includes/screen.php:243
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
- wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldTitle.php:33
strip_tags()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldTitle.php:33Imfs_AdminPageFramework_Form_View___FieldTitle->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:36Imfs_AdminPageFramework_Form_View___FieldsetTableRow->_getFieldByContainer()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:29Imfs_AdminPageFramework_Form_View___FieldsetTableRow->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:40Imfs_AdminPageFramework_Form_View___FieldsetRows->_getFieldsetRow()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:34Imfs_AdminPageFramework_Form_View___FieldsetRows->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:44Imfs_AdminPageFramework_Form_View___Section->_getSectionContent()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:35Imfs_AdminPageFramework_Form_View___Section->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:113Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionTableWithTabList()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:79Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetTable()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:58Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetsTables()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:41Imfs_AdminPageFramework_Form_View___Sectionsets->_getFormOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:27Imfs_AdminPageFramework_Form_View___Sectionsets->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/AdminPageFramework_Form.php:257Imfs_AdminPageFramework_Form_View->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:79Imfs_AdminPageFramework_View__PageRenderer->_getFormOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:68Imfs_AdminPageFramework_View__PageRenderer->_printMainPageContent()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:31Imfs_AdminPageFramework_View__PageRenderer->render()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:466Imfs_AdminPageFramework_View_Page->_renderPage()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:462Imfs_AdminPageFramework_View_Page->_replyToRenderPage()
wp-includes/class-wp-hook.php:308do_action('tools_page_imfs_settings')
wp-admin/admin.php:259
explode(): Passing null to parameter #2 ($string) of type string is deprecated
- wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/base_utility/AdminPageFramework_Utility.php:570
explode()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/base_utility/AdminPageFramework_Utility.php:570Imfs_AdminPageFramework_Utility_HTMLAttribute::getStyleAttribute()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/field_type/AdminPageFramework_FieldType_color.php:123Imfs_AdminPageFramework_FieldType_Base->getLabelContainerAttributes()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/field_type/AdminPageFramework_FieldType_default.php:10Imfs_AdminPageFramework_FieldType_default->_replyToGetField()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:145Imfs_AdminPageFramework_Form_View___Fieldset->_getEachFieldOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:134Imfs_AdminPageFramework_Form_View___Fieldset->_getFieldsOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php:128Imfs_AdminPageFramework_Form_View___Fieldset->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php:25Imfs_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:38Imfs_AdminPageFramework_Form_View___FieldsetTableRow->_getFieldByContainer()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php:29Imfs_AdminPageFramework_Form_View___FieldsetTableRow->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:40Imfs_AdminPageFramework_Form_View___FieldsetRows->_getFieldsetRow()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:34Imfs_AdminPageFramework_Form_View___FieldsetRows->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:44Imfs_AdminPageFramework_Form_View___Section->_getSectionContent()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php:35Imfs_AdminPageFramework_Form_View___Section->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:113Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionTableWithTabList()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:79Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetTable()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:58Imfs_AdminPageFramework_Form_View___Sectionsets->_getSectionsetsTables()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:41Imfs_AdminPageFramework_Form_View___Sectionsets->_getFormOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php:27Imfs_AdminPageFramework_Form_View___Sectionsets->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/AdminPageFramework_Form.php:257Imfs_AdminPageFramework_Form_View->get()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:79Imfs_AdminPageFramework_View__PageRenderer->_getFormOutput()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:68Imfs_AdminPageFramework_View__PageRenderer->_printMainPageContent()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php:31Imfs_AdminPageFramework_View__PageRenderer->render()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:466Imfs_AdminPageFramework_View_Page->_renderPage()
wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php:462Imfs_AdminPageFramework_View_Page->_replyToRenderPage()
wp-includes/class-wp-hook.php:308do_action('tools_page_imfs_settings')
wp-admin/admin.php:259
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
andsudo -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
- The topic ‘Does this plugin work with wp multisite?’ is closed to new replies.