Partitioning #173
Replies: 6 comments
-
Without knowing exactly what your setup looks like, here's a back-of-the-napkin guess with some very conservative settings that you'll likely need to tune once everything is confirmed to be connecting.
|
Beta Was this translation helpful? Give feedback.
-
@mistakenCynic Any luck? I'm going to close this to clean the issues up, but I'll still reply here if need be. 🎩 |
Beta Was this translation helpful? Give feedback.
-
aaawwwww man! this is awesome, it's exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
-
@GeneralCan Similar, yes. You'll want to set these constants in your various https://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables Without those set, each installation will want to use it's own database tables, with their own prefixes. Then you'll need to modify the callback with the proper regular expression to match & route your queries to their appropriate databases & servers. What's included above is a good start, and might actually work at first, but I'd suggest you probably invent something more specific to your site & server groupings. Across WordPress.org, we usually name clusters after airport codes (lax.db, dal.db, etc...) |
Beta Was this translation helpful? Give feedback.
-
hey @JJJ question for you. this is what I have inside db-config.php:
so what I'm seeing is that wordpress 'sees' all it's tables fine, however, plugins like woocommerce and wordfence cannot 'see' their tables. The sites share the user base, so that's awesome, but that's about it. any help would be greatly appreciated! Thanks! |
Beta Was this translation helpful? Give feedback.
-
Maybe a typo in your regular expression?
Should maybe be...
This assumes that |
Beta Was this translation helpful? Give feedback.
-
Hi, is there any way you could help me devise a very basic configuration for partitioning? Basically, I have a Wordpress users table (k2bi_users) on one database (1757) and then I have all the other 70 or so Wordpress tables (k2bi_xxx) on another database (1893). How can I set up the configuration so that it calls on the 1757 database for the users table and the other database for all the other tables?
I know it's a strange setup, and it may sound like I'm an idiot, but this is exactly what I need. Nothing else. The reason being I have a unique user registration system that can only exist on an external database, but the connection is extremely slow. That is why I want all my other tables to be on the internal database.
Thanks so much for the help! I'll be eternally grateful to figure this out 👍 .
Beta Was this translation helpful? Give feedback.
All reactions