Share users database and custom fields/capatibilities with 2 wordpress

I have 2 install of wordpress (not a multisite install) with same wp_users and wp_usermeta tables and two S2member pro plugin.
I can retrieve all the users on the both site but i can’t find the custom fields and capatibilities from the one to the other !
In the backoffice user page i can’t find the s2member custom field data in the first site with an inscription in the second site because the prefix are not the same in the meta_key: wp_s2member_custom_fields (site 1) and exv_s2member_custom_fields (site 2)

How can i do this ?

Since what you are doing is just concerned with WordPress database tables, I suspect you will get the answer you seek by doing a Google search on how to set the prefixes in such an arrangement.

Hello,
the prefix of the meta_key : _s2member_custom_fields and capatibilities, are provide by s2member ?
the display of data users (custom fileds for exemple) in the backoffice too ?

With 2 install and 2 s2member plugins with same users and user_meta table i have the right users in the both site but not the custom data for each other in the backoffice page Users !

Where are the fonction who display the custom field in worpdress or s2member in the users page ?

s2Member doesn’t set any prefixes. Those are prefixes to database tables, which are set in MySQL/MariaDB.

There’s a ton of stuff you can find by Googling which will tell you all you need to know. That’s why I said use Google.

usermeta is not shared when using same database for 2 websites.

the rows in the dbname_usermeta table will be like this:
website1tableprefix_s2member_auto_eot_time
website2tableprefix_s2member_auto_eot_time

(websitetableprefix is of course set in wp-config.php and is different for both websites which is sharing the db)

I’m having problems with 2 websites sharing users and s2member…but sounds like I am 1 step ahead of you so I hope this helps.

I’ve got roles to update when changed ( using the plugin at the bottom of this guide https://kinsta.com/blog/share-logins-wordpress/ ) when they are changed on any of the websites.

Now I’m having problems getting EOT to update for both sites. Have made a function but cannot find the correct hook to use when user EOT is changed after successful payment.

Thanks Paul

I have seen this blog before, and with the plugins i have the good roles in the 2 sites !
Now i’m looking for how to display the same custom meta in all my sites

Maybe you’d have to hire a programmer such as the guy who made that blog post, or keep an eye on my other topic as if I ever get it to work, it might give you some hints on how to duplicate custom meta across both sites.

If it comes to it, I’m willing to hire somebody, depending how important it is to you, perhaps we could share the
cost? I have no choice. I have no income for 1 month now and must get this fixed ASAP. I’m losing income and losing members.

Guys, PM me if you need a developer.

Next week i could talk with one developper and show him the plugin and your code to get some fresh ideas.

I keep you informed

Hello,
You’re a specialist on wordpress and s2member ? What are your conditions for this kind of development ?
Synchronize custom fields datas and eot… with 2 seperate installs of wordpress with s2member

Hi Fred,

Not sure, still learn, but have several products on this matter :slight_smile:

Seriously, I am good in heavy synchronizations. Looks like I can do, but needs deeper review. Also a question: why you need two different sites? Why so difficult setup?

Best regards,
Krum